module_param(force_csc_type, uint, 0664);
MODULE_PARM_DESC(force_csc_type, "\n force colour space convert type\n");
-static uint fresh_vs;
-module_param(fresh_vs, uint, 0664);
-MODULE_PARM_DESC(fresh_vs, "\n fresh_vs\n");
-
-
static uint cur_hdr_support;
module_param(cur_hdr_support, uint, 0664);
MODULE_PARM_DESC(cur_hdr_support, "\n cur_hdr_support\n");
}
if (cur_knee_factor != knee_factor) {
pr_csc("Knee factor changed.\n");
- //change_flag |= SIG_KNEE_FACTOR;
+ change_flag |= SIG_KNEE_FACTOR;
+ cur_knee_factor = knee_factor;
}
if (cur_hdr_process_mode != hdr_process_mode) {
pr_csc("HDR mode changed.\n");
if (vf && vinfo)
signal_change_flag = signal_type_changed(vf, vinfo);
- if ((!signal_change_flag) && (force_csc_type == 0xff) && (!fresh_vs))
- return 0;
-
- if (fresh_vs > 0)
- fresh_vs = 0;
-
if (force_csc_type != 0xff)
csc_type = force_csc_type;
else
/* when sdr mode change */
if ((vinfo->hdr_info.hdr_support & 0x4) &&
((get_cpu_type() == MESON_CPU_MAJOR_ID_GXL) ||
- (get_cpu_type() == MESON_CPU_MAJOR_ID_GXM)))
+ (get_cpu_type() == MESON_CPU_MAJOR_ID_GXM) ||
+ (get_cpu_type() == MESON_CPU_MAJOR_ID_G12A)))
if (((sdr_process_mode != 1) && (sdr_mode > 0))
|| ((sdr_process_mode > 0) && (sdr_mode == 0)))
null_vf_cnt = toggle_frame;
MODULE_PARM_DESC(ogain_lut0, "\n knee_setting, 256=1.0\n");
int cgain_lut0[65] = {
- 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00,
- 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00,
- 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00,
- 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00,
- 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc00, 0xc0e,
- 0xc29, 0xc44, 0xc5f, 0xc79, 0xc92, 0xcab, 0xcc3, 0xcdb, 0xcf2,
- 0xd09, 0xd20, 0xd36, 0xd4c, 0xd61, 0xd76, 0xd8b, 0xd9f, 0xdb3,
- 0xdc7, 0xdda
-};
-
-int cgain_lut0_2[65] = {
0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
0x4c0, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
0x68b, 0x69f
};
-
// hdr10 to gamma lut 12bit (hdr to sdr)
int eotf_lut1[143] = {
0xfc000, 0x10400, 0x17000, 0x1b000,
MODULE_PARM_DESC(ogain_lut1, "\n ogain_lut1\n");
int cgain_lut1[65] = {
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f, 0x69f,
- 0x69f, 0x69f
+ 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
+ 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
+ 0x4c0, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400,
+ 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x400, 0x40e,
+ 0x429, 0x444, 0x45f, 0x479, 0x492, 0x4ab, 0x4c3, 0x4db, 0x4f2,
+ 0x509, 0x520, 0x536, 0x54c, 0x561, 0x576, 0x58b, 0x59f, 0x5b3,
+ 0x5c0, 0x5d0, 0x5f2, 0x609, 0x620, 0x636, 0x64c, 0x661, 0x676,
+ 0x68b, 0x69f
};
// sdr to hdr 10bit (gamma to peak)
/*gamut mode: 1->gamut before ootf*/
/*2->gamut after ootf*/
/*other->disable gamut*/
- if (MTX_ON)
- WRITE_VPP_REG_BITS(hdr_ctrl, 0, 6, 2);
- else
- WRITE_VPP_REG_BITS(hdr_ctrl, 0, 6, 2);
+ WRITE_VPP_REG_BITS(hdr_ctrl, 1, 6, 2);
WRITE_VPP_REG(GMUT_CTRL, gmut_shift);
WRITE_VPP_REG(GMUT_COEF0,
if (i < HDR2_EOTF_LUT_SIZE)
eotf_lut[i] = eotf_lut0[i];
if (i < HDR2_CGAIN_LUT_SIZE)
- cgain_lut[i] = cgain_lut0_2[i] - 1;
+ cgain_lut[i] = cgain_lut0[i] - 1;
}
#endif