]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/vkms: Remove index parameter from init_vkms_output
authorLouis Chauvet <louis.chauvet@bootlin.com>
Tue, 19 Nov 2024 13:34:04 +0000 (14:34 +0100)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Fri, 22 Nov 2024 09:49:35 +0000 (10:49 +0100)
commit12e755103f2404fa87bd1d7af93100ec45b43feb
treebeb04182972e7596a0840ef66f22ac00b3b15ab7
parentd80b5c5b9be6b2e1cdeaaeaa8259523b63cae292
drm/vkms: Remove index parameter from init_vkms_output

VKMS currently supports only one CRTC, so it make no sense to have this
index configurable. To avoid issues, replace this hardcoded index by
drm_crtc_mask when applicable.

There is no need to manually set a crtc mask on primary and cursor plane
as it is automatically set by drmm_crtc_alloc_with_planes.

In addition, this will remove the use of an uninitialized structure in
vkms_add_overlay_plane. This currently works by chance because two things:
- vkms_plane_init always set a possible_crtcs value, so the problematic
  branch is never used;
- drm_crtc_mask on an kzalloc'd drm_crtc returns BIT(0), and the VKMS CRTC
  always have this id.

Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241119-vkms-remove-index-v3-1-976321a3f801@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/vkms/vkms_drv.c
drivers/gpu/drm/vkms/vkms_drv.h
drivers/gpu/drm/vkms/vkms_output.c
drivers/gpu/drm/vkms/vkms_plane.c