Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755338AbcJXKCR (ORCPT ); Mon, 24 Oct 2016 06:02:17 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:56699 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbcJXKCO (ORCPT ); Mon, 24 Oct 2016 06:02:14 -0400 Subject: Re: [PATCH v2] drm: tilcdc: implement palette loading for rev1 To: Bartosz Golaszewski , Jyri Sarha References: <1477298581-31291-1-git-send-email-bgolaszewski@baylibre.com> <9cabd4e2-b7a3-6925-e8a6-c399e96b537b@ti.com> CC: David Airlie , Kevin Hilman , Michael Turquette , Sekhar Nori , LKML , linux-drm , Laurent Pinchart , Peter Ujfalusi From: Tomi Valkeinen Message-ID: Date: Mon, 24 Oct 2016 13:02:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hTtN1XgUl7wpnJuUeqP5NrRs1w5vO26tU" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3637 Lines: 97 --hTtN1XgUl7wpnJuUeqP5NrRs1w5vO26tU Content-Type: multipart/mixed; boundary="G14p1jrrumAUHDOaUadgtq7uRvU7u6ied"; protected-headers="v1" From: Tomi Valkeinen To: Bartosz Golaszewski , Jyri Sarha Cc: David Airlie , Kevin Hilman , Michael Turquette , Sekhar Nori , LKML , linux-drm , Laurent Pinchart , Peter Ujfalusi Message-ID: Subject: Re: [PATCH v2] drm: tilcdc: implement palette loading for rev1 References: <1477298581-31291-1-git-send-email-bgolaszewski@baylibre.com> <9cabd4e2-b7a3-6925-e8a6-c399e96b537b@ti.com> In-Reply-To: --G14p1jrrumAUHDOaUadgtq7uRvU7u6ied Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 24/10/16 12:47, Bartosz Golaszewski wrote: > 2016-10-24 11:25 GMT+02:00 Jyri Sarha : >> On 10/24/16 11:43, Bartosz Golaszewski wrote: >>> Revision 1 of the IP doesn't work if we don't load the palette (even >>> if it's not used, which is the case for the RGB565 format). >>> >>> Add a function called from tilcdc_crtc_enable() which performs all >>> required actions if we're dealing with a rev1 chip. >>> >>> Signed-off-by: Bartosz Golaszewski >>> --- >>> v1 -> v2: >>> - only allocate dma memory for revision 1 >>> >> >> >> Is it enough to load the palette only once? What if lcdc is powered do= wn >> by power management in the middle? >> >> I think you should reinit the completion struct at least in >> tilcdc_pm_resume(), if not in tilcdc_crtc_disable(). >> >> Cheers, >> Jyri >> >=20 > Hi Jyri, >=20 > I ran the following test: >=20 > - tilcdc_crtc_enable() was called on device init > - ran modetest -M tilcdc -s 26:800x600@RG16 and quit > - waited for the screen to go blank > - tilcdc_crtc_disable() was called > - ran modetest again > - tilcdc_crtc_enable() was called again, this time without calling > tilcdc_crtc_load_palette() > - color bar still correctly displayed >=20 > Seems like it's only needed once. If the power management does its job properly, the IP will get reset when the IP is suspended. I'm quite sure it won't retain any palettes. Tomi --G14p1jrrumAUHDOaUadgtq7uRvU7u6ied-- --hTtN1XgUl7wpnJuUeqP5NrRs1w5vO26tU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYDdwbAAoJEPo9qoy8lh71rrMP/2tkHu/UVq0sML5frZwV+4jy LOAuCMc/TqETyjZRHfLTkkUtBhsNEM2JiFFw4TpMndDxWr5SCBgRUICE2+CCv0xC EZb6B87OpUMJHXYhX69Pygz95MG2ZCJxLssxi6pz2HenGCG7K9tpY8xt+6dFiUNo I+2eCReJAB4bOHCqY4RwfkR3X2Htlumg57aI0KyErUfLYnnSWRyhj9LfSNhnhgTT mQ5OqsgCWHOsSOJ5aFVQstZ2vba3juLQgZhZPSWOXxQxlrcIlWHpow4Z8Cfz1maq +tokhWUKgv7wpMJnO67mLvgODMGVZu0YQIhChcKivRvxxYMQ5RekL9GlpddPPl/r gbx0uSrwYX/XiujNxeqXvRlA1Nk+TwARRSt5Jb3Y14tyy/bqjp5CBuOSiEsGgzbP gf2Xo/iGXrVl1fe+2okpWrxLo0+g3C5nf7MSmJ9RkIQCcYt6kG1VJJw+q4Glep2d nW7t7Tla0+UisrRb0Lw2Jzk3aEhfTvnLzJqXif0ts5IdmI+DvWiMcaOQadztfqx5 iqR7ZuFQ/HaJ9vDMmA6tJnFoRsX/VnkXTUG74/ByyYGiErfhvFoKv2+CHmJCN3kg 2MhnI10IhHX+LexZ+mKyJ07B3HQOKU0tUY6WCCLEKGoHFvpeeVzeXqqE4bRWskGI 8JQQ991gWqybnBLr7cB+ =sqty -----END PGP SIGNATURE----- --hTtN1XgUl7wpnJuUeqP5NrRs1w5vO26tU--