drm/vkms: Avoid assigning 0 for possible_crtc
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Wed, 26 Jun 2019 01:36:18 +0000 (22:36 -0300)
committerRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fri, 12 Jul 2019 03:45:49 +0000 (00:45 -0300)
commite9d85f731de06a35d2ae6cdcf7d0e037c98ef41a
tree5d86403750e3113ee8a76c204090c84aa536b2f5
parent4f5368b5541a902f6596558b05f5c21a9770dd32
drm/vkms: Avoid assigning 0 for possible_crtc

When vkms invoke drm_universal_plane_init(), it sets 0 for
possible_crtcs parameter which means that planes can't be attached to
any CRTC. It currently works due to some safeguard in the drm_crtc file;
however, it is possible to identify the problem by trying to append a
second connector. This patch fixes this issue by modifying
vkms_plane_init() to accept an index parameter which makes the code a
little bit more flexible and avoid set zero to possible_crtcs.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/d67849c62a8d8ace1a0af455998b588798a4c45f.1561491964.git.rodrigosiqueiramelo@gmail.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