From patchwork Thu Mar 31 10:11:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 678841 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2VABUHP027273 for ; Thu, 31 Mar 2011 10:11:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757220Ab1CaKL3 (ORCPT ); Thu, 31 Mar 2011 06:11:29 -0400 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:47659 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933501Ab1CaKL2 (ORCPT ); Thu, 31 Mar 2011 06:11:28 -0400 Received: from source ([74.125.82.47]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTZRTT2cuaTzpmRB0Pv0a1inLkcURGVEl@postini.com; Thu, 31 Mar 2011 03:11:28 PDT Received: by mail-ww0-f47.google.com with SMTP id 4so3026212wwk.4 for ; Thu, 31 Mar 2011 03:11:27 -0700 (PDT) Received: by 10.216.72.201 with SMTP id t51mr1946949wed.6.1301566286773; Thu, 31 Mar 2011 03:11:26 -0700 (PDT) Received: from deskari (a62-248-146-119.elisa-laajakaista.fi [62.248.146.119]) by mx.google.com with ESMTPS id d6sm429627wer.26.2011.03.31.03.11.25 (version=SSLv3 cipher=OTHER); Thu, 31 Mar 2011 03:11:26 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 3/9] OMAP: DSS2: make 50ms bug-fix sleep optional Date: Thu, 31 Mar 2011 13:11:00 +0300 Message-Id: <1301566266-11187-4-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1301566266-11187-1-git-send-email-tomi.valkeinen@ti.com> References: <1301566266-11187-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 31 Mar 2011 10:11:30 +0000 (UTC) diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index bfc5da0..458cfe1 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -125,4 +125,15 @@ config OMAP2_DSS_MIN_FCK_PER_PCK Max FCK is 173MHz, so this doesn't work if your PCK is very high. +config OMAP2_DSS_SLEEP_BEFORE_RESET + bool "Sleep 50ms before DSS reset" + default y + help + For some unknown reason we may get SYNC_LOST errors from the display + subsystem at initialization time if we don't sleep before resetting + the DSS. See the source (dss.c) for more comments. + + However, 50ms is quite long time to sleep, and with some + configurations the SYNC_LOST may never happen, so the sleep can + be disabled here. endif diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 3f1fee6..688947f 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -659,13 +659,18 @@ static int dss_init(void) * the kernel resets it */ omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440); +#ifdef CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET /* We need to wait here a bit, otherwise we sometimes start to * get synclost errors, and after that only power cycle will * restore DSS functionality. I have no idea why this happens. * And we have to wait _before_ resetting the DSS, but after * enabling clocks. + * + * This bug was at least present on OMAP3430. It's unknown + * if it happens on OMAP2 or OMAP3630. */ msleep(50); +#endif _omap_dss_reset();