Re: [PATCH V2 4/5] drm/vkms: Use index instead of 0 in possible crtc

2019-06-18 Thread Daniel Vetter
On Tue, Jun 18, 2019 at 07:56:23AM +, Simon Ser wrote: > Interestingly, even with the previous code, possible_crtcs=1 was > exposed to userspace [1]. I think this is because of a safeguard in > drm_crtc_init_with_planes (drm_crtc.c:284) which sets the primary and > cursor plane's

Re: [PATCH V2 4/5] drm/vkms: Use index instead of 0 in possible crtc

2019-06-18 Thread Daniel Vetter
On Mon, Jun 17, 2019 at 11:45:29PM -0300, Rodrigo Siqueira wrote: > When vkms calls drm_universal_plane_init(), it sets 0 for the > possible_crtcs parameter which works well for a single encoder and > connector; however, this approach is not flexible and does not fit well > for vkms. This commit

Re: [PATCH V2 4/5] drm/vkms: Use index instead of 0 in possible crtc

2019-06-18 Thread Simon Ser
Interestingly, even with the previous code, possible_crtcs=1 was exposed to userspace [1]. I think this is because of a safeguard in drm_crtc_init_with_planes (drm_crtc.c:284) which sets the primary and cursor plane's possible_crtcs to the first CRTC if zero. If we want to warn on

[PATCH V2 4/5] drm/vkms: Use index instead of 0 in possible crtc

2019-06-17 Thread Rodrigo Siqueira
When vkms calls drm_universal_plane_init(), it sets 0 for the possible_crtcs parameter which works well for a single encoder and connector; however, this approach is not flexible and does not fit well for vkms. This commit adds an index parameter for vkms_plane_init() which makes code flexible and