All of lore.kernel.org
 help / color / mirror / Atom feed
From: Meng Yi <meng.yi@nxp.com>
To: Stefan Agner <stefan@agner.ch>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
	"emil.l.velikov@gmail.com" <emil.l.velikov@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"alexander.stein@systec-electronic.com"
	<alexander.stein@systec-electronic.com>
Subject: RE: [PATCH] drm/fsl-dcu: Add gamma set for crtc
Date: Mon, 5 Sep 2016 07:32:57 +0000	[thread overview]
Message-ID: <DB6PR0401MB2631AB11D5B7F50A72B71238ECE60@DB6PR0401MB2631.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <4b00ac1e106b8814d480e08e4cb6d022@agner.ch>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2016-09-05 14:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  8:50 [PATCH] drm/fsl-dcu: Add gamma set for crtc Meng Yi
2016-07-18  7:03 ` Daniel Vetter
2016-09-02 21:22 ` Stefan Agner
2016-09-03 10:49   ` Mark Brown
2016-09-05  7:24     ` Stefan Agner
2016-09-12 16:35       ` Mark Brown
2016-09-13  3:02         ` Meng Yi
2016-09-05  2:28   ` Meng Yi
2016-09-05  7:17     ` Stefan Agner
2016-09-05  7:32       ` Meng Yi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6PR0401MB2631AB11D5B7F50A72B71238ECE60@DB6PR0401MB2631.eurprd04.prod.outlook.com \
    --to=meng.yi@nxp.com \
    --cc=alexander.stein@systec-electronic.com \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.