Commit ea2c40b5 authored by Russell King's avatar Russell King Committed by Kamal Mostafa

DRM: armada: fix corruption while loading cursors

commit c39b0695 upstream.

Loading cursors to the LCD controller's SRAM can be corrupted when the
configured pixel clock is relatively slow.  This seems to be caused
when we write back-to-back to the SRAM registers.

There doesn't appear to be any status register we can read to check
when an access has completed.

Inserting a dummy read between the writes appears to fix the problem.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 6b59aed9
...@@ -678,6 +678,7 @@ static void armada_load_cursor_argb(void __iomem *base, uint32_t *pix, ...@@ -678,6 +678,7 @@ static void armada_load_cursor_argb(void __iomem *base, uint32_t *pix,
base + LCD_SPU_SRAM_WRDAT); base + LCD_SPU_SRAM_WRDAT);
writel_relaxed(addr | SRAM_WRITE, writel_relaxed(addr | SRAM_WRITE,
base + LCD_SPU_SRAM_CTRL); base + LCD_SPU_SRAM_CTRL);
readl_relaxed(base + LCD_SPU_HWC_OVSA_HPXL_VLN);
addr += 1; addr += 1;
if ((addr & 0x00ff) == 0) if ((addr & 0x00ff) == 0)
addr += 0xf00; addr += 0xf00;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment