struct pandata_s cursor_dispdata[HW_OSD_COUNT];
struct dispdata_s src_data[HW_OSD_COUNT];
struct dispdata_s dst_data[HW_OSD_COUNT];
+ u32 src_crop[HW_OSD_COUNT];
u32 buffer_alloc[HW_OSD_COUNT];
u32 gbl_alpha[HW_OSD_COUNT];
u32 color_key[HW_OSD_COUNT];
osd_hw.dst_data[index].y = layer_map->dst_y;
osd_hw.dst_data[index].w = layer_map->dst_w;
osd_hw.dst_data[index].h = layer_map->dst_h;
+ if ((layer_map->fb_height != layer_map->src_h) ||
+ (layer_map->fb_width != layer_map->src_w))
+ osd_hw.src_crop[index] = 1;
+ else
+ osd_hw.src_crop[index] = 0;
if (osd_hw.osd_meson_dev.osd_ver <= OSD_NORMAL) {
osd_hw.free_src_data[index].x_start = layer_map->src_x;
osd_hw.free_src_data[index].y_start = layer_map->src_y;
static void uniformization_fb(u32 index,
struct hw_osd_blending_s *blending)
{
+ if ((index == OSD1) && osd_hw.src_crop[index]) {
+ blending->screen_ratio_w_den =
+ osd_hw.src_data[index].w;
+ blending->screen_ratio_h_den =
+ osd_hw.src_data[index].h;
+ }
blending->dst_data.x = osd_hw.dst_data[index].x *
blending->screen_ratio_w_den /
blending->screen_ratio_w_num;