drm/vkms: set plane modifiers
PATCH RESEND v3 1/1 drm/vkms: set plane modifiers
Where no modifiers are exposed, usually linear modifier is assumed. However, userspace code is starting to expect IN_FORMATS even when the only supported modifiers are linear [1].
To avoid possible issues, explicitly set the DRM_FORMAT_MOD_LINEAR modifier.
Suggested-by Chris Healy <[email protected]>
Signed-off-by José Expósito <[email protected]>
---
v2:
Implement format_mod_supported (Simon Ser)
v3:
Now that "drm_plane_funcs.format_mod_supported" has been made truly optional [1] its implementations has been removed.
[1] https://lore.kernel.org/dri-devel/[email protected]/T/
--- drivers/gpu/drm/vkms/vkms_plane.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/vkms/vkms_plane.c +6 -1
@@ -20,6 +20,11 @@ static const u32 vkms_plane_formats[] = { DRM_FORMAT_XRGB8888 }; +static const u64 vkms_plane_modifiers[] = { +DRM_FORMAT_MOD_LINEAR , +DRM_FORMAT_MOD_INVALID +}; +static struct drm_plane_state *vkms_plane_duplicate_state (struct drm_plane *plane) {
@@ -189,7 +194,7 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev, plane = drmm_universal_plane_alloc(dev, struct vkms_plane, base, 1 << index, &vkms_plane_funcs, formats, nformats, -NULL , type,NULL ); + vkms_plane_modifiers, type,NULL );if (IS_ERR (plane))return plane;
Signature · 1 line
2.25.1