mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Icenowy Zheng <zhengxingda@iscas.ac.cn>,
	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,
	Icenowy Zheng <uwu@icenowy.me>,
	stable@vger.kernel.org
Subject: Re: [PATCH] drm/client: check whether CRTC is active before waiting for vblank
Date: Tue, 26 May 2026 09:59:06 +0200	[thread overview]
Message-ID: <fbaaa197-bf04-4047-8e4e-88a60880f36a@suse.de> (raw)
In-Reply-To: <ahCw9zakihaGHLsN@intel.com>

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:
>> 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.
>>>>>
>>>>> 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.
> Actual mirroring may not be possible due to different modes supported
> 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)



  parent reply	other threads:[~2026-05-26  7:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  9:24 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
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 [this message]
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=fbaaa197-bf04-4047-8e4e-88a60880f36a@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 \
    --cc=zhengxingda@iscas.ac.cn \
    /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

Powered by JetHome