As we allow per-context engine allows the legacy concept of I915_EXEC_RING no longer applies universally. We are still exposing the unrelated exec-id in GEM_BUSY, so transition this ioctl (once more slightly changing its ABI, but no one cares) over to only reporting the uabi-class (not instance as we can not foreseeably fit those into the small bitmask). The only user of the extended ring information from GEM_BUSY is ddx/sna, which tries to use the non-rcs business information to guide which engine to use for subsequent operations on foreign bo. All that matters for it is the decision between rcs and !rcs, so it is unaffected by the change in higher bits.
Showing the changes to include/uapi/drm (1 of 4 files). Show all
Unified · Split
| @@ -1127,32 +1127,34 @@ struct drm_i915_gem_busy { · 1126 unmodified lines | |||
| 1127 | * as busy may become idle before the ioctl is completed. | 1127 | * as busy may become idle before the ioctl is completed. |
| 1128 | * | 1128 | * |
| 1129 | * Furthermore, if the object is busy, which engine is busy is only | 1129 | * Furthermore, if the object is busy, which engine is busy is only |
| 1130 | * provided as a guide. There are race conditions which prevent the | 1130 | * provided as a guide and only indirectly by reporting its class |
| 1131 | * report of which engines are busy from being always accurate. | 1131 | * (there may be more than one engine in each class). There are race |
| 1132 | * However, the converse is not true. If the object is idle, the | 1132 | * conditions which prevent the report of which engines are busy from |
| 1133 | * result of the ioctl, that all engines are idle, is accurate. | 1133 | * being always accurate. However, the converse is not true. If the |
| 1134 | * object is idle, the result of the ioctl, that all engines are idle, | ||
| 1135 | * is accurate. | ||
| 1134 | * | 1136 | * |
| 1135 | * The returned dword is split into two fields to indicate both | 1137 | * The returned dword is split into two fields to indicate both |
| 1136 | * the engines on which the object is being read, and the | 1138 | * the engine classess on which the object is being read, and the |
| 1137 | * engine on which it is currently being written (if any). | 1139 | * engine class on which it is currently being written (if any). |
| 1138 | * | 1140 | * |
| 1139 | * The low word (bits 0:15) indicate if the object is being written | 1141 | * The low word (bits 0:15) indicate if the object is being written |
| 1140 | * to by any engine (there can only be one, as the GEM implicit | 1142 | * to by any engine (there can only be one, as the GEM implicit |
| 1141 | * synchronisation rules force writes to be serialised). Only the | 1143 | * synchronisation rules force writes to be serialised). Only the |
| 1142 | * engine for the last write is reported. | 1144 | * engine class (offset by 1, I915_ENGINE_CLASS_RENDER is reported as |
| 1145 | * 1 not 0 etc) for the last write is reported. | ||
| 1143 | * | 1146 | * |
| 1144 | * The high word (bits 16:31) are a bitmask of which engines are | 1147 | * The high word (bits 16:31) are a bitmask of which engines classes |
| 1145 | * currently reading from the object. Multiple engines may be | 1148 | * are currently reading from the object. Multiple engines may be |
| 1146 | * reading from the object simultaneously. | 1149 | * reading from the object simultaneously. |
| 1147 | * | 1150 | * |
| 1148 | * The value of each engine is the same as specified in the | 1151 | * The value of each engine class is the same as specified in the |
| 1149 | * EXECBUFFER2 ioctl, i.e. I915_EXEC_RENDER, I915_EXEC_BSD etc. | 1152 | * I915_CONTEXT_SET_ENGINES parameter and via perf, i.e. |
| 1150 | * Note I915_EXEC_DEFAULT is a symbolic value and is mapped to | 1153 | * I915_ENGINE_CLASS_RENDER, I915_ENGINE_CLASS_COPY, etc. |
| 1151 | * the I915_EXEC_RENDER engine for execution, and so it is never | ||
| 1152 | * reported as active itself. Some hardware may have parallel | 1154 | * reported as active itself. Some hardware may have parallel |
| 1153 | * execution engines, e.g. multiple media engines, which are | 1155 | * execution engines, e.g. multiple media engines, which are |
| 1154 | * mapped to the same identifier in the EXECBUFFER2 ioctl and | 1156 | * mapped to the same class identifier and so are not separately |
| 1155 | * so are not separately reported for busyness. | 1157 | * reported for busyness. |
| 1156 | * | 1158 | * |
| 1157 | * Caveat emptor: | 1159 | * Caveat emptor: |
| 1158 | * Only the boolean result of this query is reliable; that is whether | 1160 | * Only the boolean result of this query is reliable; that is whether |