History

drm/i915: Remove last traces of exec-id (GEM_BUSY)

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.

Chris Wilson committed 7 years ago

Commit c8b50241 parent 62acc7e4 files · +34 −41Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/drm/i915_drm.h+17−15
@@ -1127,32 +1127,34 @@ struct drm_i915_gem_busy { · 1126 unmodified lines
11271127 * as busy may become idle before the ioctl is completed.
11281128 *
11291129 * Furthermore, if the object is busy, which engine is busy is only
1130− * provided as a guide. There are race conditions which prevent the
1131− * report of which engines are busy from being always accurate.
1132− * However, the converse is not true. If the object is idle, the
1133− * result of the ioctl, that all engines are idle, is accurate.
1130+ * provided as a guide and only indirectly by reporting its class
1131+ * (there may be more than one engine in each class). There are race
1132+ * conditions which prevent the report of which engines are busy from
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.
11341136 *
11351137 * The returned dword is split into two fields to indicate both
1136− * the engines on which the object is being read, and the
1137− * engine on which it is currently being written (if any).
1138+ * the engine classess on which the object is being read, and the
1139+ * engine class on which it is currently being written (if any).
11381140 *
11391141 * The low word (bits 0:15) indicate if the object is being written
11401142 * to by any engine (there can only be one, as the GEM implicit
11411143 * 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.
11431146 *
1144− * The high word (bits 16:31) are a bitmask of which engines are
1145− * currently reading from the object. Multiple engines may be
1147+ * The high word (bits 16:31) are a bitmask of which engines classes
1148+ * are currently reading from the object. Multiple engines may be
11461149 * reading from the object simultaneously.
11471150 *
1148− * The value of each engine is the same as specified in the
1149− * EXECBUFFER2 ioctl, i.e. I915_EXEC_RENDER, I915_EXEC_BSD etc.
1150− * Note I915_EXEC_DEFAULT is a symbolic value and is mapped to
1151− * the I915_EXEC_RENDER engine for execution, and so it is never
1151+ * The value of each engine class is the same as specified in the
1152+ * I915_CONTEXT_SET_ENGINES parameter and via perf, i.e.
1153+ * I915_ENGINE_CLASS_RENDER, I915_ENGINE_CLASS_COPY, etc.
11521154 * reported as active itself. Some hardware may have parallel
11531155 * execution engines, e.g. multiple media engines, which are
1154− * mapped to the same identifier in the EXECBUFFER2 ioctl and
1155− * so are not separately reported for busyness.
1156+ * mapped to the same class identifier and so are not separately
1157+ * reported for busyness.
11561158 *
11571159 * Caveat emptor:
11581160 * Only the boolean result of this query is reliable; that is whether