From patchwork Fri Jan 8 13:22:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 71780 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o08DMKBh013169 for ; Fri, 8 Jan 2010 13:22:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284Ab0AHNWj (ORCPT ); Fri, 8 Jan 2010 08:22:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753250Ab0AHNWi (ORCPT ); Fri, 8 Jan 2010 08:22:38 -0500 Received: from smtp.nokia.com ([192.100.122.233]:48279 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082Ab0AHNWg (ORCPT ); Fri, 8 Jan 2010 08:22:36 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o08DMRuq027702; Fri, 8 Jan 2010 15:22:35 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 Jan 2010 15:22:14 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 Jan 2010 15:22:13 +0200 Received: from localhost.localdomain (esdhcp04146.research.nokia.com [172.21.41.46]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o08DM1QE024564; Fri, 8 Jan 2010 15:22:08 +0200 From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 04/15] OMAP: DSS2: Fix crash when panel doesn't define enable_te() Date: Fri, 8 Jan 2010 15:22:38 +0200 Message-Id: <1262956969-1664-5-git-send-email-tomi.valkeinen@nokia.com> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1262956969-1664-4-git-send-email-tomi.valkeinen@nokia.com> References: <1262956969-1664-1-git-send-email-tomi.valkeinen@nokia.com> <1262956969-1664-2-git-send-email-tomi.valkeinen@nokia.com> <1262956969-1664-3-git-send-email-tomi.valkeinen@nokia.com> <1262956969-1664-4-git-send-email-tomi.valkeinen@nokia.com> X-OriginalArrivalTime: 08 Jan 2010 13:22:13.0819 (UTC) FILETIME=[975028B0:01CA9065] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index f3eaf12..2881d93 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2933,11 +2933,15 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev, static int dsi_set_te(struct omap_dss_device *dssdev, bool enable) { - int r; - r = dssdev->driver->enable_te(dssdev, enable); - /* XXX for some reason, DSI TE breaks if we don't wait here. - * Panel bug? Needs more studying */ - msleep(100); + int r = 0; + + if (dssdev->driver->enable_te) { + r = dssdev->driver->enable_te(dssdev, enable); + /* XXX for some reason, DSI TE breaks if we don't wait here. + * Panel bug? Needs more studying */ + msleep(100); + } + return r; }