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
This commit is contained in:
@@ -115,10 +115,10 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
|
||||
int *max_error, ktime_t *vblank_time,
|
||||
bool in_vblank_irq);
|
||||
|
||||
int vkms_output_init(struct vkms_device *vkmsdev);
|
||||
int vkms_output_init(struct vkms_device *vkmsdev, int index);
|
||||
|
||||
struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev,
|
||||
enum drm_plane_type type);
|
||||
enum drm_plane_type type, int index);
|
||||
|
||||
/* Gem stuff */
|
||||
struct drm_gem_object *vkms_gem_create(struct drm_device *dev,
|
||||
|
Reference in New Issue
Block a user