mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: vop2: Reset plane hdr state for every commit
When play a SDR video after HDR video, there is a switch process, look from 70.769811 seconds to 71.006901 seconds: The HDMI was set to SDR(vcstate->eoftf = 0), the Plane is still HDR (vpstate->eotf = 2), this will set the window to HDR2SDR state, but actually we want play a sdr video in sdr state, and this cause the wrong csc. So we clear vpstate->hdr2sdr_en & hdr_in at the beginning of every commit. [ 70.657468] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 2 [ 70.657501] Cluster0-win0 hdr2sdr_en 0 hdr_in 1 sdr2hdr_en 1 is_input_yuv 1 is_output_yuv 0 [ 70.707209] Cluster0-win0 EOTF val: 2 [ 70.708056] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 2 [ 70.708086] Cluster0-win0 hdr2sdr_en 0 hdr_in 1 sdr2hdr_en 1 is_input_yuv 1 is_output_yuv 0 [ 70.769811] rockchip-vop2 fe040000.vop: [drm:vop2_crtc_atomic_enable] Update mode to 3840x2160p60, type: 11 for vp0 [ 71.006517] dwhdmi-rockchip fe0a0000.hdmi: Rate 371250000 missing; compute N dynamically [ 71.006901] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 0 [ 71.006964] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 0 [ 71.007034] Cluster1-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 0 [ 71.022511] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0 [ 71.022555] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1 [ 71.022582] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1 [ 71.052015] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0 [ 71.052057] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1 [ 71.052101] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1 [ 71.067202] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0 [ 71.067225] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1 [ 71.067253] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1 Change-Id: I032f03cfe2bce6ccce874fc04bd3b67cc589a11e Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
@@ -2264,6 +2264,9 @@ static struct drm_plane_state *vop2_atomic_plane_duplicate_state(struct drm_plan
|
||||
if (!vpstate)
|
||||
return NULL;
|
||||
|
||||
vpstate->hdr_in = 0;
|
||||
vpstate->hdr2sdr_en = 0;
|
||||
|
||||
__drm_atomic_helper_plane_duplicate_state(plane, &vpstate->base);
|
||||
|
||||
return &vpstate->base;
|
||||
|
||||
Reference in New Issue
Block a user