osd: osd display color abnormal when run drm [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Tue, 9 Apr 2019 05:22:03 +0000 (13:22 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Wed, 10 Apr 2019 01:44:36 +0000 (18:44 -0700)
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 <pengcheng.chen@amlogic.com>
drivers/amlogic/media/osd/osd_hw.c

index 8a9e641..cde532f 100644 (file)
@@ -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();