mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
vdin: add hdr10 pluse data in vframe [1/1]
PD#SWPL-9849 Problem: add hdr10 pkt data into vframe structure Solution: according to hdmi rx hdr10p_on flag, copy hdr10p data from hdmirx to vframe Verify: tl1 Change-Id: I4d3bcbcce4d1303a5e5d4cf57a7777e4fd1fd54c Signed-off-by: Yong Qin <yong.qin@amlogic.com>
This commit is contained in:
@@ -448,47 +448,6 @@ struct tvin_hdr_info_s {
|
||||
unsigned int hdr_check_cnt;
|
||||
};
|
||||
|
||||
struct tvin_hdr10p_data_s {
|
||||
uint32_t vsif_hb;
|
||||
uint32_t vsif_ieee_code;
|
||||
struct pb4_st {
|
||||
uint8_t rvd:1;
|
||||
uint8_t max_lumin:5;
|
||||
uint8_t app_ver:2;
|
||||
} __packed pb4_st;
|
||||
uint8_t average_maxrgb;
|
||||
uint8_t distrib_valus0;
|
||||
uint8_t distrib_valus1;
|
||||
uint8_t distrib_valus2;
|
||||
uint8_t distrib_valus3;
|
||||
uint8_t distrib_valus4;
|
||||
uint8_t distrib_valus5;
|
||||
uint8_t distrib_valus6;
|
||||
uint8_t distrib_valus7;
|
||||
uint8_t distrib_valus8;
|
||||
struct pb15_18_st {
|
||||
uint32_t knee_point_x_9_6:4;
|
||||
uint32_t num_bezier_curve_anchors:4;
|
||||
uint32_t knee_point_y_9_8:2;
|
||||
uint32_t knee_point_x_5_0:6;
|
||||
uint32_t knee_point_y_7_0:8;
|
||||
uint32_t bezier_curve_anchors0:8;
|
||||
} __packed pb15_18_st;
|
||||
uint8_t bezier_curve_anchors1;
|
||||
uint8_t bezier_curve_anchors2;
|
||||
uint8_t bezier_curve_anchors3;
|
||||
uint8_t bezier_curve_anchors4;
|
||||
uint8_t bezier_curve_anchors5;
|
||||
uint8_t bezier_curve_anchors6;
|
||||
uint8_t bezier_curve_anchors7;
|
||||
uint8_t bezier_curve_anchors8;
|
||||
struct pb27_st {
|
||||
uint8_t rvd:6;
|
||||
uint8_t no_delay_flag:1;
|
||||
uint8_t overlay_flag:1;
|
||||
} __packed pb27_st;
|
||||
} __packed;
|
||||
|
||||
struct tvin_hdr10plus_info_s {
|
||||
bool hdr10p_on;
|
||||
struct tvin_hdr10p_data_s hdr10p_data;
|
||||
|
||||
@@ -4245,6 +4245,29 @@ static int vdin_hdr_sei_error_check(struct vdin_dev_s *devp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void vdin_hdr10plus_check(struct vdin_dev_s *devp,
|
||||
struct vframe_s *vf) {
|
||||
|
||||
if (devp->prop.hdr10p_info.hdr10p_on) {
|
||||
devp->prop.hdr10p_info.hdr10p_on = false;
|
||||
|
||||
vf->signal_type |= (1 << 29);/*present_flag*/
|
||||
vf->signal_type |= (0 << 25);/*0:limited*/
|
||||
/*color_primaries*/
|
||||
vf->signal_type = ((9 << 16) |
|
||||
(vf->signal_type & (~0xFF0000)));
|
||||
/*transfer_characteristic*/
|
||||
vf->signal_type = ((0x30 << 8) |
|
||||
(vf->signal_type & (~0xFF00)));
|
||||
/*matrix_coefficient*/
|
||||
vf->signal_type = ((9 << 0) |
|
||||
(vf->signal_type & (~0xFF)));
|
||||
memcpy(&vf->prop.hdr10p_data,
|
||||
&devp->prop.hdr10p_info.hdr10p_data,
|
||||
sizeof(struct tvin_hdr10p_data_s));
|
||||
}
|
||||
}
|
||||
|
||||
void vdin_set_drm_data(struct vdin_dev_s *devp,
|
||||
struct vframe_s *vf)
|
||||
{
|
||||
@@ -4332,8 +4355,13 @@ void vdin_set_drm_data(struct vdin_dev_s *devp,
|
||||
vf->signal_type = ((1 << 8) |
|
||||
(vf->signal_type & (~0xFF00)));
|
||||
}
|
||||
|
||||
devp->parm.info.signal_type = vf->signal_type;
|
||||
/*hdr10+ check*/
|
||||
vdin_hdr10plus_check(devp, vf);
|
||||
}
|
||||
|
||||
|
||||
void vdin_check_hdmi_hdr(struct vdin_dev_s *devp)
|
||||
{
|
||||
struct tvin_state_machine_ops_s *sm_ops;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/* Ref.2019/04/25: tl1 vdin0 afbce dynamically switch support,
|
||||
* vpp also should support this function
|
||||
*/
|
||||
#define VDIN_VER "Ref.2019/07/08-add dv ll mode"
|
||||
#define VDIN_VER "Ref.2019/07/19:vf add hdr10 plus data"
|
||||
|
||||
/*the counter of vdin*/
|
||||
#define VDIN_MAX_DEVS 2
|
||||
|
||||
@@ -116,6 +116,59 @@ struct vframe_hist_s {
|
||||
#endif
|
||||
} /*vframe_hist_t */;
|
||||
|
||||
struct tvin_hdr10p_data_s {
|
||||
uint32_t vsif_hb;
|
||||
uint32_t vsif_ieee_code;
|
||||
struct pb4_st {
|
||||
uint8_t rvd:1;
|
||||
uint8_t max_lumin:5;
|
||||
uint8_t app_ver:2;
|
||||
} __packed pb4_st;
|
||||
uint8_t average_maxrgb;
|
||||
uint8_t distrib_valus0;
|
||||
uint8_t distrib_valus1;
|
||||
uint8_t distrib_valus2;
|
||||
uint8_t distrib_valus3;
|
||||
uint8_t distrib_valus4;
|
||||
uint8_t distrib_valus5;
|
||||
uint8_t distrib_valus6;
|
||||
uint8_t distrib_valus7;
|
||||
uint8_t distrib_valus8;
|
||||
struct pb15_18_st {
|
||||
uint32_t knee_point_x_9_6:4;
|
||||
uint32_t num_bezier_curve_anchors:4;
|
||||
uint32_t knee_point_y_9_8:2;
|
||||
uint32_t knee_point_x_5_0:6;
|
||||
uint32_t knee_point_y_7_0:8;
|
||||
uint32_t bezier_curve_anchors0:8;
|
||||
} __packed pb15_18_st;
|
||||
uint8_t bezier_curve_anchors1;
|
||||
uint8_t bezier_curve_anchors2;
|
||||
uint8_t bezier_curve_anchors3;
|
||||
uint8_t bezier_curve_anchors4;
|
||||
uint8_t bezier_curve_anchors5;
|
||||
uint8_t bezier_curve_anchors6;
|
||||
uint8_t bezier_curve_anchors7;
|
||||
uint8_t bezier_curve_anchors8;
|
||||
struct pb27_st {
|
||||
uint8_t rvd:6;
|
||||
uint8_t no_delay_flag:1;
|
||||
uint8_t overlay_flag:1;
|
||||
} __packed pb27_st;
|
||||
} __packed;
|
||||
|
||||
/*vdin dolby vsi info param*/
|
||||
struct tvin_dv_vsif_s {
|
||||
uint8_t dobly_vision_signal:1;
|
||||
uint8_t backlt_ctrl_MD_present:1;
|
||||
uint8_t auxiliary_MD_present:1;
|
||||
uint8_t eff_tmax_PQ_hi;
|
||||
uint8_t eff_tmax_PQ_low;
|
||||
uint8_t auxiliary_runmode;
|
||||
uint8_t auxiliary_runversion;
|
||||
uint8_t auxiliary_debug0;
|
||||
};
|
||||
|
||||
/*
|
||||
* If bottom == 0 or right == 0, then all Blackbar information are invalid
|
||||
*/
|
||||
@@ -222,6 +275,7 @@ struct vframe_prop_s {
|
||||
struct vframe_meas_s meas;
|
||||
struct vframe_master_display_colour_s
|
||||
master_display_colour;
|
||||
struct tvin_hdr10p_data_s hdr10p_data;
|
||||
} /*vframe_prop_t */;
|
||||
|
||||
struct vdisplay_info_s {
|
||||
@@ -283,18 +337,6 @@ struct vframe_pic_mode_s {
|
||||
enum pic_mode_provider_e provider;
|
||||
};
|
||||
|
||||
/*vdin dolby vsi info param*/
|
||||
struct tvin_dv_vsif_s {
|
||||
uint8_t dobly_vision_signal:1;
|
||||
uint8_t backlt_ctrl_MD_present:1;
|
||||
uint8_t auxiliary_MD_present:1;
|
||||
uint8_t eff_tmax_PQ_hi;
|
||||
uint8_t eff_tmax_PQ_low;
|
||||
uint8_t auxiliary_runmode;
|
||||
uint8_t auxiliary_runversion;
|
||||
uint8_t auxiliary_debug0;
|
||||
};
|
||||
|
||||
#define BITDEPTH_Y_SHIFT 8
|
||||
#define BITDEPTH_Y8 (0 << BITDEPTH_Y_SHIFT)
|
||||
#define BITDEPTH_Y9 (1 << BITDEPTH_Y_SHIFT)
|
||||
|
||||
Reference in New Issue
Block a user