[igt-dev] [PATCH i-g-t] lib/igt_kms: Set writeback connector capacity to fix VC4 testing

Paul Kocialkowski paul.kocialkowski at bootlin.com
Thu Nov 15 16:36:00 UTC 2018


Hi,

On Wed, 2018-11-14 at 16:50 +0100, Boris Brezillon wrote:
> Hi Paul,
> 
> On Wed, 14 Nov 2018 16:31:49 +0100
> Paul Kocialkowski <paul.kocialkowski at bootlin.com> wrote:
> 
> > Support for writeback connectors was recently introduced in DRM, with
> > an implementation in the VC4 DRM driver. This unfortunately broke IGT
> > testing for the driver due to always-failing atomic commits.
> > 
> > After boot up, the writeback connector is attached to a CRTC, with a
> > virtual encoder and a plane (that takes the same framebuffer as the
> > primary plane).
> 
> That's weird, the writeback connector should not be attached to its
> CRTC by default, unless someone explicitly requested that. Maybe
> something related to the fbdev emulation layer, but I'm not sure.

Thanks for the tip, this was definitely the cause of the writeback
connector being attached to the CRTC at boot.

I have just sent out a patch to blacklist writeback connectors in fbdev.

I am not sure it's worth keeping this patch around if that issue is to
be fixed in the kernel directly. It also conflicts with the upcoming
writeback series in IGT.

Cheers,

Paul

> > Because IGT configures all the available planes, this plane is no
> > longer associated with the writeback CRTC. The connector remains
> > associated with the CRTC as the core does not automatically clean it up.
> > IGT is not aware of the writeback connector (hidden by default), so it
> > does not detach the CRTC. As a result, the atomic commit fails because
> > the CRTC is moving to a disabled state with a connector still attached.
> > 
> > Fix this issue by setting the writeback connector cap before getting
> > DRM resources so that the connector can be discovered and the CRTC
> > can be detached by IGT. Since it requires atomic support, make it
> > conditional and move the atomic capability before getting DRM resources.
> > 
> > The associated cap definitions are also updated to include the required
> > writeback one.
> > 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
> > ---
> >  include/drm-uapi/drm.h | 16 ++++++++++++++++
> >  lib/igt_kms.c          |  8 ++++++--
> 
> Looks like [1] is doing pretty much the same thing.
> 
> [1]https://patchwork.freedesktop.org/patch/260289/
-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20181115/98789884/attachment.sig>


More information about the igt-dev mailing list