[PATCH v5] rockchip/drm: vop2: add support for gamma LUT

Piotr Zalewski pZ010001011111 at proton.me
Wed Oct 16 09:23:27 UTC 2024


Hi Andy, 

> > 
> > static void vop2_crtc_atomic_flush(struct drm_crtc *crtc,
> > @@ -2790,7 +2945,13 @@ static int vop2_create_crtcs(struct vop2 *vop2)
> > }
> > 
> > drm_crtc_helper_add(&vp->crtc, &vop2_crtc_helper_funcs);
> > + if (vop2->lut_regs && vp->crtc.dev != NULL) {
> 
> 
> 
> There is no need to check vp->crtc.dev here, set has been set in drm_crtc_init_with_planes .

I tested it and this check must be here because trying to enable color mgmt 
on CRTC with no associated device, causes null ptr dereference later on in 
drm_crtc_enable_color_mgmt (unless something changed in recent kernel 
versions, last time I tested was 6.10? or even 6.8).

Best regards, Piotr Zalewski


More information about the dri-devel mailing list