drm/tilcdc: Fix load mode bit-field setting in tilcdc_crtc_enable()
authorJyri Sarha <jsarha@ti.com>
Sat, 19 Nov 2016 16:00:32 +0000 (18:00 +0200)
committerJyri Sarha <jsarha@ti.com>
Wed, 30 Nov 2016 12:19:16 +0000 (14:19 +0200)
Set LCDC_PALETTE_LOAD_MODE bit-field with new tilcdc_write_mask()
instead of tilcdc_set(). Setting a bit-fields with tilcdc_set() is
fundamentally broken.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

index 4605942b0ab93508838f0bd648a75716a0666682..1ed65dd5befe212e13a92f2a6841315b288e17a4 100644 (file)
@@ -237,7 +237,9 @@ static void tilcdc_crtc_enable(struct drm_crtc *crtc)
        tilcdc_crtc_enable_irqs(dev);
 
        tilcdc_clear(dev, LCDC_DMA_CTRL_REG, LCDC_DUAL_FRAME_BUFFER_ENABLE);
-       tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_PALETTE_LOAD_MODE(DATA_ONLY));
+       tilcdc_write_mask(dev, LCDC_RASTER_CTRL_REG,
+                         LCDC_PALETTE_LOAD_MODE(DATA_ONLY),
+                         LCDC_PALETTE_LOAD_MODE_MASK);
        tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
 
        drm_crtc_vblank_on(crtc);