From patchwork Wed Mar 9 07:21:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 620491 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 p297MmvJ013229 for ; Wed, 9 Mar 2011 07:22:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754181Ab1CIHVs (ORCPT ); Wed, 9 Mar 2011 02:21:48 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:57395 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463Ab1CIHVr (ORCPT ); Wed, 9 Mar 2011 02:21:47 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p297Llud018102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2011 01:21:47 -0600 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id p297LkSG013334; Wed, 9 Mar 2011 01:21:46 -0600 (CST) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p297LkLC012662; Wed, 9 Mar 2011 01:21:46 -0600 (CST) Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Wed, 9 Mar 2011 01:21:46 -0600 Received: from deskari.norway.design.ti.com (h88-11.vpn.ti.com [172.24.88.11]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id p297LbE9009248; Wed, 9 Mar 2011 01:21:45 -0600 From: Tomi Valkeinen To: , CC: Tomi Valkeinen Subject: [PATCH 5/6] OMAP: DSS2: DSI: catch DSI errors in send_bta_sync Date: Wed, 9 Mar 2011 09:21:27 +0200 Message-ID: <1299655288-7121-6-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1299655288-7121-1-git-send-email-tomi.valkeinen@ti.com> References: <1299655288-7121-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 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]); Wed, 09 Mar 2011 07:22:50 +0000 (UTC) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 5672e40..ec5b879 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2230,24 +2230,31 @@ int dsi_vc_send_bta_sync(int channel) if (r) goto err0; - r = dsi_vc_send_bta(channel); + r = dsi_register_isr(dsi_completion_handler, &completion, + DSI_IRQ_ERROR_MASK); if (r) goto err1; + r = dsi_vc_send_bta(channel); + if (r) + goto err2; + if (wait_for_completion_timeout(&completion, msecs_to_jiffies(500)) == 0) { DSSERR("Failed to receive BTA\n"); r = -EIO; - goto err1; + goto err2; } err = dsi_get_errors(); if (err) { DSSERR("Error while sending BTA: %x\n", err); r = -EIO; - goto err1; + goto err2; } - +err2: + dsi_unregister_isr(dsi_completion_handler, &completion, + DSI_IRQ_ERROR_MASK); err1: dsi_unregister_isr_vc(channel, dsi_completion_handler, &completion, DSI_VC_IRQ_BTA);