osd: add osd TM2 support [1/1]

PD#SWPL-6558

Problem:
bring up osd for TM2

Solution:
osd: add osd TM2 support

Verify:
Verfied on TM2 skt board

Change-Id: I2183bd1f60793baf947c303b6d456e8c69d104ac
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
This commit is contained in:
Jian Cao
2019-03-30 19:25:18 +08:00
committed by Jianxiong Pan
parent c6d7fadb53
commit 6e02bd3697
13 changed files with 48 additions and 28 deletions

View File

@@ -1336,7 +1336,7 @@
};
meson_fb: fb {
compatible = "amlogic, meson-tl1";
compatible = "amlogic, meson-tm2";
memory-region = <&logo_reserved>;
status = "disabled";
interrupts = <0 3 1

View File

@@ -63,14 +63,6 @@
/*alloc-ranges = <0x30000000 0x50000000>;*/
};
/* codec shared reserved */
codec_mm_reserved:linux,codec_mm_reserved {
compatible = "amlogic, codec-mm-reserved";
size = <0x0>;
alignment = <0x100000>;
//no-map;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
@@ -79,6 +71,14 @@
alloc-ranges = <0x7f800000 0x800000>;
};
/* codec shared reserved */
codec_mm_reserved:linux,codec_mm_reserved {
compatible = "amlogic, codec-mm-reserved";
size = <0x0>;
alignment = <0x100000>;
//no-map;
};
ion_cma_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -1119,7 +1119,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <1>;
pxp_mode = <1>; /** 0:normal mode 1:pxp mode */

View File

@@ -1859,7 +1859,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -1743,7 +1743,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -1743,7 +1743,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -1316,7 +1316,7 @@
};
meson_fb: fb {
compatible = "amlogic, meson-tl1";
compatible = "amlogic, meson-tm2";
memory-region = <&logo_reserved>;
status = "disabled";
interrupts = <0 3 1

View File

@@ -53,6 +53,14 @@
alloc-ranges = <0x0 0x05000000 0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
codec_mm_cma:linux,codec_mm_cma {
compatible = "shared-dma-pool";
reusable;
@@ -70,14 +78,6 @@
//no-map;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
ion_cma_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -1114,7 +1114,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <1>;
pxp_mode = <1>; /** 0:normal mode 1:pxp mode */

View File

@@ -1818,7 +1818,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -1741,7 +1741,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -1742,7 +1742,7 @@
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
mem_size = <0x00800000 0x1980000 0x100000 0x800000>;
mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
logo_addr = "0x7f800000";
mem_alloc = <0>;
pxp_mode = <0>; /** 0:normal mode 1:pxp mode */

View File

@@ -279,6 +279,7 @@ enum cpuid_type_e {
__MESON_CPU_MAJOR_ID_G12B,
__MESON_CPU_MAJOR_ID_TL1,
__MESON_CPU_MAJOR_ID_SM1,
__MESON_CPU_MAJOR_ID_TM2,
__MESON_CPU_MAJOR_ID_UNKNOWN,
};

View File

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

View File

@@ -1964,6 +1964,7 @@ static u32 osd_get_hw_reset_flag(void)
case __MESON_CPU_MAJOR_ID_G12B:
case __MESON_CPU_MAJOR_ID_TL1:
case __MESON_CPU_MAJOR_ID_SM1:
case __MESON_CPU_MAJOR_ID_TM2:
{
int i, afbc_enable = 0;
@@ -5456,8 +5457,7 @@ static void osd_update_disp_osd_rotate(u32 index)
const struct vinfo_s *vinfo = NULL;
int out_y_crop_start, out_y_crop_end;
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)
if (osd_hw.osd_meson_dev.cpu_id != __MESON_CPU_MAJOR_ID_G12B)
return;
src_fmt = get_viu2_src_format();
src_data.x = 0;