[PATCH] drm/sun4i: Workaround TCON TOP conflict between DE0 and DE1

John Watts contact at jookia.org
Wed Nov 13 08:15:59 UTC 2024


Hi,

On Wed, Nov 13, 2024 at 11:40:14AM +0530, Parthiban wrote:
> No, Mixers in upstream refers to RT-Mixers inside the DE. It's only the
> quirk for R40/D1 setting the DE ports using mixer numbering.

After an hour or two of spelunking the code base, I'm still not sure about this.

Confusables:

- sun8i_tcon_top_de_config uses 'mixer' instead of DE
- The datasheet for TCON TOP mentions DEs
- The DT documentation for TCON TOP only mentions mixers
- Only mixers are passed to the TCON TOP DT
- Allwinner's tcon_de_attach works on systems without two DEs
- Allwinner's tcon_de_attach special cases systems with two DEs
- Allwinner's tcon_de_attach implies theres two TCON TOPs for two DEs

However sun8i_r40_tcon_tv_set_mux seems to clear this up:

- The register value is found using the remote endpoint reg
- tcon_top_mixer0_out specifies 0 and 2 for lcd0 and tv0
- tcon_top_mixer1_out also specifies 0 and 2 for lcd0 and tv0
- The 'mixer' is engine->id
- engine->id is found using sun4i_tcon_find_engine
- It gets the id from the endpoint number
- mixer0 has id 0
- mixer0 has id 1
- there's one engine struct per mixer and display-backend

It really seems like the code means mixers here.

> > Hmm. Are you sure? Looking at the Allwinner drivers it has the method
> > de_top_set_de2tcon_mux in
> > drivers/video/fbdev/sunxi/disp2/disp/de/lowlevel_v33x/de330/de_top.c
> > which I think means it's for DE3? But I don't see it called anywhere?
> 
> Missing in the upstream. 

So if Allwinner and mainline don't use it, what does?

> So far there is no real user for DE1 in upstream. DE_PORT_SELECT_REG value for
> DE1 can be negate of DE0, so that they won't conflict or cause timing issues.

If my thoughts are correct, this would break use of mixer0 and mixer1 at the
same time.

> Also DE_PORT_SELECT_REG mentions only about TV and LCD muxing, but missing HDMI,
> DSI and so.
> 
> Otherwise, if I get DE1 working in A133, I will try to add quirk to set DE0 and
> DE1 port mapping in that case to respective connector.
> 
> Thanks,
> Parthiban

Thanks,
John Watts.


More information about the dri-devel mailing list