Re: [PATCH v2 07/17] drm/spacemit: add Saturn DPU register model
From: Icenowy Zheng
Date: Wed Nov 18 2026 - 05:19:27 EST
在 2026-11-17二的 16:48 -0500,Guodong Xu写道:
> Hi Icenowy,
>
> On Thu, 03 Sep 2026 20:08:10 +0800, Icenowy Zheng wrote:
> > 在 2026-08-09日的 21:14 +0800,Cody Kang via B4 Relay写道:
> > > drivers/gpu/drm/spacemit/dpu/saturn_regs/dpu_int.h | 25 ++
> >
> > Is the slightly different K1 Saturn DPU registers considered?
>
> I compared them with the K1 BSP you mentioned offline [1]. Judging by
> the block, field and interrupt macro names, I agree with you that the
> K1 and the K3 use similar IP. But there are also important
> differences between the K1 and K3 registers, which is why I would not
> propose reusing these tables.
>
> For example, the blocks sit at different addresses, and most fields
> are at a different word or bit. In dpu_int.h, CFG_RDY_CLR is bit 4 on
> the K1 and bit 5 on the K3, and the underrun bit is 9 and 8.
Yes, this IP weirdly doesn't consider register map compatiblity at all.
>
> IMHO a K1 port should add its own compatible, its own field header
Well I don't think field headers would work for a mainlined driver;
maybe things like regmap_field could be used to mitigate the
difference.
Surely a compatible string for K1 would be needed, and it might then
set a device info structure as match data, containing the device
capability and regmap_field list.
Thanks,
Icenowy
> and its own backend file next to the K3 ones. What do you think?
> Hopefully you agree with me.
>
> [1]
> https://github.com/spacemit-com/linux-6.6/tree/k1-bl-v2.2.y/drivers/gpu/drm/spacemit/dpu/saturn_regs
>
> Guodong