From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH V2 4/5] drm/vkms: Use index instead of 0 in possible crtc Date: Tue, 18 Jun 2019 13:09:20 +0200 Message-ID: <20190618110920.GT12905@phenom.ffwll.local> References: <971da2ede86d11357e6822409bef23cb03869f83.1560820888.git.rodrigosiqueiramelo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Simon Ser Cc: Rodrigo Siqueira , Brian Starkey , Liviu Dudau , Daniel Vetter , Haneen Mohammed , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" List-Id: dri-devel@lists.freedesktop.org On Tue, Jun 18, 2019 at 07:56:23AM +0000, 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 possible_crtcs to the first CRTC if zero. > > If we want to warn on possible_crtcs=0, we should probably remove this > safeguard. Checking first whether this safeguard is used by any driver > is probably a good idea. > > [1]: https://drmdb.emersion.fr/devices/f218d1242714 Yeaht it's a bit a mess, that's why I've suggested we should bite this bullet and fix it for real. There's a bunch others such bitmasks that many drivers seem to not set correctly. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch