From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] drm/fsl-dcu: Add gamma set for crtc Date: Sat, 3 Sep 2016 11:49:44 +0100 Message-ID: <20160903104944.GS3950@sirena.org.uk> References: <1468572653-40332-1-git-send-email-meng.yi@nxp.com> <5799ef43cf2ec6c3053a08eefd6cde8e@agner.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0129148844==" Return-path: Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [IPv6:2400:8900::f03c:91ff:fedb:4f4]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB0B66E1A7 for ; Sat, 3 Sep 2016 10:50:03 +0000 (UTC) In-Reply-To: <5799ef43cf2ec6c3053a08eefd6cde8e@agner.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Stefan Agner Cc: Meng Yi , emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org, alexander.stein@systec-electronic.com List-Id: dri-devel@lists.freedesktop.org --===============0129148844== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1AtvaQRkIQxkm1Oe" Content-Disposition: inline --1AtvaQRkIQxkm1Oe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 02, 2016 at 02:22:46PM -0700, Stefan Agner wrote: > Hi Meng, hi Mark, >=20 > [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. --1AtvaQRkIQxkm1Oe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJXyqrHAAoJECTWi3JdVIfQxk4H/A6Lj/LyjyKjt5uZAqHhk22p pb0Fqvy9WtYzTzOAa1rTn82+N8pHSfluVev03Sw/TKDGrT46li5v+ZrquAMpp1j6 FbMHoDvYt0FVf0TmCeH+1ByTSR7bfcw1cR1Q+d6HbH/aA34b5rVz4HdNuttDmCZV oLJeM9BCNOxauefoANq77npQl86BtmyBFPq6poja0zivuAdeIoe7Bk2QnjW66M7n xq1ZWdeZT0Oz7oCLwMfGHbTtCoNBUnprhN0jYvKKkUiCUThp7X9a6MfhmtwF0LJu iEL5cDQqXJQFYAK8e9eWRuRU9LYHiXNkJx2DbLTpIpO4YL+eXxUcFN44QL23F7g= =CUKS -----END PGP SIGNATURE----- --1AtvaQRkIQxkm1Oe-- --===============0129148844== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0129148844==--