[igt-dev] [PATCH i-g-t] lib/igt_kms: Set writeback connector capacity to fix VC4 testing
Boris Brezillon
boris.brezillon at bootlin.com
Wed Nov 14 15:50:08 UTC 2018
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.
>
> 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/
More information about the igt-dev
mailing list