XE_BO_SCANOUT_BIT handling on display flips
https://lore.kernel.org/all/Y9hw0sSC58B32yPg@mdroper-desk1.amr.corp.intel.com/
...
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c ... +int xe_gem_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *file)
+{ ... +
if (args->flags & XE_GEM_CREATE_FLAG_SCANOUT)
bo_flags |= XE_BO_SCANOUT_BIT;
So if an object is eligible to be flipped to a display plane, it should be allocated that way up front? How does that work when the client allocating the buffer is separate from the display server responsible for presentation? If the 3D or media client allocating the buffer doesn't know what the compositor is going to do with it (i.e., flip to a plane vs compose with 3D), they should probably just set the scanout bit on every buffer just to be safe?
With the display code living in i915, I guess there's nothing trying to enforce that we don't try to flip a buffer that wasn't flagged as scanout, so if userspace does the wrong thing it's just their own fault.