Skip to contentSkip to conversation

drm: msm: disp: dpu1: Use DRM_DEV_* instead of DPU_*

PATCH In review Mamta Shukla 2 participants 4 messages Oct 20, 2018 – Nov 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: msm: disp: dpu1: Use DRM_DEV_* instead of DPU_*

Use DRM_DEV_ERROR/DEBUG instead of DPU_ERROR/DEBUG to generate drm-formatted specific log messages in the Kernel log in case of multiple instances.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c       |  58 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |  60 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 176 ++++++++++-----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        | 134 ++++++++--------
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c   |  40 ++---
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c   |  42 ++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c        |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c        |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c            |   4 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |  90 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c           |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 134 ++++++++--------
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  96 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c           |  32 ++--
 21 files changed, 451 insertions(+), 451 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c +29 -29
index 879c13f..b9aa452 100644
@@ -84,12 +84,12 @@ static int _dpu_core_irq_enable(struct dpu_kms *dpu_kms, int irq_idx)
 	if (!dpu_kms || !dpu_kms->hw_intr ||
 			!dpu_kms->irq_obj.enable_counts ||
 			!dpu_kms->irq_obj.irq_counts) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
 	if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
-		DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
+		DRM_DEV_ERROR("invalid IRQ index: [%d]\n", irq_idx);
 		return -EINVAL;
 	}
 
@@ -102,15 +102,15 @@ static int _dpu_core_irq_enable(struct dpu_kms *dpu_kms, int irq_idx)
 				dpu_kms->hw_intr,
 				irq_idx);
 		if (ret)
-			DPU_ERROR("Fail to enable IRQ for irq_idx:%d\n",
+			DRM_DEV_ERROR("Fail to enable IRQ for irq_idx:%d\n",
 					irq_idx);
 
-		DPU_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
+		DRM_DEV_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
 
 		spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
 		/* empty callback list but interrupt is enabled */
 		if (list_empty(&dpu_kms->irq_obj.irq_cb_tbl[irq_idx]))
-			DPU_ERROR("irq_idx=%d enabled with no callback\n",
+			DRM_DEV_ERROR("irq_idx=%d enabled with no callback\n",
 					irq_idx);
 		spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
 	}
@@ -123,7 +123,7 @@ int dpu_core_irq_enable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
 	int i, ret = 0, counts;
 
 	if (!dpu_kms || !irq_idxs || !irq_count) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
@@ -147,12 +147,12 @@ static int _dpu_core_irq_disable(struct dpu_kms *dpu_kms, int irq_idx)
 	int ret = 0, enable_count;
 
 	if (!dpu_kms || !dpu_kms->hw_intr || !dpu_kms->irq_obj.enable_counts) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
 	if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
-		DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
+		DRM_DEV_ERROR("invalid IRQ index: [%d]\n", irq_idx);
 		return -EINVAL;
 	}
 
@@ -165,9 +165,9 @@ static int _dpu_core_irq_disable(struct dpu_kms *dpu_kms, int irq_idx)
 				dpu_kms->hw_intr,
 				irq_idx);
 		if (ret)
-			DPU_ERROR("Fail to disable IRQ for irq_idx:%d\n",
+			DRM_DEV_ERROR("Fail to disable IRQ for irq_idx:%d\n",
 					irq_idx);
-		DPU_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
+		DRM_DEV_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
 	}
 
 	return ret;
@@ -178,7 +178,7 @@ int dpu_core_irq_disable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
 	int i, ret = 0, counts;
 
 	if (!dpu_kms || !irq_idxs || !irq_count) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
@@ -199,7 +199,7 @@ u32 dpu_core_irq_read(struct dpu_kms *dpu_kms, int irq_idx, bool clear)
 		return 0;
 
 	if (irq_idx < 0) {
-		DPU_ERROR("[%pS] invalid irq_idx=%d\n",
+		DRM_DEV_ERROR("[%pS] invalid irq_idx=%d\n",
 				__builtin_return_address(0), irq_idx);
 		return 0;
 	}
@@ -214,12 +214,12 @@ int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx,
 	unsigned long irq_flags;
 
 	if (!dpu_kms || !dpu_kms->irq_obj.irq_cb_tbl) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
 	if (!register_irq_cb || !register_irq_cb->func) {
-		DPU_ERROR("invalid irq_cb:%d func:%d\n",
+		DRM_DEV_ERROR("invalid irq_cb:%d func:%d\n",
 				register_irq_cb != NULL,
 				register_irq_cb ?
 					register_irq_cb->func != NULL : -1);
@@ -227,11 +227,11 @@ int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx,
 	}
 
 	if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
-		DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
+		DRM_DEV_ERROR("invalid IRQ index: [%d]\n", irq_idx);
 		return -EINVAL;
 	}
 
-	DPU_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
+	DRM_DEV_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
 
 	spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
 	trace_dpu_core_irq_register_callback(irq_idx, register_irq_cb);
@@ -249,12 +249,12 @@ int dpu_core_irq_unregister_callback(struct dpu_kms *dpu_kms, int irq_idx,
 	unsigned long irq_flags;
 
 	if (!dpu_kms || !dpu_kms->irq_obj.irq_cb_tbl) {
-		DPU_ERROR("invalid params\n");
+		DRM_DEV_ERROR("invalid params\n");
 		return -EINVAL;
 	}
 
 	if (!register_irq_cb || !register_irq_cb->func) {
-		DPU_ERROR("invalid irq_cb:%d func:%d\n",
+		DRM_DEV_ERROR("invalid irq_cb:%d func:%d\n",
 				register_irq_cb != NULL,
 				register_irq_cb ?
 					register_irq_cb->func != NULL : -1);
@@ -262,11 +262,11 @@ int dpu_core_irq_unregister_callback(struct dpu_kms *dpu_kms, int irq_idx,
 	}
 
 	if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
-		DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
+		DRM_DEV_ERROR("invalid IRQ index: [%d]\n", irq_idx);
 		return -EINVAL;
 	}
 
-	DPU_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
+	DRM_DEV_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
 
 	spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
 	trace_dpu_core_irq_unregister_callback(irq_idx, register_irq_cb);
@@ -274,7 +274,7 @@ int dpu_core_irq_unregister_callback(struct dpu_kms *dpu_kms, int irq_idx,
 	/* empty callback list but interrupt is still enabled */
 	if (list_empty(&dpu_kms->irq_obj.irq_cb_tbl[irq_idx]) &&
 			atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idx]))
-		DPU_ERROR("irq_idx=%d enabled with no callback\n", irq_idx);
+		DRM_DEV_ERROR("irq_idx=%d enabled with no callback\n", irq_idx);
 	spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
 
 	return 0;
@@ -320,7 +320,7 @@ static int dpu_debugfs_core_irq_show(struct seq_file *s, void *v)
 	int i, irq_count, enable_count, cb_count;
 
 	if (!irq_obj || !irq_obj->enable_counts || !irq_obj->irq_cb_tbl) {
-		DPU_ERROR("invalid parameters\n");
+		DRM_DEV_ERROR("invalid parameters\n");
 		return 0;
 	}
 
@@ -377,13 +377,13 @@ void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms)
 	int i;
 
 	if (!dpu_kms) {
-		DPU_ERROR("invalid dpu_kms\n");
+		DRM_DEV_ERROR("invalid dpu_kms\n");
 		return;
 	} else if (!dpu_kms->dev) {
-		DPU_ERROR("invalid drm device\n");
+		DRM_DEV_ERROR("invalid drm device\n");
 		return;
 	} else if (!dpu_kms->dev->dev_private) {
-		DPU_ERROR("invalid device private\n");
+		DRM_DEV_ERROR("invalid device private\n");
 		return;
 	}
 	priv = dpu_kms->dev->dev_private;
@@ -421,13 +421,13 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
 	int i;
 
 	if (!dpu_kms) {
-		DPU_ERROR("invalid dpu_kms\n");
+		DRM_DEV_ERROR("invalid dpu_kms\n");
 		return;
 	} else if (!dpu_kms->dev) {
-		DPU_ERROR("invalid drm device\n");
+		DRM_DEV_ERROR("invalid drm device\n");
 		return;
 	} else if (!dpu_kms->dev->dev_private) {
-		DPU_ERROR("invalid device private\n");
+		DRM_DEV_ERROR("invalid device private\n");
 		return;
 	}
 	priv = dpu_kms->dev->dev_private;
@@ -436,7 +436,7 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
 	for (i = 0; i < dpu_kms->irq_obj.total_irqs; i++)
 		if (atomic_read(&dpu_kms->irq_obj.enable_counts[i]) ||
 				!list_empty(&dpu_kms->irq_obj.irq_cb_tbl[i]))
-			DPU_ERROR("irq_idx=%d still enabled/registered\n", i);
+			DRM_DEV_ERROR("irq_idx=%d still enabled/registered\n", i);
 
 	dpu_clear_all_irqs(dpu_kms);
 	dpu_disable_all_irqs(dpu_kms);
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +30 -30

222 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +88 -88

653 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +67 -67

504 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +20 -20
index 3084675..31b48b8 100644
@@ -19,12 +19,12 @@
 #include "dpu_formats.h"
 #include "dpu_trace.h"
 
-#define DPU_DEBUG_CMDENC(e, fmt, ...) DPU_DEBUG("enc%d intf%d " fmt, \
+#define DPU_DEBUG_CMDENC(e, fmt, ...) DRM_DEV_DEBUG("enc%d intf%d " fmt, \
 		(e) && (e)->base.parent ? \
 		(e)->base.parent->base.id : -1, \
 		(e) ? (e)->base.intf_idx - INTF_0 : -1, ##__VA_ARGS__)
 
-#define DPU_ERROR_CMDENC(e, fmt, ...) DPU_ERROR("enc%d intf%d " fmt, \
+#define DPU_ERROR_CMDENC(e, fmt, ...) DRM_DEV_ERROR("enc%d intf%d " fmt, \
 		(e) && (e)->base.parent ? \
 		(e)->base.parent->base.id : -1, \
 		(e) ? (e)->base.intf_idx - INTF_0 : -1, ##__VA_ARGS__)
@@ -201,7 +201,7 @@ static void dpu_encoder_phys_cmd_mode_set(
 	int i, instance;
 
 	if (!phys_enc || !mode || !adj_mode) {
-		DPU_ERROR("invalid args\n");
+		DRM_DEV_ERROR("invalid args\n");
 		return;
 	}
 	phys_enc->cached_mode = *adj_mode;
@@ -286,7 +286,7 @@ static int _dpu_encoder_phys_cmd_wait_for_idle(
 	int ret;
 
 	if (!phys_enc) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return -EINVAL;
 	}
 
@@ -312,7 +312,7 @@ static int dpu_encoder_phys_cmd_control_vblank_irq(
 	int refcount;
 
 	if (!phys_enc || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return -EINVAL;
 	}
 
@@ -395,7 +395,7 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
 	struct dpu_kms *dpu_kms;
 
 	if (!phys_enc || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return;
 	}
 	mode = &phys_enc->cached_mode;
@@ -410,7 +410,7 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
 
 	dpu_kms = phys_enc->dpu_kms;
 	if (!dpu_kms || !dpu_kms->dev || !dpu_kms->dev->dev_private) {
-		DPU_ERROR("invalid device\n");
+		DRM_DEV_ERROR("invalid device\n");
 		return;
 	}
 	priv = dpu_kms->dev->dev_private;
@@ -477,7 +477,7 @@ static void _dpu_encoder_phys_cmd_pingpong_config(
 
 	if (!phys_enc || !phys_enc->hw_ctl || !phys_enc->hw_pp
 			|| !phys_enc->hw_ctl->ops.setup_intf_cfg) {
-		DPU_ERROR("invalid arg(s), enc %d\n", phys_enc != 0);
+		DRM_DEV_ERROR("invalid arg(s), enc %d\n", phys_enc != 0);
 		return;
 	}
 
@@ -506,7 +506,7 @@ static void dpu_encoder_phys_cmd_enable_helper(
 	u32 flush_mask = 0;
 
 	if (!phys_enc || !phys_enc->hw_ctl || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid arg(s), encoder %d\n", phys_enc != 0);
+		DRM_DEV_ERROR("invalid arg(s), encoder %d\n", phys_enc != 0);
 		return;
 	}
 
@@ -531,14 +531,14 @@ static void dpu_encoder_phys_cmd_enable(struct dpu_encoder_phys *phys_enc)
 		to_dpu_encoder_phys_cmd(phys_enc);
 
 	if (!phys_enc || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid phys encoder\n");
+		DRM_DEV_ERROR("invalid phys encoder\n");
 		return;
 	}
 
 	DPU_DEBUG_CMDENC(cmd_enc, "pp %d\n", phys_enc->hw_pp->idx - PINGPONG_0);
 
 	if (phys_enc->enable_state == DPU_ENC_ENABLED) {
-		DPU_ERROR("already enabled\n");
+		DRM_DEV_ERROR("already enabled\n");
 		return;
 	}
 
@@ -587,7 +587,7 @@ static void dpu_encoder_phys_cmd_disable(struct dpu_encoder_phys *phys_enc)
 		to_dpu_encoder_phys_cmd(phys_enc);
 
 	if (!phys_enc || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return;
 	}
 	DRM_DEBUG_KMS("id:%u pp:%d state:%d\n", DRMID(phys_enc->parent),
@@ -610,7 +610,7 @@ static void dpu_encoder_phys_cmd_destroy(struct dpu_encoder_phys *phys_enc)
 		to_dpu_encoder_phys_cmd(phys_enc);
 
 	if (!phys_enc) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return;
 	}
 	kfree(cmd_enc);
@@ -625,12 +625,12 @@ static void dpu_encoder_phys_cmd_get_hw_resources(
 		to_dpu_encoder_phys_cmd(phys_enc);
 
 	if (!phys_enc) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return;
 	}
 
 	if ((phys_enc->intf_idx - INTF_0) >= INTF_MAX) {
-		DPU_ERROR("invalid intf idx:%d\n", phys_enc->intf_idx);
+		DRM_DEV_ERROR("invalid intf idx:%d\n", phys_enc->intf_idx);
 		return;
 	}
 
@@ -647,7 +647,7 @@ static void dpu_encoder_phys_cmd_prepare_for_kickoff(
 	int ret;
 
 	if (!phys_enc || !phys_enc->hw_pp) {
-		DPU_ERROR("invalid encoder\n");
+		DRM_DEV_ERROR("invalid encoder\n");
 		return;
 	}
 	DRM_DEBUG_KMS("id:%u pp:%d pending_cnt:%d\n", DRMID(phys_enc->parent),
@@ -681,7 +681,7 @@ static int _dpu_encoder_phys_cmd_wait_for_ctl_start(
 	int ret;
 
 	if (!phys_enc || !phys_enc->hw_ctl) {
-		DPU_ERROR("invalid argument(s)\n");
+		DRM_DEV_ERROR("invalid argument(s)\n");
 		return -EINVAL;
 	}
 
@@ -827,12 +827,12 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
 	struct dpu_encoder_irq *irq;
 	int i, ret = 0;
 
-	DPU_DEBUG("intf %d\n", p->intf_idx - INTF_0);
+	DRM_DEV_DEBUG("intf %d\n", p->intf_idx - INTF_0);
 
 	cmd_enc = kzalloc(sizeof(*cmd_enc), GFP_KERNEL);
 	if (!cmd_enc) {
 		ret = -ENOMEM;
-		DPU_ERROR("failed to allocate\n");
+		DRM_DEV_ERROR("failed to allocate\n");
 		goto fail;
 	}
 	phys_enc = &cmd_enc->base;
@@ -840,7 +840,7 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
 	hw_mdp = dpu_rm_get_mdp(&p->dpu_kms->rm);
 	if (IS_ERR_OR_NULL(hw_mdp)) {
 		ret = PTR_ERR(hw_mdp);
-		DPU_ERROR("failed to get mdptop\n");
+		DRM_DEV_ERROR("failed to get mdptop\n");
 		goto fail_mdp_init;
 	}
 	phys_enc->hw_mdptop = hw_mdp;
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +21 -21

164 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c +5 -5
index bfcd165..48e2042 100644
@@ -1090,7 +1090,7 @@ const struct dpu_format *dpu_get_dpu_format_ext(
 	 * Currently only support exactly zero or one modifier.
 	 * All planes use the same modifier.
 	 */
-	DPU_DEBUG("plane format modifier 0x%llX\n", modifier);
+	DRM_DEV_DEBUG("plane format modifier 0x%llX\n", modifier);
 
 	switch (modifier) {
 	case 0:
@@ -1100,11 +1100,11 @@ const struct dpu_format *dpu_get_dpu_format_ext(
 	case DRM_FORMAT_MOD_QCOM_COMPRESSED:
 		map = dpu_format_map_ubwc;
 		map_size = ARRAY_SIZE(dpu_format_map_ubwc);
-		DPU_DEBUG("found fmt: %4.4s  DRM_FORMAT_MOD_QCOM_COMPRESSED\n",
+		DRM_DEV_DEBUG("found fmt: %4.4s  DRM_FORMAT_MOD_QCOM_COMPRESSED\n",
 				(char *)&format);
 		break;
 	default:
-		DPU_ERROR("unsupported format modifier %llX\n", modifier);
+		DRM_DEV_ERROR("unsupported format modifier %llX\n", modifier);
 		return NULL;
 	}
 
@@ -1116,10 +1116,10 @@ const struct dpu_format *dpu_get_dpu_format_ext(
 	}
 
 	if (fmt == NULL)
-		DPU_ERROR("unsupported fmt: %4.4s modifier 0x%llX\n",
+		DRM_DEV_ERROR("unsupported fmt: %4.4s modifier 0x%llX\n",
 			(char *)&format, modifier);
 	else
-		DPU_DEBUG("fmt %4.4s mod 0x%llX ubwc %d yuv %d\n",
+		DRM_DEV_DEBUG("fmt %4.4s mod 0x%llX ubwc %d yuv %d\n",
 				(char *)&format, modifier,
 				DPU_FORMAT_IS_UBWC(fmt),
 				DPU_FORMAT_IS_YUV(fmt));
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1 -1
index 44ee063..70624d6 100644
@@ -504,7 +504,7 @@ struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
 		}
 	}
 
-	DPU_ERROR("unsupported chipset id:%X\n", hw_rev);
+	DRM_DEV_ERROR("unsupported chipset id:%X\n", hw_rev);
 	dpu_hw_catalog_deinit(dpu_cfg);
 	return ERR_PTR(-ENODEV);
 }
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c +1 -1
index 554874b..805c71f 100644
@@ -297,7 +297,7 @@ struct dpu_hw_cdm *dpu_hw_cdm_init(enum dpu_cdm idx,
 
 	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_CDM, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +1 -1
index 06be7cf..87888af 100644
@@ -520,7 +520,7 @@ struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx,
 
 	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_CTL, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +1 -1
index d280df5..3542393 100644
@@ -328,7 +328,7 @@ struct dpu_hw_intf *dpu_hw_intf_init(enum dpu_intf idx,
 
 	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_INTF, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c +1 -1
index 4ab72b0..a5e75a4 100644
@@ -241,7 +241,7 @@ struct dpu_hw_mixer *dpu_hw_lm_init(enum dpu_lm idx,
 
 	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_LM, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c +1 -1
index cc3a623..79c14d6 100644
@@ -230,7 +230,7 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
 
 	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_PINGPONG, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -1
index c25b52a..be29c8c 100644
@@ -732,7 +732,7 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
 
 	rc = dpu_hw_blk_init(&hw_pipe->base, DPU_HW_BLK_SSPP, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +1 -1
index db2798e..aec73b6 100644
@@ -375,7 +375,7 @@ struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx,
 
 	rc = dpu_hw_blk_init(&mdp->base, DPU_HW_BLK_TOP, idx, &dpu_hw_ops);
 	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
+		DRM_DEV_ERROR("failed to init hw blk %d\n", rc);
 		goto blk_init_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c +2 -2
index d5e6ce0..7af43a8 100644
@@ -44,7 +44,7 @@ int dpu_irq_postinstall(struct msm_kms *kms)
 	int rc;
 
 	if (!kms) {
-		DPU_ERROR("invalid parameters\n");
+		DRM_DEV_ERROR("invalid parameters\n");
 		return -EINVAL;
 	}
 
@@ -58,7 +58,7 @@ void dpu_irq_uninstall(struct msm_kms *kms)
 	struct dpu_kms *dpu_kms = to_dpu_kms(kms);
 
 	if (!kms) {
-		DPU_ERROR("invalid parameters\n");
+		DRM_DEV_ERROR("invalid parameters\n");
 		return;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +45 -45

345 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +5 -5
index 9e533b8..ee26c1d 100644
@@ -105,7 +105,7 @@ static int _dpu_mdss_irq_domain_add(struct dpu_mdss *dpu_mdss)
 	domain = irq_domain_add_linear(dev->of_node, 32,
 			&dpu_mdss_irqdomain_ops, dpu_mdss);
 	if (!domain) {
-		DPU_ERROR("failed to add irq_domain\n");
+		DRM_DEV_ERROR("failed to add irq_domain\n");
 		return -EINVAL;
 	}
 
@@ -131,7 +131,7 @@ static int dpu_mdss_enable(struct msm_mdss *mdss)
 
 	ret = msm_dss_enable_clk(mp->clk_config, mp->num_clk, true);
 	if (ret)
-		DPU_ERROR("clock enable failed, ret:%d\n", ret);
+		DRM_DEV_ERROR("clock enable failed, ret:%d\n", ret);
 
 	return ret;
 }
@@ -144,7 +144,7 @@ static int dpu_mdss_disable(struct msm_mdss *mdss)
 
 	ret = msm_dss_enable_clk(mp->clk_config, mp->num_clk, false);
 	if (ret)
-		DPU_ERROR("clock disable failed, ret:%d\n", ret);
+		DRM_DEV_ERROR("clock disable failed, ret:%d\n", ret);
 
 	return ret;
 }
@@ -204,7 +204,7 @@ int dpu_mdss_init(struct drm_device *dev)
 	mp = &dpu_mdss->mp;
 	ret = msm_dss_parse_clock(pdev, mp);
 	if (ret) {
-		DPU_ERROR("failed to parse clocks, ret=%d\n", ret);
+		DRM_DEV_ERROR("failed to parse clocks, ret=%d\n", ret);
 		goto clk_parse_err;
 	}
 
@@ -218,7 +218,7 @@ int dpu_mdss_init(struct drm_device *dev)
 	ret = devm_request_irq(dev->dev, platform_get_irq(pdev, 0),
 			dpu_mdss_irq, 0, "dpu_mdss_isr", dpu_mdss);
 	if (ret) {
-		DPU_ERROR("failed to init irq: %d\n", ret);
+		DRM_DEV_ERROR("failed to init irq: %d\n", ret);
 		goto irq_error;
 	}
 
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +67 -67

491 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +48 -48

123 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +16 -16
index 2955282..a22489a 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Part of the diff is not shown here. View the raw message.

reviewer
#1 lore raw
Quoted 5 lines · Mamta Shukla

Use DRM_DEV_ERROR/DEBUG instead of DPU_ERROR/DEBUG to generate drm-formatted specific log messages in the Kernel log in case of multiple instances.

Hi Mamta,
Thanks for sending this patch, but I don't think it's going to even compile. DRM_DEV_* takes a struct device * pointer as the first argument, and it's not being passed in anywhere. Make sure you compile test with CONFIG_DRM_MSM enabled

Quoted 15 lines
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c       |  58 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |  60 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 176 ++++++++++-----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        | 134 ++++++++--------
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c   |  40 ++---
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c   |  42 ++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c        |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c        |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |   2 +-
Quoted 9 lines
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c            |   4 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |  90 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c           |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 134 ++++++++--------
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  96 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c           |  32 ++--
 21 files changed, 451 insertions(+), 451 deletions(-)

/snip

Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
#2 lore raw
Quoted 6 lines · Sean Paul
Quoted 4 lines · Mamta Shukla

Use DRM_DEV_ERROR/DEBUG instead of DPU_ERROR/DEBUG to generate drm-formatted specific log messages in the Kernel log in case of multiple instances.

Quoted 7 lines
Quoted 1 line

Hi Mamta,
Thanks for sending this patch, but I don't think it's going to even compile. DRM_DEV_* takes a struct device * pointer as the first argument, and it's not being passed in anywhere. Make sure you compile test with CONFIG_DRM_MSM enabled

Thank you for pointing this out. Definitely DRM_DEV_* requires pointer to function or the device pointer along with
message string. I had compiled this before submitting the patch. But I missed out enabling the DRM_MSM.
Is it good to write v2 of above patch with mentioning/stating pointer to function so that in DEBUG message function
name is also available with error message?

Quoted 29 lines
Quoted 15 lines
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c       |  58 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |  60 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 176 ++++++++++-----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        | 134 ++++++++--------
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c   |  40 ++---
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c   |  42 ++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c        |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c        |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |   2 +-
Quoted 9 lines
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c            |   4 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |  90 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c           |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 134 ++++++++--------
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  96 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c           |  32 ++--
 21 files changed, 451 insertions(+), 451 deletions(-)

/snip

--
Sean Paul, Software Engineer, Google / Chromium OS

Signature · 5 lines
Mamta Shukla
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reviewer
#3 lore raw
Quoted 14 lines · Mamta Shukla
Quoted 6 lines · Sean Paul
Quoted 4 lines · Mamta Shukla

Use DRM_DEV_ERROR/DEBUG instead of DPU_ERROR/DEBUG to generate drm-formatted specific log messages in the Kernel log in case of multiple instances.

Quoted 7 lines
Quoted 1 line

Hi Mamta,
Thanks for sending this patch, but I don't think it's going to even compile. DRM_DEV_* takes a struct device * pointer as the first argument, and it's not being passed in anywhere. Make sure you compile test with CONFIG_DRM_MSM enabled

Quoted 7 lines

Thank you for pointing this out. Definitely DRM_DEV_* requires pointer to function or the device pointer along with
message string. I had compiled this before submitting the patch. But I missed out enabling the DRM_MSM.
Is it good to write v2 of above patch with mentioning/stating pointer to function so that in DEBUG message function
name is also available with error message?

Yes, to do this right, you'd pass the device pointer where applicable (most everwhere). You'll also want to convert the dev_*/pr_*/DRM_* instances to DRM_DEV_*.

Sean

Quoted 36 lines
Quoted 31 lines
Quoted 17 lines

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c       |  58 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |  60 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 176 ++++++++++-----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        | 134 ++++++++--------
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c   |  40 ++---
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c   |  42 ++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c        |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c        |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |   2 +-
Quoted 9 lines
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c         |   2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c            |   4 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |  90 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c           |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 134 ++++++++--------
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  96 +++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c           |  32 ++--
 21 files changed, 451 insertions(+), 451 deletions(-)

/snip

--
Sean Paul, Software Engineer, Google / Chromium OS

Signature · 1 line
Mamta Shukla
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS