mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
osd_drm: osd drm for g12b bring up
PD#165090: osd drm for g12b bring up Change-Id: Id69a152b22ba3e408d20fa494b9475c9ad3797de Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
This commit is contained in:
committed by
Yixun Lan
parent
135663df9e
commit
fce54c8573
@@ -60,6 +60,7 @@ Required properties:
|
||||
- TXLX (T962X, T962E) : "amlogic,meson-txlx-vpu"
|
||||
- AXG (A113G, A113D) : "amlogic,meson-axg-vpu"
|
||||
- G12A (S905D2) : "amlogic,meson-g12a-vpu"
|
||||
- G12B (W400) : "amlogic,meson-g12b-vpu"
|
||||
followed by the common "amlogic,meson-gx-vpu"
|
||||
- reg: base address and size of he following memory-mapped regions :
|
||||
- vpu
|
||||
|
||||
@@ -216,6 +216,21 @@ static struct osd_device_data_s osd_g12a = {
|
||||
.has_viu2 = 1,
|
||||
};
|
||||
|
||||
static struct osd_device_data_s osd_g12b = {
|
||||
.cpu_id = __MESON_CPU_MAJOR_ID_G12B,
|
||||
.osd_ver = OSD_HIGH_ONE,
|
||||
.afbc_type = MALI_AFBC,
|
||||
.osd_count = 3,
|
||||
.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_meson_dev;
|
||||
static u32 logo_memsize;
|
||||
static struct page *logo_page;
|
||||
@@ -803,6 +818,8 @@ static const struct of_device_id am_meson_vpu_driver_dt_match[] = {
|
||||
.data = &osd_axg, },
|
||||
{ .compatible = "amlogic,meson-g12a-vpu",
|
||||
.data = &osd_g12a, },
|
||||
{ .compatible = "amlogic,meson-g12b-vpu",
|
||||
.data = &osd_g12b, },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, am_meson_vpu_driver_dt_match);
|
||||
|
||||
@@ -7800,7 +7800,6 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
|
||||
osd_hw.osd_afbcd[index].enable);
|
||||
osd_log_dbg2("osd_afbcd_inter_format=%d\n",
|
||||
osd_hw.osd_afbcd[index].inter_format);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7815,6 +7814,11 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
|
||||
osd_hw.free_src_data_backup[index].y_start + 1;
|
||||
osd_hw.free_scale_enable[index] = 1;
|
||||
|
||||
osd_hw.src_data[index].x = plane_map->src_x;
|
||||
osd_hw.src_data[index].y = plane_map->src_y;
|
||||
osd_hw.src_data[index].w = plane_map->src_w;
|
||||
osd_hw.src_data[index].h = plane_map->src_h;
|
||||
|
||||
if (osd_hw.free_scale_enable[index] ||
|
||||
(width_src != width_dst) ||
|
||||
(height_src != height_dst) ||
|
||||
@@ -7894,6 +7898,16 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
|
||||
&freescale_dst[index],
|
||||
sizeof(struct pandata_s));
|
||||
freescale_update = true;
|
||||
osd_hw.dst_data[index].x =
|
||||
osd_hw.free_dst_data[index].x_start;
|
||||
osd_hw.dst_data[index].y =
|
||||
osd_hw.free_dst_data[index].x_start;
|
||||
osd_hw.dst_data[index].w =
|
||||
osd_hw.free_dst_data[index].x_end -
|
||||
osd_hw.free_dst_data[index].x_start + 1;
|
||||
osd_hw.dst_data[index].h =
|
||||
osd_hw.free_dst_data[index].y_end -
|
||||
osd_hw.free_dst_data[index].y_start + 1;
|
||||
|
||||
if ((height_dst != height_src) ||
|
||||
(width_dst != width_src))
|
||||
@@ -7957,6 +7971,17 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
|
||||
osd_hw.dispdata[index].y_start = y_start;
|
||||
osd_hw.dispdata[index].y_end = y_end;
|
||||
}
|
||||
osd_hw.dst_data[index].x =
|
||||
osd_hw.dispdata[index].x_start;
|
||||
osd_hw.dst_data[index].y =
|
||||
osd_hw.dispdata[index].x_start;
|
||||
osd_hw.dst_data[index].w =
|
||||
osd_hw.dispdata[index].x_end -
|
||||
osd_hw.dispdata[index].x_start + 1;
|
||||
osd_hw.dst_data[index].h =
|
||||
osd_hw.dispdata[index].y_end -
|
||||
osd_hw.dispdata[index].y_start + 1;
|
||||
|
||||
}
|
||||
return freescale_update;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user