osd: add osd SM1 feature [1/1]

PD#SWPL-6106

Problem:
bring up osd for SM1

Solution:
add osd SM1 feature

Verify:
Verified on SM1-AC200

Change-Id: I5cba13f7539e48f6cba1ca0fb3abcaad2ba8494d
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
Pengcheng Chen
2019-03-20 10:36:09 +08:00
committed by Luan Yuan
parent 27c6ca3df1
commit f0d2cd13c6
5 changed files with 29 additions and 6 deletions

View File

@@ -1322,8 +1322,8 @@
interrupt-names = "rdma";
};
meson_fb: meson-fb {
compatible = "amlogic, meson-g12a";
meson_fb: fb {
compatible = "amlogic, meson-sm1";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "disable";

View File

@@ -1322,8 +1322,8 @@
interrupt-names = "rdma";
};
meson_fb: meson-fb {
compatible = "amlogic, meson-g12a";
meson_fb: fb {
compatible = "amlogic, meson-sm1";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "disable";

View File

@@ -277,6 +277,7 @@ enum cpuid_type_e {
__MESON_CPU_MAJOR_ID_G12A,
__MESON_CPU_MAJOR_ID_G12B,
__MESON_CPU_MAJOR_ID_TL1,
__MESON_CPU_MAJOR_ID_SM1,
__MESON_CPU_MAJOR_ID_UNKNOWN,
};

View File

@@ -3957,6 +3957,21 @@ static struct osd_device_data_s osd_tl1 = {
.has_viu2 = 1,
};
static struct osd_device_data_s osd_sm1 = {
.cpu_id = __MESON_CPU_MAJOR_ID_SM1,
.osd_ver = OSD_HIGH_ONE,
.afbc_type = MALI_AFBC,
.osd_count = 4,
.has_deband = 1,
.has_lut = 1,
.has_rdma = 1,
.has_dolby_vision = 1,
.osd_fifo_len = 64, /* fifo len 64*8 = 512 */
.vpp_fifo_len = 0xfff,/* 2048 */
.dummy_data = 0x00808000,
.has_viu2 = 1,
};
static const struct of_device_id meson_fb_dt_match[] = {
{
.compatible = "amlogic, meson-gxbb",
@@ -4003,6 +4018,10 @@ static const struct of_device_id meson_fb_dt_match[] = {
.compatible = "amlogic, meson-tl1",
.data = &osd_tl1,
},
{
.compatible = "amlogic, meson-sm1",
.data = &osd_sm1,
},
{},
};

View File

@@ -1679,6 +1679,7 @@ static u32 osd_get_hw_reset_flag(void)
case __MESON_CPU_MAJOR_ID_G12A:
case __MESON_CPU_MAJOR_ID_G12B:
case __MESON_CPU_MAJOR_ID_TL1:
case __MESON_CPU_MAJOR_ID_SM1:
{
int i, afbc_enable = 0;
@@ -5051,7 +5052,8 @@ static void osd_update_disp_osd_rotate(u32 index)
const struct vinfo_s *vinfo;
int out_y_crop_start, out_y_crop_end;
if (osd_hw.osd_meson_dev.cpu_id < __MESON_CPU_MAJOR_ID_G12B)
if (osd_hw.osd_meson_dev.cpu_id < __MESON_CPU_MAJOR_ID_G12B ||
osd_hw.osd_meson_dev.cpu_id == __MESON_CPU_MAJOR_ID_SM1)
return;
src_fmt = get_viu2_src_format();
src_data.x = 0;
@@ -8387,7 +8389,8 @@ void osd_init_hw(u32 logo_loaded, u32 osd_probe,
osd_hw.hw_rdma_en = 1;
} else if (osd_hw.osd_meson_dev.osd_ver == OSD_HIGH_ONE) {
osd_hw.hw_cursor_en = 0;
osd_hw.hw_rdma_en = 1;
if (osd_hw.osd_meson_dev.has_rdma)
osd_hw.hw_rdma_en = 1;
/* g12a and g12b need delay */
supsend_delay = 50;
}