Re: [PATCH] drm/client: check whether CRTC is active before waiting for vblank
From: Thomas Zimmermann
Date: Tue May 26 2026 - 03:59:14 EST
Hi
Am 22.05.26 um 21:39 schrieb Ville Syrjälä:
On Fri, May 22, 2026 at 03:43:26PM +0200, Thomas Zimmermann wrote:
HiActual mirroring may not be possible due to different modes supported
Am 22.05.26 um 15:28 schrieb Ville Syrjälä:
[...]
I mean that the connected outputs could change at a later point or weSound like a locking issue if someone is changing the configurationThe enable-status of each CRTC could change later on, which might leadBut why does your HW use CRTC 1 in the first place.Could be eg. the enabled outputs can't be driven with CRTC 0.
I guess what you want to do is pick the first crtc from modesets[]
which is enabled. Or perhaps even "pick the Nth enabled crtc from
modesets[] based on the ioctl argument".
to problems.
at the same time we're trying to do the vblank wait here.
could have multiple CRTCs in use. Today, someone in #intel-gfx reported
a problem with panning if multiple CRTCs are in use.
Therefore picking a CRTC freely could be a problem. Let's say we
configure modes from one CRTC, but later wait/pan/flush with another
CRTC. I would not trust this to work correctly.
Hence, my suggestion is to select a primary CRTC during the fbdev
client's probe and use it for all later operations until the next probe
happens. All other CRTCs would mirror the primary one.
on each output. The whole multi-output fbdev thing in the drm fb helper
is kind of a hack that's rather hard to make work 100% sensibly.
I know, but we have to support it to some extent. The current mirroring logic at least works, except that it assumes CRTC 0 to be present.
Best regards
Thomas
For the panning possibly the only sensible thing is to use the max of
hdisplay/vdisplay of all the crtcs as the xres/yres so it's clear
how much things can actually be panned. Oh and tiled displays (assuming
we would actually want the fbdev stuff to tile correctly) make the
situation even more complicated. I think the current support for tiled
displays in the fb helper is semi-busted.
Best regards
Thomas
--Picking the one CRTC/output with the lowest spec and
mirroring it to the others might work. This CRTC would then be the one
to wait for.
Best regards
Thomas
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)