From patchwork Mon May 3 06:18:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 96426 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.3) with ESMTP id o436JMPj009828 for ; Mon, 3 May 2010 06:19:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932071Ab0ECGTT (ORCPT ); Mon, 3 May 2010 02:19:19 -0400 Received: from smtp.nokia.com ([192.100.122.230]:34466 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755607Ab0ECGS4 (ORCPT ); Mon, 3 May 2010 02:18:56 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o436IgM3019422; Mon, 3 May 2010 09:18:52 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 May 2010 09:18:46 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 May 2010 09:18:45 +0300 Received: from localhost.localdomain (esdhcp04142.research.nokia.com [172.21.41.42]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o436Igod008122; Mon, 3 May 2010 09:18:45 +0300 From: Jani Nikula To: Tomi.Valkeinen@Nokia.com, tony@atomide.com Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, ext-jani.1.nikula@Nokia.com Subject: [PATCH v2 08/21] OMAP: DSS2: Taal: Improve taal_power_on() error handling Date: Mon, 3 May 2010 09:18:28 +0300 Message-Id: <1a68710812da041ef583944411a1b7027d216c96.1272621452.git.ext-jani.1.nikula@nokia.com> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: References: <1ef57e99d69aaf89b8e61074aa8ce2e5f6632d28.1272621452.git.ext-jani.1.nikula@nokia.com> <7a01973540a3afa79701ee08a3d8732db4687d5b.1272621452.git.ext-jani.1.nikula@nokia.com> In-Reply-To: References: X-OriginalArrivalTime: 03 May 2010 06:18:45.0774 (UTC) FILETIME=[7C716AE0:01CAEA88] X-Nokia-AV: Clean 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 03 May 2010 06:19:22 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 3f4687a..a89b2e7 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -696,16 +696,32 @@ static int taal_power_on(struct omap_dss_device *dssdev) if (id2 == 0x00 || id2 == 0xff || id2 == 0x81) td->cabc_broken = true; - taal_dcs_write_1(DCS_BRIGHTNESS, 0xff); - taal_dcs_write_1(DCS_CTRL_DISPLAY, (1<<2) | (1<<5)); /* BL | BCTRL */ + r = taal_dcs_write_1(DCS_BRIGHTNESS, 0xff); + if (r) + goto err; - taal_dcs_write_1(DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */ + r = taal_dcs_write_1(DCS_CTRL_DISPLAY, + (1<<2) | (1<<5)); /* BL | BCTRL */ + if (r) + goto err; - taal_set_addr_mode(td->rotate, td->mirror); - if (!td->cabc_broken) - taal_dcs_write_1(DCS_WRITE_CABC, td->cabc_mode); + r = taal_dcs_write_1(DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */ + if (r) + goto err; - taal_dcs_write_0(DCS_DISPLAY_ON); + r = taal_set_addr_mode(td->rotate, td->mirror); + if (r) + goto err; + + if (!td->cabc_broken) { + r = taal_dcs_write_1(DCS_WRITE_CABC, td->cabc_mode); + if (r) + goto err; + } + + r = taal_dcs_write_0(DCS_DISPLAY_ON); + if (r) + goto err; r = _taal_enable_te(dssdev, td->te_enabled); if (r)