From: Thomas Zimmermann <tzimmermann@suse.de>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>,
Jianmin Lv <lvjianmin@loongson.cn>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Qianhai Wu <wuqianhai@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Mingcong Bai <jeffbai@aosc.io>, Xi Ruoyao <xry111@xry111.site>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/loongson: stop to set get_vblank_timestamp for LS7A1000 CRTC
Date: Mon, 23 Mar 2026 14:32:05 +0100 [thread overview]
Message-ID: <f98ea316-f7f7-4506-aead-4658f2a03c8d@suse.de> (raw)
In-Reply-To: <ce8f801931ddde8b12086eb560e628a39e79b58c.camel@iscas.ac.cn>
Hi
Am 23.03.26 um 12:42 schrieb Icenowy Zheng:
[...]
>>> drm_update_vblank_count+0xac/0x418
>>> [ 0.334960] [<ffffffff80be6270>] drm_vblank_enable+0xf0/0x288
>>> [ 0.334960] [<ffffffff80be7010>] drm_vblank_get+0xf8/0x160
>>> [ 0.334960] [<ffffffff80beb2e0>]
>>> drm_client_modeset_wait_for_vblank+0x50/0xa0
> I doubt the problem here is that the function above is called with
> hardcoded 0 by drm_fb_helper_fb_dirty() (being inlined into
> drm_fb_helper_damage_work() by the compiler). Then on my setup it
> failed because my primary output (laptop LCD) is on CRTC 1 (CRTC 0 is
> external HDMI instead).
The CRTC 0 has vblank interrupt. The CRTC 1 does not. Is that correct?
>
> This is new behavior introduced by d8c4bddcd8bc ("drm/fb-helper:
> Synchronize dirty worker with vblank"), and the commit messages say
> `This allows several screen updates to pile up and acts as a rate
> limiter.` .
This should work if the vblanks are configured correctly.
>
> Should it wait for any vblanks instead of waiting for one on CRTC 0 ?
> (Or check whether CRTC 0 is on before waiting on it?)
It should only wait for the vblank on the CRTC it uses (1 in your case).
Best regards
Thomas
>
> Thanks,
> Icenowy
>
>>> [ 0.334960] [<ffffffff80c0a144>]
>>> drm_fb_helper_damage_work+0x8c/0x1d8
>>> [ 0.334960] [<ffffffff8028fac8>] process_one_work+0x198/0x348
>>> [ 0.334960] [<ffffffff802906c0>] worker_thread+0x238/0x390
>>> [ 0.334960] [<ffffffff8029c0d8>] kthread+0x160/0x198
>>> [ 0.334960] [<ffffffff8021fd8c>]
>>> ret_from_kernel_thread+0x14/0x1c
>>>
>>> [ 0.334960] ---[ end trace 0000000000000000 ]---
>>> ```
>>>
>>>>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>>>> Oh forgot to attach when crafting v2:
>>>>>
>>>>> ```
>>>>> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>>>>> ```
>>>>>
>>>>>> ---
>>>>>> Changes in v2:
>>>>>> - Re-formatted Loongson product model numbers per request
>>>>>> from
>>>>>> Huacai.
>>>>>>
>>>>>> drivers/gpu/drm/loongson/lsdc_crtc.c | 1 -
>>>>>> 1 file changed, 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/loongson/lsdc_crtc.c
>>>>>> b/drivers/gpu/drm/loongson/lsdc_crtc.c
>>>>>> index 587fbe285e9ef..b3af8e0cdb15f 100644
>>>>>> --- a/drivers/gpu/drm/loongson/lsdc_crtc.c
>>>>>> +++ b/drivers/gpu/drm/loongson/lsdc_crtc.c
>>>>>> @@ -721,7 +721,6 @@ static const struct drm_crtc_funcs
>>>>>> ls7a1000_crtc_funcs = {
>>>>>> .late_register = lsdc_crtc_late_register,
>>>>>> .enable_vblank = lsdc_crtc_enable_vblank,
>>>>>> .disable_vblank = lsdc_crtc_disable_vblank,
>>>>>> - .get_vblank_timestamp =
>>>>>> drm_crtc_vblank_helper_get_vblank_timestamp,
>>>>>> .atomic_print_state = lsdc_crtc_atomic_print_state,
>>>>>> };
>>>>>>
--
--
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-03-23 13:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 9:28 Icenowy Zheng
2026-03-21 9:29 ` Icenowy Zheng
2026-03-23 3:40 ` Jianmin Lv
2026-03-23 9:40 ` Icenowy Zheng
2026-03-23 10:31 ` Thomas Zimmermann
2026-03-23 11:42 ` Icenowy Zheng
2026-03-23 13:32 ` Thomas Zimmermann [this message]
2026-03-23 14:33 ` Icenowy Zheng
2026-03-23 7:10 ` Thomas Zimmermann
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=f98ea316-f7f7-4506-aead-4658f2a03c8d@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeffbai@aosc.io \
--cc=linux-kernel@vger.kernel.org \
--cc=lvjianmin@loongson.cn \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=wuqianhai@loongson.cn \
--cc=xry111@xry111.site \
--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
all inboxes | Powered by JetHome®