[PATCH v2 7/7] drm/tilcdc: Load palette at the end of mode_set_nofb()

Jyri Sarha jsarha at ti.com
Sat Nov 19 15:58:39 UTC 2016


On 11/18/16 23:53, Jyri Sarha wrote:
>> Ok, got it. You need to set the palette loading mode back to 'palette
>> > and data' before returning. Just add this at the end:
>> > 
>> > tilcdc_write_mask(dev, LCDC_RASTER_CTRL_REG,
>> >  LCDC_PALETTE_LOAD_MODE(PALETTE_AND_DATA),
>> >  LCDC_PALETTE_LOAD_MODE_MASK);
> Really? I wonder why, because we anyway set it to data only when we turn
> the display on. The raster is not turned on before that so the register
> value should not matter. I need to investigate what really happens.
> 
> However, for now I think I should just add it. There should not be any
> harm in doing that.
> 

Now I got it. The problem is of course the wrong usage of tilcdc_set()
for the palette load mode bit-field in tilcdc_crtc_enable(). I'll change:

tilcdc_set(dev, LCDC_RASTER_CTRL_REG,
	LCDC_PALETTE_LOAD_MODE(DATA_ONLY));

to

tilcdc_write_mask(dev, LCDC_RASTER_CTRL_REG,
		LCDC_PALETTE_LOAD_MODE(DATA_ONLY),
		LCDC_PALETTE_LOAD_MODE_MASK);

in tilcdc_crtc_enable(). That should fix the problem.

Cheers,
Jyri


More information about the dri-devel mailing list