From patchwork Thu Mar 31 10:11:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 678881 X-Patchwork-Delegate: tomi.valkeinen@nokia.com 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 p2VABXJl027344 for ; Thu, 31 Mar 2011 10:11:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933879Ab1CaKLb (ORCPT ); Thu, 31 Mar 2011 06:11:31 -0400 Received: from na3sys009aog117.obsmtp.com ([74.125.149.242]:56672 "EHLO na3sys009aog117.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757218Ab1CaKLa (ORCPT ); Thu, 31 Mar 2011 06:11:30 -0400 Received: from source ([74.125.82.50]) (using TLSv1) by na3sys009aob117.postini.com ([74.125.148.12]) with SMTP ID DSNKTZRTUKearBtSB16Oude/tW8+on7QjXs2@postini.com; Thu, 31 Mar 2011 03:11:30 PDT Received: by mail-ww0-f50.google.com with SMTP id 33so2394259wwc.19 for ; Thu, 31 Mar 2011 03:11:28 -0700 (PDT) Received: by 10.216.82.77 with SMTP id n55mr2431342wee.52.1301566288304; Thu, 31 Mar 2011 03:11:28 -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.26 (version=SSLv3 cipher=OTHER); Thu, 31 Mar 2011 03:11:27 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 4/9] OMAP: DSS2: VENC: make 20ms venc bug-fix sleep optional Date: Thu, 31 Mar 2011 13:11:01 +0300 Message-Id: <1301566266-11187-5-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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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:34 +0000 (UTC) diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index 458cfe1..5b45c0c 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -136,4 +136,16 @@ config OMAP2_DSS_SLEEP_BEFORE_RESET 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. + +config OMAP2_DSS_SLEEP_AFTER_VENC_RESET + bool "Sleep 20ms after VENC reset" + default y + help + There is a 20ms sleep after VENC reset which seemed to fix the + reset. The reason for the bug is unclear, and it's also unclear + on what platforms this happens. + + This option enables the sleep, and is enabled by default. You can + disable the sleep if it doesn't cause problems on your platform. + endif diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 8e35a5b..8c7af90 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -373,8 +373,11 @@ static void venc_reset(void) } } +#ifdef CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET /* the magical sleep that makes things work */ + /* XXX more info? What bug this circumvents? */ msleep(20); +#endif } static void venc_enable_clocks(int enable)