[PATCH] drm/fsl-dcu: Add gamma set for crtc
Meng Yi
meng.yi at nxp.com
Mon Sep 5 07:32:57 UTC 2016
Hi Stefan,
> >
> > This is a errta for DCU, Gamma registers are supposed to be big
> > endian, but actually it is little endian, do we
> > Really need to create a second regmap?
>
> Do you have the exact wording of the errata?
Below is the description from hardware team.
Affects: 2D-ACE
Description: Gamma_R, Gamma_G and Gamma_B registers are little-endian registers while the rest of the
address-space in 2D-ACE is big-endian. 2D-ACE Gamma_R, Gamma_G and Gamma_B
registers are 32 bit registers, where the first 24 bits are reserved and last 8 bits denote the
gamma value. Because of a connection issue in the device, the first 8-bit [31:24] is connected
and the rest of the 24-bits[23:0] are reserved.
Impact: Gamma registers are not configurable.
Workaround: Perform the byte_swapping for Gamma_[R/G/B]_registers.
For example: While writing 0000_00ABh to any of the gamma registers, byte swap the data so
it results in AB00_0000h. Write this value to the gamma register.
>
> There are two problems to the current approach: First, the two byte
> swaps (yours and then the byte swap due to the big-endian configuration
> of regmap) seems ugly to me. Second, the gamma value is the lowest byte
> in Vybrid, and on Vybrid the regmap is configured little-endian. Hence
> your code won't work on Vybrid... Therefor I still think that using a
> second regmap would be nicer.
>
Oh sorry, I ignored there are two platforms. Using regmap according to DTS is nicer.
Best Regards,
Meng
More information about the dri-devel
mailing list