From 6913eaacf9bf25394a3debcd686f106dce90423f Mon Sep 17 00:00:00 2001 From: Pengcheng Chen Date: Tue, 9 Apr 2019 13:22:03 +0800 Subject: [PATCH] osd: osd display color abnormal when run drm [1/1] PD#SWPL-6867 Problem: osd dispaly color abnormal because osd enable not update. Solution: update osd enalbe flag in drm process. Verify: Verified u212 Change-Id: I1c2e8b62d9d5af203c95d3d0ac940fb512dd8e5e Signed-off-by: Pengcheng Chen --- drivers/amlogic/media/osd/osd_hw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 8a9e641e0d6b..cde532f43aac 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -4866,7 +4866,8 @@ static void osd_update_disp_freescale_enable(u32 index) else vf_bank_len = 4; - if (osd_hw.hwc_enable && (index == OSD1)) + output_index = get_output_device_id(index); + if (osd_hw.hwc_enable[output_index] && (index == OSD1)) shift_workaround = osd_hw.workaround_line; #ifndef NEW_PPS_PHASE @@ -4923,7 +4924,6 @@ static void osd_update_disp_freescale_enable(u32 index) else vf_phase_step = (src_h << 20) / dst_h; - output_index = get_output_device_id(index); #ifdef NEW_PPS_PHASE if (osd_hw.field_out_en[output_index]) { struct osd_f2v_vphase_s vphase; @@ -10345,6 +10345,7 @@ void osd_page_flip(struct osd_plane_map_s *plane_map) osd_hw.buffer_alloc[index] = 1; if (osd_hw.osd_fps_start[output_index]) osd_hw.osd_fps[output_index]++; + osd_enable = (plane_map->enable & 1) ? ENABLE : DISABLE; if (output_index == VIU1) vinfo = get_current_vinfo();