Skip to contentSkip to conversation

DRM: armada: fix corruption while loading cursors

PATCH New Russell King 1 participant 1 message Apr 7, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DRM: armada: fix corruption while loading cursors

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.

---
David,

Could you take this patch - it's also a good idea that it's back ported to stable kernels as it affects all releases which this driver has been in. I don't see the need for a pull request as this is just a single patch.

Thanks.

 drivers/gpu/drm/armada/armada_crtc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/armada/armada_crtc.c +1 -0
index 19ffd5c22944..357e5eb59e89 100644
@@ -678,6 +678,7 @@ static void armada_load_cursor_argb(void __iomem *base, uint32_t *pix,
 				       base + LCD_SPU_SRAM_WRDAT);
 			writel_relaxed(addr | SRAM_WRITE,
 				       base + LCD_SPU_SRAM_CTRL);
+			readl_relaxed(base + LCD_SPU_HWC_OVSA_HPXL_VLN);
 			addr += 1;
 			if ((addr & 0x00ff) == 0)
 				addr += 0xf00;
Signature · 1 line
1.8.3.1