From 0e65808d84633fd8a7980ca22136bf19f7cb2165 Mon Sep 17 00:00:00 2001 From: Pengcheng Chen Date: Tue, 26 Feb 2019 18:51:50 +0800 Subject: [PATCH] osd: add afbc source crop support [2/2] 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 --- drivers/amlogic/media/osd/osd.h | 2 ++ drivers/amlogic/media/osd/osd_hw.c | 5 ++++- drivers/amlogic/media/osd/osd_sync.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/media/osd/osd.h b/drivers/amlogic/media/osd/osd.h index 2884b1f..8003c51 100644 --- a/drivers/amlogic/media/osd/osd.h +++ b/drivers/amlogic/media/osd/osd.h @@ -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; diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index c271c42..c145728 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -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; diff --git a/drivers/amlogic/media/osd/osd_sync.h b/drivers/amlogic/media/osd/osd_sync.h index 77f754ca..dd8c085 100644 --- a/drivers/amlogic/media/osd/osd_sync.h +++ b/drivers/amlogic/media/osd/osd_sync.h @@ -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; }; -- 2.7.4