[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-25 Thread Daniel Vetter
On Thu, Nov 24, 2016 at 10:32:59PM +0200, Jyri Sarha wrote: > On 11/24/16 14:56, Tomi Valkeinen wrote: > > On 24/11/16 14:03, Jyri Sarha wrote: > > > >>> The suspend/resume you're talking there is the system suspend/resume. > >>> That's quite different than the runtime suspend/resume, and they sho

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Jyri Sarha
On 11/24/16 14:56, Tomi Valkeinen wrote: > On 24/11/16 14:03, Jyri Sarha wrote: > >>> The suspend/resume you're talking there is the system suspend/resume. >>> That's quite different than the runtime suspend/resume, and they should >>> do very different things. >>> >>> The current system suspend/r

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Tomi Valkeinen
On 24/11/16 14:03, Jyri Sarha wrote: >> The suspend/resume you're talking there is the system suspend/resume. >> That's quite different than the runtime suspend/resume, and they should >> do very different things. >> >> The current system suspend/resume in tilcdc looks fine. >> > > I don't undest

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Jyri Sarha
On 11/24/16 13:10, Tomi Valkeinen wrote: > On 24/11/16 12:38, Jyri Sarha wrote: > >>> As long as the driver makes sure the device doesn't go to suspend (by >>> having called pm_runtime_get). >> >> Runtime get has always been called when modeset_nofb() is called. > > Yes, runtime get is needed to

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Tomi Valkeinen
On 24/11/16 12:38, Jyri Sarha wrote: >> As long as the driver makes sure the device doesn't go to suspend (by >> having called pm_runtime_get). > > Runtime get has always been called when modeset_nofb() is called. Yes, runtime get is needed to access the HW, but the question here was "has runtim

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Jyri Sarha
On 11/24/16 12:25, Tomi Valkeinen wrote: > On 24/11/16 12:03, Jyri Sarha wrote: >> On 11/24/16 11:43, Tomi Valkeinen wrote: >>> What is the difference? If mode changes, you need to disable and enable >>> the crtc, right? What other cases there are to enable the display? After >>> blank? Then the di

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Tomi Valkeinen
On 24/11/16 12:03, Jyri Sarha wrote: > On 11/24/16 11:43, Tomi Valkeinen wrote: >> What is the difference? If mode changes, you need to disable and enable >> the crtc, right? What other cases there are to enable the display? After >> blank? Then the display has been off, and I presume palette has t

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Jyri Sarha
On 11/24/16 11:43, Tomi Valkeinen wrote: > What is the difference? If mode changes, you need to disable and enable > the crtc, right? What other cases there are to enable the display? After > blank? Then the display has been off, and I presume palette has to be > loaded. At the moment the palette

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Tomi Valkeinen
On 24/11/16 11:39, Jyri Sarha wrote: > On 11/24/16 11:29, Tomi Valkeinen wrote: >>> @@ -213,6 +274,13 @@ static void tilcdc_crtc_off(struct drm_crtc *crtc, >>> bool shutdown) __func__); } + /* + * LCDC will not retain the palette when res

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Jyri Sarha
On 11/24/16 11:29, Tomi Valkeinen wrote: >> @@ -213,6 +274,13 @@ static void tilcdc_crtc_off(struct drm_crtc *crtc, bool >> shutdown) >> >__func__); >> >} >> > >> > + /* >> > + * LCDC will not retain the palette when reset. Make sure it gets >> > + * reloaded

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-24 Thread Tomi Valkeinen
On 22/11/16 18:54, Jyri Sarha wrote: > From: Bartosz Golaszewski > > 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'

[PATCH v3 02/11] drm/tilcdc: implement palette loading for rev1

2016-11-22 Thread Jyri Sarha
From: Bartosz Golaszewski 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: Bartos