From patchwork Fri Oct 31 22:53:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207221 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E5D9B9F387 for ; Fri, 31 Oct 2014 23:56:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E402A20173 for ; Fri, 31 Oct 2014 23:56:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AEB2D20158 for ; Fri, 31 Oct 2014 23:56:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BAAF6E848; Fri, 31 Oct 2014 16:56:33 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A8916E84F for ; Fri, 31 Oct 2014 15:57:01 -0700 (PDT) Received: by mail-pd0-f180.google.com with SMTP id ft15so8109045pdb.39 for ; Fri, 31 Oct 2014 15:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cmPWkB0KITK8zTDzggdcyOUsZQJlcPF+RByZidrPCW8=; b=jlAKpnsFLFxwfWGYJt+5nU+tsx/iO3x36KsOmu1eBu5S8Gypc87259SBrdXr3ZM7+V T7AJBVRZVbOsA/CVZfB+RAk6PsX49OBpaKF9jOSlPwTRW/cZtzzpdIie2NAhCUg8kSHo SlqZcBwp77PDyt2IF8/uF+SJMiThaTKpM8l+uAaRQTwKvhoyjXmnNn3fpmzpxy/cWpXP QVnwtoKdW7XPG/09hCe4NuGZI1HmM2lj+olIGcwQtiMpZYX/DsVcvESgIV1zAJILWdTp jFUmhPStz2RxWar7zjmB/KmViMkOwvO4Yb1s3PqMUvrMUyuVoe1aW5fr+eqgGd7Rrvrq 8ceA== X-Received: by 10.70.118.1 with SMTP id ki1mr27949867pdb.69.1414796221443; Fri, 31 Oct 2014 15:57:01 -0700 (PDT) Received: from mothership.mgc.mentorg.com (c-50-152-159-227.hsd1.ca.comcast.net. [50.152.159.227]) by mx.google.com with ESMTPSA id ev8sm10870656pdb.28.2014.10.31.15.57.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:00 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 16/72] gpu: ipu-v3: Add DMFC/DP/DC/DI module enable/disable debug Date: Fri, 31 Oct 2014 15:53:59 -0700 Message-Id: <1414796095-10107-17-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> References: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Fri, 31 Oct 2014 16:56:31 -0700 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add debug messages when these modules are globally disabled or enabled in the IPU_CONF register. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-dc.c | 8 ++++++-- drivers/gpu/ipu-v3/ipu-di.c | 2 ++ drivers/gpu/ipu-v3/ipu-dmfc.c | 5 ++++- drivers/gpu/ipu-v3/ipu-dp.c | 8 ++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 79879e7..6a3e429 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -348,8 +348,10 @@ void ipu_dc_enable(struct ipu_dc *dc) mutex_lock(&priv->mutex); - if (!priv->use_count) + if (!priv->use_count) { + dev_dbg(priv->dev, "DC enable\n"); ipu_module_enable(priv->ipu, IPU_CONF_DC_EN); + } priv->use_count++; @@ -420,8 +422,10 @@ void ipu_dc_disable(struct ipu_dc *dc) mutex_lock(&priv->mutex); priv->use_count--; - if (!priv->use_count) + if (!priv->use_count) { + dev_dbg(priv->dev, "DC disable\n"); ipu_module_disable(priv->ipu, IPU_CONF_DC_EN); + } if (priv->use_count < 0) priv->use_count = 0; diff --git a/drivers/gpu/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c index 2fafb63..35ee345 100644 --- a/drivers/gpu/ipu-v3/ipu-di.c +++ b/drivers/gpu/ipu-v3/ipu-di.c @@ -649,6 +649,7 @@ int ipu_di_enable(struct ipu_di *di) if (ret) return ret; + dev_dbg(di->ipu->dev, "DI%d enable\n", di->id); ipu_module_enable(di->ipu, di->module); return 0; @@ -659,6 +660,7 @@ int ipu_di_disable(struct ipu_di *di) { WARN_ON(IS_ERR(di->clk_di_pixel)); + dev_dbg(di->ipu->dev, "DI%d disable\n", di->id); ipu_module_disable(di->ipu, di->module); clk_disable_unprepare(di->clk_di_pixel); diff --git a/drivers/gpu/ipu-v3/ipu-dmfc.c b/drivers/gpu/ipu-v3/ipu-dmfc.c index 042c395..9ab9c87 100644 --- a/drivers/gpu/ipu-v3/ipu-dmfc.c +++ b/drivers/gpu/ipu-v3/ipu-dmfc.c @@ -127,8 +127,10 @@ int ipu_dmfc_enable_channel(struct dmfc_channel *dmfc) struct ipu_dmfc_priv *priv = dmfc->priv; mutex_lock(&priv->mutex); - if (!priv->use_count) + if (!priv->use_count) { + dev_dbg(priv->dev, "DMFC enable\n"); ipu_module_enable(priv->ipu, IPU_CONF_DMFC_EN); + } priv->use_count++; @@ -162,6 +164,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc) if (!priv->use_count) { ipu_dmfc_wait_fifos(priv); + dev_dbg(priv->dev, "DMFC disable\n"); ipu_module_disable(priv->ipu, IPU_CONF_DMFC_EN); } diff --git a/drivers/gpu/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c index 89173e5..d918596 100644 --- a/drivers/gpu/ipu-v3/ipu-dp.c +++ b/drivers/gpu/ipu-v3/ipu-dp.c @@ -369,8 +369,10 @@ int ipu_dp_enable(struct ipu_dp *dp) mutex_lock(&priv->mutex); - if (!priv->use_count) + if (!priv->use_count) { + dev_dbg(priv->dev, "DP enable\n"); ipu_module_enable(priv->ipu, IPU_CONF_DP_EN); + } priv->use_count++; @@ -441,8 +443,10 @@ void ipu_dp_disable(struct ipu_dp *dp) priv->use_count--; - if (!priv->use_count) + if (!priv->use_count) { + dev_dbg(priv->dev, "DP disable\n"); ipu_module_disable(priv->ipu, IPU_CONF_DP_EN); + } if (priv->use_count < 0) priv->use_count = 0;