#include "osd_fb.h"
#define OSD_BLEND_SHIFT_WORKAROUND
+#define REMOVE_PHYS_TO_VIRT
#ifdef CONFIG_AMLOGIC_VSYNC_FIQ_ENABLE
#define FIQ_VSYNC
#endif
{
u32 index = fence_map->fb_index;
bool free_scale_set = false;
+ #ifndef REMOVE_PHYS_TO_VIRT
void *vaddr = NULL;
+ #endif
canvas_config(osd_hw.fb_gem[index].canvas_idx,
fence_map->ext_addr,
(osd_hw.color_info[index]->bpp >> 3)),
fence_map->height,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
+ #ifndef REMOVE_PHYS_TO_VIRT
vaddr = phys_to_virt(fence_map->ext_addr);
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
CANVAS_ALIGNED(fence_map->width *
osd_hw.color_info[index]->bpp) * fence_map->height;
-
+ #endif
osd_hw.pandata[index].x_start = 0;
osd_hw.pandata[index].x_end = fence_map->width - 1;
osd_hw.pandata[index].y_start = 0;
u32 x_start, x_end, y_start, y_end;
bool freescale_update = false;
struct pandata_s freescale_dst[HW_OSD_COUNT];
+ #ifndef REMOVE_PHYS_TO_VIRT
void *vaddr = NULL;
+ #endif
ext_addr = ext_addr + fence_map->byte_stride * fence_map->yoffset;
+ #ifndef REMOVE_PHYS_TO_VIRT
vaddr = phys_to_virt(ext_addr);
+ #endif
if (!osd_hw.osd_afbcd[index].enable) {
canvas_config(osd_hw.fb_gem[index].canvas_idx,
fence_map->byte_stride,
fence_map->height,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
+ #ifndef REMOVE_PHYS_TO_VIRT
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
fence_map->byte_stride * fence_map->height;
+ #endif
} else {
osd_hw.osd_afbcd[index].phy_addr = ext_addr;
osd_hw.osd_afbcd[index].frame_width =
else
osd_hw.osd_afbcd[index].conv_lbuf_len = 1024;
}
+ #ifndef REMOVE_PHYS_TO_VIRT
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] = fence_map->afbc_len;
+ #endif
}
width_dst = osd_hw.free_dst_data_backup[index].x_end -
osd_hw.free_dst_data_backup[index].x_start + 1;
osd_hw.free_dst_data_backup[index].y_start + 1;
height_src = osd_hw.free_src_data_backup[index].y_end -
osd_hw.free_src_data_backup[index].y_start + 1;
-
if (osd_hw.free_scale_enable[index] ||
(width_src != width_dst) ||
(height_src != height_dst) ||
u32 index = layer_map->fb_index;
const struct color_bit_define_s *color = NULL;
u32 ext_addr = 0;
+ #ifndef REMOVE_PHYS_TO_VIRT
void *vaddr = NULL;
+ #endif
u32 format = 0;
if (index > OSD_MAX)
layer_map->byte_stride *
layer_map->src_y;
#endif
+
+ #ifndef REMOVE_PHYS_TO_VIRT
vaddr = phys_to_virt(ext_addr);
+ #endif
if (!osd_hw.osd_afbcd[index].enable) {
/*ext_addr is no crop, so height =
* layer_map->src_h + layer_map->src_y
layer_map->src_h + layer_map->src_y,
CANVAS_ADDR_NOWRAP,
CANVAS_BLKMODE_LINEAR);
+ #ifndef REMOVE_PHYS_TO_VIRT
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
layer_map->byte_stride * layer_map->src_h;
+ #endif
} else {
osd_hw.osd_afbcd[index].phy_addr = ext_addr;
if (osd_hw.osd_meson_dev.afbc_type ==
else
osd_hw.osd_afbcd[index]
.conv_lbuf_len = 1024;
+ #ifndef REMOVE_PHYS_TO_VIRT
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
layer_map->afbc_len;
-
+ #endif
} else if (osd_hw.osd_meson_dev
.afbc_type == MALI_AFBC) {
osd_hw.osd_afbcd[index].frame_width =
//BYTE_32_ALIGNED(layer_map->src_w);
osd_hw.osd_afbcd[index].frame_height =
BYTE_8_ALIGNED(layer_map->src_h);
+ #ifndef REMOVE_PHYS_TO_VIRT
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
layer_map->afbc_len;
+ #endif
}
}
-
/* just get para, need update via do_hwc */
osd_hw.order[index] = layer_map->zorder;
switch (layer_map->blend_mode) {
u32 x_start, x_end, y_start, y_end;
bool freescale_update = false;
struct pandata_s freescale_dst[HW_OSD_COUNT];
+
+ #ifndef REMOVE_PHYS_TO_VIRT
void *vaddr = NULL;
+ #endif
phy_addr = phy_addr + plane_map->byte_stride * plane_map->src_y;
+
+ #ifndef REMOVE_PHYS_TO_VIRT
vaddr = phys_to_virt(phy_addr);
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
memset(vaddr, 0x0,
plane_map->byte_stride*plane_map->src_h);
}
+ #endif
osd_log_dbg(MODULE_RENDER, "canvas_id=%x, phy_addr=%x\n",
osd_hw.fb_gem[index].canvas_idx, phy_addr);
canvas_config(osd_hw.fb_gem[index].canvas_idx,
u32 phy_addr = plane_map->phy_addr;
u32 x_start, x_end, y_start, y_end;
u32 x, y;
+
+ #ifndef REMOVE_PHYS_TO_VIRT
void *vaddr = NULL;
+ #endif
+
struct pandata_s disp_tmp;
struct pandata_s free_dst_data_backup;
if (index != OSD2)
return;
phy_addr = phy_addr + plane_map->byte_stride * plane_map->src_y;
+
+ #ifndef REMOVE_PHYS_TO_VIRT
vaddr = phys_to_virt(phy_addr);
osd_hw.screen_base[index] = vaddr;
osd_hw.screen_size[index] =
memset(vaddr, 0x0,
plane_map->byte_stride*plane_map->src_h);
}
+ #endif
canvas_config(osd_hw.fb_gem[index].canvas_idx,
phy_addr,
plane_map->byte_stride,