drm/rockchip: vop2: check plane state before check plane oetf

We have some plane not registered to drm core(Such as cluster
plane on some linux system), so they don't have pstate.

And also we don't need to check plane state for oetf for
a inactived plane(has no fb).

Change-Id: I909b665397c3df530ff0f466e0d654dcbb3f1a40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-06-10 10:33:34 +08:00
committed by Tao Huang
parent 762e61f66b
commit c7659101be

View File

@@ -4444,6 +4444,10 @@ static void vop2_setup_hdr10(struct vop2_video_port *vp, uint8_t win_phys_id)
pstate = plane->state;
vpstate = to_vop2_plane_state(pstate);
/* skip inactive plane */
if (!pstate || !pstate->fb)
continue;
if (vpstate->eotf != SMPTE_ST2084) {
have_sdr_layer = true;
break;