From patchwork Thu Nov 15 15:58:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1750151 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 45A45DF2AB for ; Thu, 15 Nov 2012 15:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1768234Ab2KOP7Y (ORCPT ); Thu, 15 Nov 2012 10:59:24 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:59116 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1768199Ab2KOP7W (ORCPT ); Thu, 15 Nov 2012 10:59:22 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAFFxL2T019790; Thu, 15 Nov 2012 09:59:21 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFxLXG029683; Thu, 15 Nov 2012 09:59:21 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 15 Nov 2012 09:59:21 -0600 Received: from deskari.tieu.ti.com (h68-10.vpn.ti.com [172.24.68.10]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFx6v5025421; Thu, 15 Nov 2012 09:59:20 -0600 From: Tomi Valkeinen To: Archit Taneja , Rob Clark CC: , , Tomi Valkeinen Subject: [PATCH 08/32] OMAPDSS: DISPC: use WARN_ON() in dispc_mgr_go Date: Thu, 15 Nov 2012 17:58:16 +0200 Message-ID: <1352995120-3288-9-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352995120-3288-1-git-send-email-tomi.valkeinen@ti.com> References: <1352995120-3288-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 dispc_mgr_go() should never be called with manager output disabled or if the GO bit is already set. Change the current silent returns to WARN_ONs. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dispc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 662bf56..e219eda 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -565,20 +565,8 @@ bool dispc_mgr_go_busy(enum omap_channel channel) void dispc_mgr_go(enum omap_channel channel) { - bool enable_bit, go_bit; - - /* if the channel is not enabled, we don't need GO */ - enable_bit = mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE) == 1; - - if (!enable_bit) - return; - - go_bit = mgr_fld_read(channel, DISPC_MGR_FLD_GO) == 1; - - if (go_bit) { - DSSERR("GO bit not down for channel %d\n", channel); - return; - } + WARN_ON(dispc_mgr_is_enabled(channel) == false); + WARN_ON(dispc_mgr_go_busy(channel)); DSSDBG("GO %s\n", mgr_desc[channel].name);