From 9a3bfdf584c844af38f305c2dde3a35a13692746 Mon Sep 17 00:00:00 2001 From: pengcheng chen Date: Mon, 29 Oct 2018 15:08:04 +0800 Subject: [PATCH] osd: add hdr mode set via meson-hwc support [1/1] PD#163001 Problem: hdr mode set not supported Solution: add hdr mode set via meson-hwc support Verify: verified in u200 board Change-Id: Iaad75982003870f9469e4155aedb9c13349b60b9 Signed-off-by: pengcheng chen --- drivers/amlogic/media/osd/osd.h | 1 + drivers/amlogic/media/osd/osd_hw.c | 2 ++ drivers/amlogic/media/osd/osd_sync.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/amlogic/media/osd/osd.h b/drivers/amlogic/media/osd/osd.h index 0375b5c..253d9cb 100644 --- a/drivers/amlogic/media/osd/osd.h +++ b/drivers/amlogic/media/osd/osd.h @@ -465,6 +465,7 @@ struct layer_fence_map_s { struct osd_layers_fence_map_s { struct list_head list; int out_fd; + unsigned char hdr_mode; struct display_flip_info_s disp_info; struct layer_fence_map_s layer_map[HW_OSD_COUNT]; }; diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 09ea121f..6569850 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -1159,6 +1159,7 @@ int osd_sync_do_hwc(struct do_hwc_cmd_s *hwc_cmd) hwc_cmd->disp_info.position_w; fence_map->disp_info.position_h = hwc_cmd->disp_info.position_h; + fence_map->hdr_mode = hwc_cmd->hdr_mode; /* other info set via add_sync and blank ioctl */ list_add_tail(&fence_map->list, &post_fence_list); /* after do_hwc, clear osd_hw.out_fence_fd */ @@ -4264,6 +4265,7 @@ static void osd_pan_display_layers_fence( if (osd_hw.osd_fps_start) osd_hw.osd_fps++; clear_backup_info(); + osd_hw.hdr_used = fence_map->hdr_mode; for (i = 0; i < osd_count; i++) { layer_map = &fence_map->layer_map[i]; index = layer_map->fb_index; diff --git a/drivers/amlogic/media/osd/osd_sync.h b/drivers/amlogic/media/osd/osd_sync.h index b38c185..77f754ca 100644 --- a/drivers/amlogic/media/osd/osd_sync.h +++ b/drivers/amlogic/media/osd/osd_sync.h @@ -111,6 +111,7 @@ struct display_flip_info_s { }; struct do_hwc_cmd_s { int out_fen_fd; + unsigned char hdr_mode; struct display_flip_info_s disp_info; }; #endif -- 2.7.4