[PATCH 16/72] gpu: ipu-v3: Add DMFC/DP/DC/DI module enable/disable debug

Steve Longerbeam slongerbeam at gmail.com
Fri Oct 31 15:53:59 PDT 2014


Add debug messages when these modules are globally disabled or enabled
in the IPU_CONF register.

Signed-off-by: Steve Longerbeam <steve_longerbeam at mentor.com>
---
 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;
-- 
1.7.9.5



More information about the dri-devel mailing list