csc: add vinfo check for csc process [1/1]

PD#SWPL-13491

Problem:
After plugging and unplugging HDMITX,
the panel screen color display is abnormal
for dual display platform.

Solution:
add vinfo->mode check for csc process,
avoid process null and invalid vinfo case.

Verify:
verify by AC202(sm1)

Change-Id: I54c54adcf2a0fc9a02e35b0ef24a720a55a8781a
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
This commit is contained in:
Dezhi Kong
2019-09-02 19:53:09 +08:00
committed by Chris KIM
parent 5442bba22e
commit 0a23a896e3

View File

@@ -6372,7 +6372,8 @@ static int vpp_matrix_update(
int hdmi_scs_type_changed = 0;
struct hdr10plus_para hdmitx_hdr10plus_param;
if (vinfo == NULL)
if (!vinfo || vinfo->mode == VMODE_NULL ||
vinfo->mode == VMODE_INVALID)
return 0;
/* Tx hdr information */
@@ -6442,7 +6443,9 @@ int amvecm_matrix_process(
int i;
if ((get_cpu_type() < MESON_CPU_MAJOR_ID_GXTVBB) ||
is_meson_gxl_package_905M2() || (csc_en == 0))
is_meson_gxl_package_905M2() || (csc_en == 0) ||
!vinfo || vinfo->mode == VMODE_NULL ||
vinfo->mode == VMODE_INVALID)
return 0;
if (reload_mtx) {