From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH v3 3/3] drm/omapdrm: Implement gamma_lut atomic crtc property Date: Tue, 24 May 2016 16:53:03 +0300 Message-ID: <57445CBF.7030303@ti.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0391086208==" Return-path: Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [198.47.19.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id B74CF6E787 for ; Tue, 24 May 2016 13:53:12 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jyri Sarha , dri-devel@lists.freedesktop.org Cc: peter.ujfalusi@ti.com, laurent.pinchart@ideasonboard.com List-Id: dri-devel@lists.freedesktop.org --===============0391086208== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cp2Bu2HckqWangfw81Pc9sg8F2qep9jqO" --cp2Bu2HckqWangfw81Pc9sg8F2qep9jqO Content-Type: multipart/mixed; boundary="qaHHBHlJeV7XK2m873KJHfMMxmVtfuoI3" From: Tomi Valkeinen To: Jyri Sarha , dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, peter.ujfalusi@ti.com, bparrot@ti.com, laurent.pinchart@ideasonboard.com Message-ID: <57445CBF.7030303@ti.com> Subject: Re: [PATCH v3 3/3] drm/omapdrm: Implement gamma_lut atomic crtc property References: In-Reply-To: --qaHHBHlJeV7XK2m873KJHfMMxmVtfuoI3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 24/05/16 12:16, Jyri Sarha wrote: > Implement gamma_lut atomic crtc property, set crtc gamma size to 256 > for all crtcs and use drm_atomic_helper_legacy_gamma_set() as > gamma_set func. The tv-out crtc has 1024 element gamma table (with > 10bit precision) in HW, but current Xorg server does not accept > anything else but 256 elements so that is used for all CRTCs. The dss > dispc API converts table of any length for HW and uses linear > interpolation in the process. >=20 > Signed-off-by: Jyri Sarha > --- > drivers/gpu/drm/omapdrm/omap_crtc.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) >=20 > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omap= drm/omap_crtc.c > index 075f2bb..d5210fe 100644 > --- a/drivers/gpu/drm/omapdrm/omap_crtc.c > +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c > @@ -384,6 +384,15 @@ static void omap_crtc_atomic_flush(struct drm_crtc= *crtc, > =20 > WARN_ON(omap_crtc->vblank_irq.registered); > =20 > + if (crtc->state->color_mgmt_changed) { > + struct drm_color_lut *lut =3D (struct drm_color_lut *) > + crtc->state->gamma_lut->data; 'gamma_lut' here is NULL when removing gamma table, which crashes the driver at the moment Tomi --qaHHBHlJeV7XK2m873KJHfMMxmVtfuoI3-- --cp2Bu2HckqWangfw81Pc9sg8F2qep9jqO 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 iQIcBAEBCAAGBQJXRFy/AAoJEPo9qoy8lh71RbsQAI7DEjz7C5sc4BAj/ngEO2aQ e6Qg5BV54SaZJRkxQdNikqENXGf183dVre0iqKXDB0SskUdc02CxavYd2sjeGhfr 9UoctiYQBhauwTeCsuUUqKfx3hj+qjJwxSFOt1pgJGGEm6mlGj/NvOl+9dcYkn7N fMT+bNalnZW7U1LHrmYwDvnAUsf9MwrNGf+3wKGZF3U6ixXpqGpUwhOqLYDLlowE mcKY1Ss8WRzppUOXuQ1LWylgzXBdHmj1rMbH1XVfq+LLBg7DVXIJNFRmp8EsB+yT qUtfkCzLcWzSzWwIIwlsyqlej9DLr0PtSKhIljrTdpGswWs4Bw63kFfKcYsNY88j mtVKUHo9dVvuY2B+kZ4OJPnlMdek5iet6cu1AzfbJKKz0smmOY5CRIMRY1814no9 eOK4YTH4Pd3JqeGAJIpP9BnjHEqLIoioQOtMXZ6LRpPLehcEiE26vJXSflD+CA2a xP+/w/lojDMZI56EzBB7HWw3eOVK3SICaiDx3L7RYtJrZmYkbxek1GftOu4bmWiy Hgip0mSvsg9JuzXfh7KyNaMPgGDE0v5zgaqnPg7aYQyccVFbnIPZFYVyCZuPDHdk a7fZbLGIrNGF2Fk6LMoczgAMY4eUEOBxZC4T5Hs7NcUotu16JEuZHrR9RWYjEGIY QYkXltBvXd3sJ6/HuzJX =ECss -----END PGP SIGNATURE----- --cp2Bu2HckqWangfw81Pc9sg8F2qep9jqO-- --===============0391086208== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0391086208==--