Skip to content

Commit

Permalink
osd: osd display error when work in 1080i and cvbs
Browse files Browse the repository at this point in the history
PD#151305: osd: osd display error when work in 1080i and cvbs

Change-Id: I75dbc06ceddf724210f3a2a858bc10685c829fcf
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
  • Loading branch information
Pengcheng Chen authored and akiernan committed Nov 3, 2022
1 parent c927ec6 commit b1b5d4c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/amlogic/media/osd/osd_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ int osd_set_scan_mode(u32 index)
}
if (osd_hw.free_scale_enable[index])
osd_hw.scan_mode[index] = SCAN_MODE_PROGRESSIVE;
if (osd_hw.osd_afbcd[OSD1].enable)
if (osd_hw.osd_afbcd[index].enable)
osd_hw.scan_mode[index] = SCAN_MODE_PROGRESSIVE;
if (index == OSD2) {
if (osd_hw.scan_mode[OSD2] == SCAN_MODE_INTERLACE)
Expand Down Expand Up @@ -1745,7 +1745,11 @@ void osd_get_flush_rate_hw(u32 *break_rate)

void osd_set_antiflicker_hw(u32 index, struct vinfo_s *vinfo, u32 yres)
{
if (is_interlaced(vinfo)) {
bool osd_need_antiflicker = false;

if (is_interlaced(vinfo))
osd_need_antiflicker = false;
if (osd_need_antiflicker) {
osd_hw.antiflicker_mode = 1;
osd_antiflicker_task_start();
osd_antiflicker_enable(1);
Expand Down Expand Up @@ -3749,7 +3753,8 @@ static void osd2_update_disp_geometry(void)
data32 = (osd_hw.dispdata[OSD2].x_start & 0xfff)
| (osd_hw.dispdata[OSD2].x_end & 0xfff) << 16;
VSYNCOSD_WR_MPEG_REG(VIU_OSD2_BLK0_CFG_W3, data32);
if (osd_hw.scan_mode[OSD2] == SCAN_MODE_INTERLACE)
if ((osd_hw.scan_mode[OSD2] == SCAN_MODE_INTERLACE) &&
osd_hw.dispdata[OSD2].y_start > 0)
data32 = (osd_hw.dispdata[OSD2].y_start & 0xfff)
| ((((osd_hw.dispdata[OSD2].y_end + 1
- osd_hw.dispdata[OSD2].y_start) >> 1)
Expand Down

0 comments on commit b1b5d4c

Please sign in to comment.