Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938768AbcJXJre (ORCPT ); Mon, 24 Oct 2016 05:47:34 -0400 Received: from mail-yb0-f178.google.com ([209.85.213.178]:33276 "EHLO mail-yb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938670AbcJXJrd (ORCPT ); Mon, 24 Oct 2016 05:47:33 -0400 MIME-Version: 1.0 In-Reply-To: <9cabd4e2-b7a3-6925-e8a6-c399e96b537b@ti.com> References: <1477298581-31291-1-git-send-email-bgolaszewski@baylibre.com> <9cabd4e2-b7a3-6925-e8a6-c399e96b537b@ti.com> From: Bartosz Golaszewski Date: Mon, 24 Oct 2016 11:47:31 +0200 Message-ID: Subject: Re: [PATCH v2] drm: tilcdc: implement palette loading for rev1 To: Jyri Sarha Cc: Tomi Valkeinen , David Airlie , Kevin Hilman , Michael Turquette , Sekhar Nori , LKML , linux-drm , Laurent Pinchart , Peter Ujfalusi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 42 2016-10-24 11:25 GMT+02:00 Jyri Sarha : > 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 >> --- >> 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