[PATCH 1/9] dt-bindings: mxsfb: Add compatible for i.MX8MP
Liu Ying
victor.liu at oss.nxp.com
Tue Mar 1 02:44:52 UTC 2022
On Mon, 2022-02-28 at 16:34 +0100, Marek Vasut wrote:
> On 2/28/22 09:18, Liu Ying wrote:
>
> Hi,
Hi,
>
> > > > On Mon, 2022-02-28 at 01:45 +0100, Marek Vasut wrote:
> > > > > Add compatible string for i.MX8MP LCDIF variant. This is called LCDIFv3
> > > > > and is completely different from the LCDIFv3 found in i.MX23 in that it
> > > >
> > > > In i.MX23 reference manual, there is no LCDIFv3 found, but only LCDIF.
> > >
> > > See i.MX23 HW_LCDIF_VERSION MAJOR=0x3 , that's LCDIF V3 . MX28 has LCDIF
> > > V4 .
> >
> > Ok, got it now. AFAIK, the SoC design team calls i.MX8MP display
> > controller as 'LCDIFv3'. Those in other SoCs are called 'LCDIF'. There
> > is not even a register in i.MX8MP display controller to decribe the
> > version.
>
> We also don't have a version register on MX6SX and we call it LCDIF V6
> in the driver. The naming scheme is confusing.
It looks ok for the current mxsfb drm driver to use its own version
tracking mechanism to distinguish kinda small difference across LCDIF
variants. However, LCDIFv3 in i.MX8mp is a totally different IP, which
does not apply to the tracking mechanism.
>
> > > > > has a completely scrambled register layout compared to all previous LCDIF
> > > >
> > > > It looks like no single register of i.MX8MP LCDIFv3 overlaps with
> > > > registers in other i.MX2x/6x/7x/8x LCDIFs. The LCDIFv3 block diagram is
> > > > totally different from the LCDIF block diagram, according to the SoC
> > > > reference manuals. LCDIFv3 supports SHADOW_EN bit to update horizontal
> > > > and vertical size of graphic, position of graphic on the panel, address
> > > > of graphic in memory and color formats or color palettes, which is not
> > > > supported by LCDIF and impacts display driver control mechanism
> > > > considerably. LCDIF supports DOTCLK interface, MPU interface and VSYNC
> > > > interface, while LCDIFv3 only supports parallel output as a counterpart
> > > > of the DOTCLK interface.
> > > >
> > > > Generally speaking, LCDIFv3 is just a new display IP which happens to
> > > > have the word 'LCDIF' in its name. Although both of LCDIFv3 and LCDIF
> > > > are display controllers for scanning out frames onto display devices, I
> > > > don't think they are in one family.
> > > >
> > > > So, LCDIFv3 deserves a new separate dt-binding, IMO.
> > >
> > > It seems to me a lot of those bits just map to their previous
> > > equivalents in older LCDIF, others were dropped, so this is some sort of
> > > new LCDIF mutation, is it not ?
> >
> > I say 'LCDIFv3' and 'LCDIF' are totally two IPs, if I compare the names
> > of registers and the names of register bits .
> >
> > > I am aware NXP has a separate driver in its downstream, but I'm not
> > > convinced the duplication of boilerplate code by introducing a separate
> > > driver for what looks like another LCDIF variant is the right approach.
> >
> > Hmmm, given the two IPs, I think there should be separate drivers.
> > With one single driver, there would be too many 'if/else' checks to
> > separate the logics for the IPs, just like Patch 9/9 does. The
> > boilerplate code to do things like registering a drm device is
> > acceptable, IMO.
> >
> > Aside from that, with separate drivers, we don't have to test too many
> > SoCs if we only want to touch either 'LCDIFv3' or 'LCDIF'.
>
> But then, with two drivers, you also might miss fixes which get applied
> to one driver and not the other, eventually the two drivers will diverge
> and that's not good.
Given the two totally different IPs, I don't see bugs of IP control
logics should be fixed for both drivers. Naturally, the two would
diverge due to different HWs. Looking at Patch 9/9, it basically
squashes code to control LCDIFv3 into the mxsfb drm driver with
'if/else' checks(barely no common control code), which is hard to
maintain and not able to achieve good scalability for both 'LCDIFv3'
and 'LCDIF'.
>
> I might wait for opinion from the others whether this should be one or
> two drivers.
>
> btw is there any plan to have LCDIFv4 or this LCDIFv3 in some other SoC
> than iMX8MP ?
I don't think this kind of information significantly impacts the
decision on two drivers or one. And, I cannot share that until the
company unveils.
More information about the dri-devel
mailing list