From patchwork Wed Jun 22 08:45:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 904022 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5M8jqAL032258 for ; Wed, 22 Jun 2011 08:45:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753944Ab1FVIpv (ORCPT ); Wed, 22 Jun 2011 04:45:51 -0400 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:57178 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754184Ab1FVIpu (ORCPT ); Wed, 22 Jun 2011 04:45:50 -0400 Received: from mail-bw0-f53.google.com ([209.85.214.53]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTgGrvJERhBOGp6/vJ9bxLfqei6ba1slR@postini.com; Wed, 22 Jun 2011 01:45:49 PDT Received: by bwg12 with SMTP id 12so711089bwg.12 for ; Wed, 22 Jun 2011 01:45:47 -0700 (PDT) Received: by 10.204.2.141 with SMTP id 13mr332100bkj.20.1308732345846; Wed, 22 Jun 2011 01:45:45 -0700 (PDT) Received: from localhost.localdomain (a62-248-131-233.elisa-laajakaista.fi [62.248.131.233]) by mx.google.com with ESMTPS id v6sm312497bkf.23.2011.06.22.01.45.44 (version=SSLv3 cipher=OTHER); Wed, 22 Jun 2011 01:45:45 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 3/4] OMAP: DSS2: DSI: sync when disabling a display Date: Wed, 22 Jun 2011 11:45:25 +0300 Message-Id: <1308732326-17278-4-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308732326-17278-1-git-send-email-tomi.valkeinen@ti.com> References: <1308732326-17278-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 (demeter2.kernel.org [140.211.167.43]); Wed, 22 Jun 2011 08:45:52 +0000 (UTC) When the panel driver calls omapdss_dsi_display_disable() it is possible that there are still some unsent packets in the TX fifo. Add dsi_sync_vc() calls in the beginning of omapdss_dsi_display_disable() to make sure the TX fifos are empty. This allows us to remove the msleep(10) hack from panel-taal.c Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/displays/panel-taal.c | 5 +---- drivers/video/omap2/dss/dsi.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 4cb0449..4e888ac 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -1247,11 +1247,8 @@ static void taal_power_off(struct omap_dss_device *dssdev) int r; r = taal_dcs_write_0(td, DCS_DISPLAY_OFF); - if (!r) { + if (!r) r = taal_sleep_in(td); - /* HACK: wait a bit so that the message goes through */ - msleep(10); - } if (r) { dev_err(&dssdev->dev, diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index b6a57bb..62b11c5 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -4263,6 +4263,11 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, mutex_lock(&dsi->lock); + dsi_sync_vc(dsidev, 0); + dsi_sync_vc(dsidev, 1); + dsi_sync_vc(dsidev, 2); + dsi_sync_vc(dsidev, 3); + dsi_display_uninit_dispc(dssdev); dsi_display_uninit_dsi(dssdev, disconnect_lanes, enter_ulps);