Skip to content

Commit

Permalink
fbdev: sh_mobile_lcdc: Fix overlay registers update during pan operation
Browse files Browse the repository at this point in the history
Updating overlay registers require switching to overlay update mode.
This was correctly done when configuring the overlay format and size,
but not when updating the base address registers during pan operation.
Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  • Loading branch information
Laurent Pinchart committed Jul 19, 2012
1 parent 15dede8 commit 8be7c66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,9 +1539,14 @@ static int sh_mobile_lcdc_overlay_pan(struct fb_var_screeninfo *var,
ovl->base_addr_c = base_addr_c;
}

lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index));

lcdc_write_overlay(ovl, LDBnBSAYR(ovl->index), ovl->base_addr_y);
lcdc_write_overlay(ovl, LDBnBSACR(ovl->index), ovl->base_addr_c);

lcdc_write(ovl->channel->lcdc, LDBCR,
LDBCR_UPF(ovl->index) | LDBCR_UPD(ovl->index));

ovl->pan_offset = pan_offset;

return 0;
Expand Down

0 comments on commit 8be7c66

Please sign in to comment.