osd: add afbc source crop support [2/2]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Tue, 26 Feb 2019 10:51:50 +0000 (18:51 +0800)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:45:37 +0000 (14:45 +0800)
PD#OTT-2168

Problem:
media control bar can't displayed because afbc source crop not support

Solution:
add afbc source crop support

Verify:
verify on raven

Change-Id: Ib1f925aeea12ba18d8f976aba8c84f0738c41293
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
drivers/amlogic/media/osd/osd.h
drivers/amlogic/media/osd/osd_hw.c
drivers/amlogic/media/osd/osd_sync.h

index 2884b1f..8003c51 100644 (file)
@@ -451,6 +451,8 @@ struct layer_fence_map_s {
        u32 ext_addr;
        u32 format;
        u32 compose_type;
+       u32 fb_width;
+       u32 fb_height;
        u32 src_x;
        u32 src_y;
        u32 src_w;
index c271c42..c145728 100644 (file)
@@ -1073,6 +1073,8 @@ static int sync_render_layers_fence(u32 index, u32 yres,
        fence_map->layer_map[index].ext_addr = phys_addr;
        fence_map->layer_map[index].format = request->format;
        fence_map->layer_map[index].compose_type = request->type;
+       fence_map->layer_map[index].fb_width = request->fb_width;
+       fence_map->layer_map[index].fb_height = request->fb_height;
        fence_map->layer_map[index].src_x = request->xoffset;
        fence_map->layer_map[index].src_y = request->yoffset;
        fence_map->layer_map[index].src_w = request->width;
@@ -4225,7 +4227,8 @@ static void osd_pan_display_update_info(struct layer_fence_map_s *layer_map)
                                        layer_map->byte_stride / 4;
                                        //BYTE_32_ALIGNED(layer_map->src_w);
                                osd_hw.osd_afbcd[index].frame_height =
-                                       BYTE_8_ALIGNED(layer_map->src_h);
+                                       BYTE_8_ALIGNED(layer_map->fb_height);
+                                       /*BYTE_8_ALIGNED(layer_map->src_h);*/
                                osd_hw.screen_base[index] = ext_addr;
                                osd_hw.screen_size[index] =
                                        layer_map->afbc_len;
index 77f754c..dd8c085 100644 (file)
@@ -88,6 +88,8 @@ struct sync_req_render_s {
        unsigned char  plane_alpha;
        unsigned char  dim_layer;
        unsigned int  dim_color;
+       int  fb_width;
+       int  fb_height;
        int  reserve;
 };