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. > > Signed-off-by: Jyri Sarha <jsarha@xxxxxx> > --- > drivers/gpu/drm/omapdrm/omap_crtc.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/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, > > WARN_ON(omap_crtc->vblank_irq.registered); > > + if (crtc->state->color_mgmt_changed) { > + struct drm_color_lut *lut = (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
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel