Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Cc: <stable@vger.kernel.org> # 3.13
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Russell King and committed by
Dave Airlie
c39b0695 9f97ba80

+1
+1
drivers/gpu/drm/armada/armada_crtc.c
··· 679 679 base + LCD_SPU_SRAM_WRDAT); 680 680 writel_relaxed(addr | SRAM_WRITE, 681 681 base + LCD_SPU_SRAM_CTRL); 682 + readl_relaxed(base + LCD_SPU_HWC_OVSA_HPXL_VLN); 682 683 addr += 1; 683 684 if ((addr & 0x00ff) == 0) 684 685 addr += 0xf00;