Skip to content

Commit f05b319

Browse files
sandy-huangZhengShunQian
authored andcommitted
drm/rockchip: vop: restore BCSH state when exit from suspend state
when vop enter suspend state all the register will be restore to init value, so when resume we need to config the BCSH register, and the vop->mode_update parameter can indicate this condition. Change-Id: Ifd5e7eb406e0ac56c11f74391290348600211e89 Signed-off-by: Sandy Huang <hjc@rock-chips.com>
1 parent 1569af9 commit f05b319

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,10 +3243,18 @@ static void vop_tv_config_update(struct drm_crtc *crtc,
32433243

32443244
if (!s->tv_state)
32453245
return;
3246-
3246+
/*
3247+
* The BCSH only need to config once except one of the following
3248+
* condition changed:
3249+
* 1. tv_state: include brightness,contrast,saturation and hue;
3250+
* 2. yuv_overlay: it is related to BCSH r2y module;
3251+
* 3. mode_update: it is indicate mode change and resume from suspend;
3252+
* 4. bcsh_en: control the BCSH module enable or disable state;
3253+
* 5. bus_format: it is related to BCSH y2r module;
3254+
*/
32473255
if (!memcmp(s->tv_state,
32483256
&vop->active_tv_state, sizeof(*s->tv_state)) &&
3249-
s->yuv_overlay == old_s->yuv_overlay &&
3257+
s->yuv_overlay == old_s->yuv_overlay && vop->mode_update &&
32503258
s->bcsh_en == old_s->bcsh_en && s->bus_format == old_s->bus_format)
32513259
return;
32523260

0 commit comments

Comments
 (0)