Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/rockchip: vop2: don't check color_mgmt_changed in atomic_enable

Remove color_mgmt_changed check from vop2_crtc_atomic_try_set_gamma to
allow gamma LUT rewrite during modeset when coming out of suspend. Add
a check for color_mgmt_changed directly in vop2_crtc_atomic_flush.

This patch fixes the patch adding gamma LUT support for vop2 [1].

[1] https://lore.kernel.org/linux-rockchip/20241101185545.559090-3-pZ010001011111@proton.me/

Suggested-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Piotr Zalewski <pZ010001011111@proton.me>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206192013.342692-3-pZ010001011111@proton.me

authored by

Piotr Zalewski and committed by
Heiko Stuebner
9c22b6ec 8ddc8dfb

+2 -2
+2 -2
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
··· 1601 1601 struct drm_crtc *crtc, 1602 1602 struct drm_crtc_state *crtc_state) 1603 1603 { 1604 - if (!vop2->lut_regs || !crtc_state->color_mgmt_changed) 1604 + if (!vop2->lut_regs) 1605 1605 return; 1606 1606 1607 1607 if (!crtc_state->gamma_lut) { ··· 2691 2691 struct vop2 *vop2 = vp->vop2; 2692 2692 2693 2693 /* In case of modeset, gamma lut update already happened in atomic enable */ 2694 - if (!drm_atomic_crtc_needs_modeset(crtc_state)) 2694 + if (!drm_atomic_crtc_needs_modeset(crtc_state) && crtc_state->color_mgmt_changed) 2695 2695 vop2_crtc_atomic_try_set_gamma_locked(vop2, vp, crtc, crtc_state); 2696 2696 2697 2697 vop2_post_config(crtc);