Re: [PATCH v2] drm: tilcdc: implement palette loading for rev1

From: Bartosz Golaszewski
Date: Mon Oct 24 2016 - 05:47:37 EST


2016-10-24 11:25 GMT+02:00 Jyri Sarha <jsarha@xxxxxx>:
> On 10/24/16 11:43, Bartosz Golaszewski wrote:
>> Revision 1 of the IP doesn't work if we don't load the palette (even
>> if it's not used, which is the case for the RGB565 format).
>>
>> Add a function called from tilcdc_crtc_enable() which performs all
>> required actions if we're dealing with a rev1 chip.
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>> ---
>> v1 -> v2:
>> - only allocate dma memory for revision 1
>>
>
>
> Is it enough to load the palette only once? What if lcdc is powered down
> by power management in the middle?
>
> I think you should reinit the completion struct at least in
> tilcdc_pm_resume(), if not in tilcdc_crtc_disable().
>
> Cheers,
> Jyri
>

Hi Jyri,

I ran the following test:

- tilcdc_crtc_enable() was called on device init
- ran modetest -M tilcdc -s 26:800x600@RG16 and quit
- waited for the screen to go blank
- tilcdc_crtc_disable() was called
- ran modetest again
- tilcdc_crtc_enable() was called again, this time without calling
tilcdc_crtc_load_palette()
- color bar still correctly displayed

Seems like it's only needed once.

Thanks,
Bartosz