mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
video: judge tv chip by amvideo_device_data_s [1/1]
PD#SWPL-109869 Problem: avoid forget set new chip Solution: add is_tv_panel in amvideo_device_data_s Verify: no need verify Change-Id: I99f2c3bb3032b836627212ea3fa2ad848fec77bc Signed-off-by: hai.cao <hai.cao@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
6cca11d0bd
commit
01faae2c82
@@ -19441,6 +19441,7 @@ static struct amvideo_device_data_s amvideo = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 0,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_tm2_revb = {
|
||||
@@ -19491,6 +19492,7 @@ static struct amvideo_device_data_s amvideo_tm2_revb = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_sc2 = {
|
||||
@@ -19541,6 +19543,7 @@ static struct amvideo_device_data_s amvideo_sc2 = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 0,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t5 = {
|
||||
@@ -19591,6 +19594,7 @@ static struct amvideo_device_data_s amvideo_t5 = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t5d = {
|
||||
@@ -19641,6 +19645,7 @@ static struct amvideo_device_data_s amvideo_t5d = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t7 = {
|
||||
@@ -19694,6 +19699,7 @@ static struct amvideo_device_data_s amvideo_t7 = {
|
||||
.max_vd_layers = 3,
|
||||
.has_vpp1 = 1,
|
||||
.has_vpp2 = 1,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_s4 = {
|
||||
@@ -19744,6 +19750,7 @@ static struct amvideo_device_data_s amvideo_s4 = {
|
||||
.mif_linear = 0,
|
||||
.display_module = 0,
|
||||
.max_vd_layers = 2,
|
||||
.is_tv_panel = 0,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t5d_revb = {
|
||||
@@ -19792,6 +19799,7 @@ static struct amvideo_device_data_s amvideo_t5d_revb = {
|
||||
.mif_linear = 0,
|
||||
.display_module = 0,
|
||||
.max_vd_layers = 2,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t3 = {
|
||||
@@ -19844,6 +19852,7 @@ static struct amvideo_device_data_s amvideo_t3 = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 1,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t5w = {
|
||||
@@ -19896,6 +19905,7 @@ static struct amvideo_device_data_s amvideo_t5w = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 1,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_c3 = {
|
||||
@@ -19948,6 +19958,7 @@ static struct amvideo_device_data_s amvideo_c3 = {
|
||||
.max_vd_layers = 1,
|
||||
.has_vpp1 = 0,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_s5 = {
|
||||
@@ -20000,6 +20011,7 @@ static struct amvideo_device_data_s amvideo_s5 = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 1,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 0,
|
||||
};
|
||||
|
||||
static struct amvideo_device_data_s amvideo_t5m = {
|
||||
@@ -20052,6 +20064,7 @@ static struct amvideo_device_data_s amvideo_t5m = {
|
||||
.max_vd_layers = 2,
|
||||
.has_vpp1 = 1,
|
||||
.has_vpp2 = 0,
|
||||
.is_tv_panel = 1,
|
||||
};
|
||||
|
||||
static struct video_device_hw_s legcy_dev_property = {
|
||||
|
||||
@@ -6256,14 +6256,7 @@ static inline bool is_tv_panel(void)
|
||||
|
||||
/*panel*/
|
||||
if (vinfo->viu_color_fmt == COLOR_FMT_RGB444 &&
|
||||
(get_cpu_type() == MESON_CPU_MAJOR_ID_TL1 ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_TM2 ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_T5 ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_T5D ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_T7 ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_T3 ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_T5W ||
|
||||
get_cpu_type() == MESON_CPU_MAJOR_ID_C3))
|
||||
(get_cpu_type() == MESON_CPU_MAJOR_ID_TL1 || cur_dev->is_tv_panel))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
@@ -12971,6 +12964,7 @@ int video_early_init(struct amvideo_device_data_s *p_amvideo)
|
||||
vd_layer[1].misc_reg_offt = 0 + cur_dev->vpp_off;
|
||||
vd_layer[2].misc_reg_offt = 0 + cur_dev->vpp_off;
|
||||
vd_layer[0].dummy_alpha = 0x7fffffff;
|
||||
cur_dev->is_tv_panel = p_amvideo->is_tv_panel;
|
||||
cur_dev->mif_linear = p_amvideo->mif_linear;
|
||||
cur_dev->display_module = p_amvideo->display_module;
|
||||
cur_dev->max_vd_layers = p_amvideo->max_vd_layers;
|
||||
|
||||
@@ -268,6 +268,7 @@ struct video_dev_s {
|
||||
struct vpp_frame_par_s aisr_frame_parms;
|
||||
struct rdma_fun_s rdma_func[RDMA_INTERFACE_NUM];
|
||||
u32 sr_in_size;
|
||||
u8 is_tv_panel;
|
||||
};
|
||||
|
||||
struct video_layer_s;
|
||||
@@ -592,6 +593,7 @@ struct amvideo_device_data_s {
|
||||
u8 has_vpp1;
|
||||
u8 has_vpp2;
|
||||
struct video_device_hw_s dev_property;
|
||||
u8 is_tv_panel;
|
||||
};
|
||||
|
||||
struct path_id_s {
|
||||
|
||||
Reference in New Issue
Block a user