struct vframe_master_display_colour_s *p_new = NULL;
struct vframe_master_display_colour_s cus;
int ret;
+ u32 limit_full = 0;
if (!vf)
return 0;
}
} else
cur_mvc_type[vd_path] = 0;
+ limit_full = (vf->signal_type >> 25) & 0x01;
if ((vf->source_type == VFRAME_SOURCE_TYPE_TUNER) ||
(vf->source_type == VFRAME_SOURCE_TYPE_CVBS) ||
(vf->source_type == VFRAME_SOURCE_TYPE_COMP) ||
/* default 709 limit */
(1 << 29) /* video available */
| (5 << 26) /* unspecified */
- | (0 << 25) /* limit */
+ | (limit_full << 25) /* limit */
| (1 << 24) /* color available */
| (1 << 16) /* bt709 */
| (1 << 8) /* bt709 */
mtx_setting(POST2_MTX, MATRIX_NULL, MTX_OFF);
else
mtx_setting(POST2_MTX,
- MATRIX_YUV709_RGB, MTX_ON);
+ csc_type/*MATRIX_YUV709_RGB*/, MTX_ON);
}
if (cur_hdr_process_mode[vd_path] !=
goto free_buf;
}
gmv_th = val;
+ } else if (!strcmp(parm[0], "post2mtx")) {
+ if (parm[1]) {
+ if (kstrtoul(parm[1], 16, &val) < 0)
+ goto free_buf;
+ mtx_setting(POST2_MTX, val, 1);
+ }
} else
pr_info("unsupport cmd\n");
WRITE_VPP_REG(matrix_pre_offset0_1, 0x7c00600);
WRITE_VPP_REG(matrix_pre_offset2, 0x00000600);
break;
+ case MATRIX_YUV709F_RGB:/*full to full*/
+ WRITE_VPP_REG(matrix_coef00_01, 0x04000000);
+ WRITE_VPP_REG(matrix_coef02_10, 0x064D0400);
+ WRITE_VPP_REG(matrix_coef11_12, 0x1F411E21);
+ WRITE_VPP_REG(matrix_coef20_21, 0x0400076D);
+ WRITE_VPP_REG(matrix_coef22, 0x0);
+ WRITE_VPP_REG(matrix_offset0_1, 0x0);
+ WRITE_VPP_REG(matrix_offset2, 0x0);
+ WRITE_VPP_REG(matrix_pre_offset0_1, 0x0000600);
+ WRITE_VPP_REG(matrix_pre_offset2, 0x00000600);
+ break;
default:
break;
}
+
+ /*pr_info("mtx_sel:%d, mtx_csc:0x%x\n", mtx_sel, mtx_csc);*/
}