[PATCH] drm/fsl-dcu: Add gamma set for crtc

Mark Brown broonie at kernel.org
Sat Sep 3 10:49:44 UTC 2016


On Fri, Sep 02, 2016 at 02:22:46PM -0700, Stefan Agner wrote:
> Hi Meng, hi Mark,
> 
> [added Mark Brown to discuss the endian issue]

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

> > + */
> > +static u32 swap_bytes(u16 var)

> We certainly don't want a byte swapping function in the driver. I am
> sure Linux has appropriate functions for that already, however, I am not
> convinced that we need that at all.

cpu_to_be16() and so on.

> I guess the problem is that regmap_write does byte swapping because
> ls1021a.dtsi defines the whole DCU register space to be big-endian. So
> you end up doing byte swapping twice.

> If the gamma area is really little-endian, then DCU on LS1021a seems to
> be quite a mess... :-(

Let's figure out what the hardware does first, espcially given that it's
this chip where we seem to be seeing a lot of confusion about endianness
issues.

> @Mark, what do you think? Do we have a (better) solution for such cases?

Is this area of the register map perhaps supposed to be accessed as a
byte stream?

Please don't add randomm characters that don't mean anything before
people's names, it doesn't help make things legible especially when
they're scanning through enormous quantities of text.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160903/40a6d8b2/attachment.sig>


More information about the dri-devel mailing list