From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Icenowy Zheng" <uwu@icenowy.me>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/client: check whether CRTC is active before waiting for vblank
Date: Fri, 22 May 2026 16:09:55 +0200 [thread overview]
Message-ID: <06e079a3-c8ec-4e3f-99da-c776d35cedfe@suse.de> (raw)
In-Reply-To: <3219f779c2f3bd17348a70d6c8278b1b1ab317d1.camel@icenowy.me>
Hi
Am 22.05.26 um 16:01 schrieb Icenowy Zheng:
> 在 2026-05-22五的 15:43 +0200,Thomas Zimmermann写道:
>> Hi
>>
>> Am 22.05.26 um 15:28 schrieb Ville Syrjälä:
>> [...]
>>>>>> But why does your HW use CRTC 1 in the first place.
>>>>> Could be eg. the enabled outputs can't be driven with CRTC 0.
> Yes, for many embedded display solutions the CRTC-connector map is
> totally fixed.
>
>>>>> 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".
>>>> The enable-status of each CRTC could change later on, which might
>>>> lead
>>>> to problems.
>>> Sound like a locking issue if someone is changing the configuration
>>> at the same time we're trying to do the vblank wait here.
>> I mean that the connected outputs could change at a later point or we
>> 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.
> What will happen if the "primary CRTC" is then disabled because of no
> connected connectors can be driven with it?
This happens during a client hotplug event. We'd re-detect all
connectors, pick the CRTC/output with the lowest spec as new primary and
mirror it to all other connected outputs.
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>> 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)
next prev parent reply other threads:[~2026-05-22 14:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 9:24 [PATCH] drm/client: check whether CRTC is active before waiting for vblank Icenowy Zheng
2026-05-19 9:41 ` Jani Nikula
2026-05-19 11:29 ` Icenowy Zheng
2026-05-22 9:23 ` Maarten Lankhorst
2026-05-22 9:48 ` Icenowy Zheng
2026-05-22 11:55 ` Thomas Zimmermann
2026-05-22 13:13 ` Ville Syrjälä
2026-05-22 13:24 ` Thomas Zimmermann
2026-05-22 13:28 ` Ville Syrjälä
2026-05-22 13:43 ` Thomas Zimmermann
2026-05-22 14:01 ` Icenowy Zheng
2026-05-22 14:09 ` Thomas Zimmermann [this message]
2026-05-22 19:39 ` Ville Syrjälä
2026-05-25 8:13 ` Maarten Lankhorst
2026-05-25 12:30 ` Ville Syrjälä
2026-05-26 11:14 ` Maarten Lankhorst
2026-05-26 14:49 ` Ville Syrjälä
2026-05-26 7:59 ` Thomas Zimmermann
2026-05-26 8:18 ` Icenowy Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06e079a3-c8ec-4e3f-99da-c776d35cedfe@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=uwu@icenowy.me \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox