[PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC

Icenowy Zheng posted 1 patch 3 weeks, 2 days ago
drivers/gpu/drm/loongson/lsdc_crtc.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Icenowy Zheng 3 weeks, 2 days ago
As there's no known hardware capability about querying vblank on the
7A1000 display controller, setting get_vblank_timestamp will mislead the
kernel about the support of DC-backed high precision vblank query.

Drop this function pointer in the CRTC function table for 7A1000.

This solves a kernel warning when booting Linux 7.0-rc3 on a
3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for replicating
the display timing set by the firmware).

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
 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,
 };
 
-- 
2.52.0
Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Thomas Zimmermann 3 weeks ago

Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
> As there's no known hardware capability about querying vblank on the
> 7A1000 display controller, setting get_vblank_timestamp will mislead the
> kernel about the support of DC-backed high precision vblank query.
>
> Drop this function pointer in the CRTC function table for 7A1000.
>
> This solves a kernel warning when booting Linux 7.0-rc3 on a
> 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for replicating
> the display timing set by the firmware).
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   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)


Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Icenowy Zheng 2 weeks, 6 days ago
在 2026-03-16一的 08:53 +0100,Thomas Zimmermann写道:
> 
> 
> Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
> > As there's no known hardware capability about querying vblank on
> > the
> > 7A1000 display controller, setting get_vblank_timestamp will
> > mislead the
> > kernel about the support of DC-backed high precision vblank query.
> > 
> > Drop this function pointer in the CRTC function table for 7A1000.
> > 
> > This solves a kernel warning when booting Linux 7.0-rc3 on a
> > 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for
> > replicating
> > the display timing set by the firmware).
> > 
> > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> 
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

Well, is my following understand right?

- A hardware that does not have hardware vblank timing/counting ability
shouldn't set .get_vblank_timestamp .
- A hardware that supports vblank counting but not timing should set
.get_vblank_timestamp to the
drm_crtc_vblank_helper_get_vblank_timestamp helper to allow vblank
timing estimate with counter.

(P.S. There's a DisplayCurrentLocation register that is valid for
7A1000, which returns the current X and Y positions; but I wonder
whether this is meaningful for vblank querying.
In addition, this DC looks quite similar to Verisilicon DCNano, which
was used by i.MX8ULP (although many functionality on the i.MX8ULP
manual is missing, things until cursor0 match between LS7A2000 manual
and i.MX8ULP manual). I wonder whether NXP people abandoned the
mainlining of DCNano driver because of drm/loongson?)

P.S.2. I saw that Sui Jingfeng's mailbox is bouncing and the driver is
going to be orphaned. If he wouldn't react with other ways, maybe I
could try to maintain this driver? I have Loongson-3A4000 + LS7A1000
and Loongson-3A6000 + LS7A2000 hardwares at home.

> 
> > ---
> >   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,
> >   };
> >   
Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Thomas Zimmermann 2 weeks, 5 days ago
Hi

Am 18.03.26 um 07:16 schrieb Icenowy Zheng:
> 在 2026-03-16一的 08:53 +0100,Thomas Zimmermann写道:
>>
>> Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
>>> As there's no known hardware capability about querying vblank on
>>> the
>>> 7A1000 display controller, setting get_vblank_timestamp will
>>> mislead the
>>> kernel about the support of DC-backed high precision vblank query.
>>>
>>> Drop this function pointer in the CRTC function table for 7A1000.
>>>
>>> This solves a kernel warning when booting Linux 7.0-rc3 on a
>>> 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for
>>> replicating
>>> the display timing set by the firmware).
>>>
>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> Well, is my following understand right?
>
> - A hardware that does not have hardware vblank timing/counting ability
> shouldn't set .get_vblank_timestamp .
> - A hardware that supports vblank counting but not timing should set
> .get_vblank_timestamp to the
> drm_crtc_vblank_helper_get_vblank_timestamp helper to allow vblank
> timing estimate with counter.

Setting drm_crtc_vblank_helper_get_vblank_timestamp() also requires to 
read out the x/y positions. See get_scanout_position. You can leave out 
get_vblank_timestamp entirely and DRM will approximate the values with 
the system timer. For reading the vblank counter, there's 
get_vblank_counter if the hardware supports it.
>
> (P.S. There's a DisplayCurrentLocation register that is valid for
> 7A1000, which returns the current X and Y positions; but I wonder
> whether this is meaningful for vblank querying.

That sounds like the functionality required for get_scanout_position.

> In addition, this DC looks quite similar to Verisilicon DCNano, which
> was used by i.MX8ULP (although many functionality on the i.MX8ULP
> manual is missing, things until cursor0 match between LS7A2000 manual
> and i.MX8ULP manual). I wonder whether NXP people abandoned the
> mainlining of DCNano driver because of drm/loongson?)

IDK anything about that.


> P.S.2. I saw that Sui Jingfeng's mailbox is bouncing and the driver is
> going to be orphaned. If he wouldn't react with other ways, maybe I
> could try to maintain this driver? I have Loongson-3A4000 + LS7A1000
> and Loongson-3A6000 + LS7A2000 hardwares at home.

Yes, the driver is now orphaned.  No one else from Loongson has shown up 
to maintain it either. If you want it, just send a patch to add you as 
maintainer with a short rational.

Best regards
Thomas

>
>>> ---
>>>    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)


Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Huacai Chen 2 weeks, 5 days ago
Hi, Thomas,

On Wed, Mar 18, 2026 at 3:19 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 18.03.26 um 07:16 schrieb Icenowy Zheng:
> > 在 2026-03-16一的 08:53 +0100,Thomas Zimmermann写道:
> >>
> >> Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
> >>> As there's no known hardware capability about querying vblank on
> >>> the
> >>> 7A1000 display controller, setting get_vblank_timestamp will
> >>> mislead the
> >>> kernel about the support of DC-backed high precision vblank query.
> >>>
> >>> Drop this function pointer in the CRTC function table for 7A1000.
> >>>
> >>> This solves a kernel warning when booting Linux 7.0-rc3 on a
> >>> 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for
> >>> replicating
> >>> the display timing set by the firmware).
> >>>
> >>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> >> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Well, is my following understand right?
> >
> > - A hardware that does not have hardware vblank timing/counting ability
> > shouldn't set .get_vblank_timestamp .
> > - A hardware that supports vblank counting but not timing should set
> > .get_vblank_timestamp to the
> > drm_crtc_vblank_helper_get_vblank_timestamp helper to allow vblank
> > timing estimate with counter.
>
> Setting drm_crtc_vblank_helper_get_vblank_timestamp() also requires to
> read out the x/y positions. See get_scanout_position. You can leave out
> get_vblank_timestamp entirely and DRM will approximate the values with
> the system timer. For reading the vblank counter, there's
> get_vblank_counter if the hardware supports it.
> >
> > (P.S. There's a DisplayCurrentLocation register that is valid for
> > 7A1000, which returns the current X and Y positions; but I wonder
> > whether this is meaningful for vblank querying.
>
> That sounds like the functionality required for get_scanout_position.
>
> > In addition, this DC looks quite similar to Verisilicon DCNano, which
> > was used by i.MX8ULP (although many functionality on the i.MX8ULP
> > manual is missing, things until cursor0 match between LS7A2000 manual
> > and i.MX8ULP manual). I wonder whether NXP people abandoned the
> > mainlining of DCNano driver because of drm/loongson?)
>
> IDK anything about that.
>
>
> > P.S.2. I saw that Sui Jingfeng's mailbox is bouncing and the driver is
> > going to be orphaned. If he wouldn't react with other ways, maybe I
> > could try to maintain this driver? I have Loongson-3A4000 + LS7A1000
> > and Loongson-3A6000 + LS7A2000 hardwares at home.
>
> Yes, the driver is now orphaned.  No one else from Loongson has shown up
> to maintain it either. If you want it, just send a patch to add you as
> maintainer with a short rational.
New maintainers are coming:
https://lore.kernel.org/lkml/20260318092349.11651-1-lvjianmin@loongson.cn/

Huacai

>
> Best regards
> Thomas
>
> >
> >>> ---
> >>>    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)
>
>
Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Icenowy Zheng 2 weeks, 5 days ago
在 2026-03-18三的 08:09 +0100,Thomas Zimmermann写道:
> Hi
> 
> Am 18.03.26 um 07:16 schrieb Icenowy Zheng:
> > 在 2026-03-16一的 08:53 +0100,Thomas Zimmermann写道:
> > > 
> > > Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
> > > > As there's no known hardware capability about querying vblank
> > > > on
> > > > the
> > > > 7A1000 display controller, setting get_vblank_timestamp will
> > > > mislead the
> > > > kernel about the support of DC-backed high precision vblank
> > > > query.
> > > > 
> > > > Drop this function pointer in the CRTC function table for
> > > > 7A1000.
> > > > 
> > > > This solves a kernel warning when booting Linux 7.0-rc3 on a
> > > > 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for
> > > > replicating
> > > > the display timing set by the firmware).
> > > > 
> > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Well, is my following understand right?
> > 
> > - A hardware that does not have hardware vblank timing/counting
> > ability
> > shouldn't set .get_vblank_timestamp .
> > - A hardware that supports vblank counting but not timing should
> > set
> > .get_vblank_timestamp to the
> > drm_crtc_vblank_helper_get_vblank_timestamp helper to allow vblank
> > timing estimate with counter.
> 
> Setting drm_crtc_vblank_helper_get_vblank_timestamp() also requires
> to 
> read out the x/y positions. See get_scanout_position. You can leave
> out 
> get_vblank_timestamp entirely and DRM will approximate the values
> with 
> the system timer. For reading the vblank counter, there's 
> get_vblank_counter if the hardware supports it.

It seems that the loongson driver already implemented
.get_scanout_position hook.

Is both .get_scanout_position and .get_vblank_counter requirement for
drm_crtc_vblank_helper_get_vblank_timestamp() to work?

> > 
> > (P.S. There's a DisplayCurrentLocation register that is valid for
> > 7A1000, which returns the current X and Y positions; but I wonder
> > whether this is meaningful for vblank querying.
> 
> That sounds like the functionality required for get_scanout_position.
> 
> > In addition, this DC looks quite similar to Verisilicon DCNano,
> > which
> > was used by i.MX8ULP (although many functionality on the i.MX8ULP
> > manual is missing, things until cursor0 match between LS7A2000
> > manual
> > and i.MX8ULP manual). I wonder whether NXP people abandoned the
> > mainlining of DCNano driver because of drm/loongson?)
> 
> IDK anything about that.

Well I wonder about such kind of "similar display hardware on different
bus" things, because PCI devices usually use different memory
management system than platform devices (the former usually use TTM and
the latter usually directly use dma memory).

In fact LS7A1000 contains a Vivante GPU that isn't supported by etnaviv
driver yet (and the etnaviv driver now hardcodes to use DMA memory,
although the GPU has private memory that is shared with DC (currently
managed by DC driver's TTM)).

> 
> 
> > P.S.2. I saw that Sui Jingfeng's mailbox is bouncing and the driver
> > is
> > going to be orphaned. If he wouldn't react with other ways, maybe I
> > could try to maintain this driver? I have Loongson-3A4000 +
> > LS7A1000
> > and Loongson-3A6000 + LS7A2000 hardwares at home.
> 
> Yes, the driver is now orphaned.  No one else from Loongson has shown
> up 
> to maintain it either. If you want it, just send a patch to add you
> as 
> maintainer with a short rational.
> 
> Best regards
> Thomas
> 
> > 
> > > > ---
> > > >    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,
> > > >    };
> > > >    
Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Thomas Zimmermann 2 weeks, 5 days ago
Hi

Am 18.03.26 um 08:15 schrieb Icenowy Zheng:
> 在 2026-03-18三的 08:09 +0100,Thomas Zimmermann写道:
>> Hi
>>
>> Am 18.03.26 um 07:16 schrieb Icenowy Zheng:
>>> 在 2026-03-16一的 08:53 +0100,Thomas Zimmermann写道:
>>>> Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
>>>>> As there's no known hardware capability about querying vblank
>>>>> on
>>>>> the
>>>>> 7A1000 display controller, setting get_vblank_timestamp will
>>>>> mislead the
>>>>> kernel about the support of DC-backed high precision vblank
>>>>> query.
>>>>>
>>>>> Drop this function pointer in the CRTC function table for
>>>>> 7A1000.
>>>>>
>>>>> This solves a kernel warning when booting Linux 7.0-rc3 on a
>>>>> 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for
>>>>> replicating
>>>>> the display timing set by the firmware).
>>>>>
>>>>> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>>>> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> Well, is my following understand right?
>>>
>>> - A hardware that does not have hardware vblank timing/counting
>>> ability
>>> shouldn't set .get_vblank_timestamp .
>>> - A hardware that supports vblank counting but not timing should
>>> set
>>> .get_vblank_timestamp to the
>>> drm_crtc_vblank_helper_get_vblank_timestamp helper to allow vblank
>>> timing estimate with counter.
>> Setting drm_crtc_vblank_helper_get_vblank_timestamp() also requires
>> to
>> read out the x/y positions. See get_scanout_position. You can leave
>> out
>> get_vblank_timestamp entirely and DRM will approximate the values
>> with
>> the system timer. For reading the vblank counter, there's
>> get_vblank_counter if the hardware supports it.
> It seems that the loongson driver already implemented
> .get_scanout_position hook.
>
> Is both .get_scanout_position and .get_vblank_counter requirement for
> drm_crtc_vblank_helper_get_vblank_timestamp() to work?

Just grep for it [1]. You won't need a HW counter nor the HW X/Y 
position. If neither exists, DRM will estimate these values from the 
system timer and the display mode's pixel clock. The goal here is to 
correctly estimate the time of the next page flip. HW support helps with 
calculating that time, but is not strictly necessary.

[1] 
https://elixir.bootlin.com/linux/v6.19.8/source/drivers/gpu/drm/drm_vblank.c#L232

Best regards
Thomas

>
>>> (P.S. There's a DisplayCurrentLocation register that is valid for
>>> 7A1000, which returns the current X and Y positions; but I wonder
>>> whether this is meaningful for vblank querying.
>> That sounds like the functionality required for get_scanout_position.
>>
>>> In addition, this DC looks quite similar to Verisilicon DCNano,
>>> which
>>> was used by i.MX8ULP (although many functionality on the i.MX8ULP
>>> manual is missing, things until cursor0 match between LS7A2000
>>> manual
>>> and i.MX8ULP manual). I wonder whether NXP people abandoned the
>>> mainlining of DCNano driver because of drm/loongson?)
>> IDK anything about that.
> Well I wonder about such kind of "similar display hardware on different
> bus" things, because PCI devices usually use different memory
> management system than platform devices (the former usually use TTM and
> the latter usually directly use dma memory).
>
> In fact LS7A1000 contains a Vivante GPU that isn't supported by etnaviv
> driver yet (and the etnaviv driver now hardcodes to use DMA memory,
> although the GPU has private memory that is shared with DC (currently
> managed by DC driver's TTM)).
>
>>
>>> P.S.2. I saw that Sui Jingfeng's mailbox is bouncing and the driver
>>> is
>>> going to be orphaned. If he wouldn't react with other ways, maybe I
>>> could try to maintain this driver? I have Loongson-3A4000 +
>>> LS7A1000
>>> and Loongson-3A6000 + LS7A2000 hardwares at home.
>> Yes, the driver is now orphaned.  No one else from Loongson has shown
>> up
>> to maintain it either. If you want it, just send a patch to add you
>> as
>> maintainer with a short rational.
>>
>> Best regards
>> Thomas
>>
>>>>> ---
>>>>>     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)


Re: [PATCH] drm/loongson: stop to set get_vblank_timestamp for 7A1000 CRTC
Posted by Huacai Chen 3 weeks ago
Hi, Icenowy,

On Mon, Mar 16, 2026 at 3:53 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
>
>
> Am 14.03.26 um 17:54 schrieb Icenowy Zheng:
> > As there's no known hardware capability about querying vblank on the
> > 7A1000 display controller, setting get_vblank_timestamp will mislead the
> > kernel about the support of DC-backed high precision vblank query.
> >
> > Drop this function pointer in the CRTC function table for 7A1000.
> >
> > This solves a kernel warning when booting Linux 7.0-rc3 on a
> > 3A4000+7A1000 Haier Boyue G51 laptop (with injected EDID for replicating
Please s/3A4000/Loongson-3A4000/g and s/7A1000/LS7A1000/g, thanks.

Huacai

> > the display timing set by the firmware).
> >
> > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> > ---
> >   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)
>
>