Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a41da17 authored by Mamta Shukla's avatar Mamta Shukla Committed by Rob Clark
Browse files

drm: msm: Use DRM_DEV_* instead of dev_*



Use DRM_DEV_INFO/ERROR/WARN instead of dev_info/err/debug to generate
drm-formatted specific log messages so that it will be easy to
differentiate in case of multiple instances of driver.

Signed-off-by: default avatarMamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 84511abc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ struct msm_gpu *a3xx_gpu_init(struct drm_device *dev)
	int ret;

	if (!pdev) {
		dev_err(dev->dev, "no a3xx device\n");
		DRM_DEV_ERROR(dev->dev, "no a3xx device\n");
		ret = -ENXIO;
		goto fail;
	}
@@ -528,7 +528,7 @@ struct msm_gpu *a3xx_gpu_init(struct drm_device *dev)
		 * to not be possible to restrict access, then we must
		 * implement a cmdstream validator.
		 */
		dev_err(dev->dev, "No memory protection without IOMMU\n");
		DRM_DEV_ERROR(dev->dev, "No memory protection without IOMMU\n");
		ret = -ENXIO;
		goto fail;
	}
+2 −2
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ struct msm_gpu *a4xx_gpu_init(struct drm_device *dev)
	int ret;

	if (!pdev) {
		dev_err(dev->dev, "no a4xx device\n");
		DRM_DEV_ERROR(dev->dev, "no a4xx device\n");
		ret = -ENXIO;
		goto fail;
	}
@@ -608,7 +608,7 @@ struct msm_gpu *a4xx_gpu_init(struct drm_device *dev)
		 * to not be possible to restrict access, then we must
		 * implement a cmdstream validator.
		 */
		dev_err(dev->dev, "No memory protection without IOMMU\n");
		DRM_DEV_ERROR(dev->dev, "No memory protection without IOMMU\n");
		ret = -ENXIO;
		goto fail;
	}
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor)
			minor->debugfs_root, minor);

	if (ret) {
		dev_err(dev->dev, "could not install a5xx_debugfs_list\n");
		DRM_DEV_ERROR(dev->dev, "could not install a5xx_debugfs_list\n");
		return ret;
	}

+5 −5
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ static int a5xx_ucode_init(struct msm_gpu *gpu)
		if (IS_ERR(a5xx_gpu->pm4_bo)) {
			ret = PTR_ERR(a5xx_gpu->pm4_bo);
			a5xx_gpu->pm4_bo = NULL;
			dev_err(gpu->dev->dev, "could not allocate PM4: %d\n",
			DRM_DEV_ERROR(gpu->dev->dev, "could not allocate PM4: %d\n",
				ret);
			return ret;
		}
@@ -527,7 +527,7 @@ static int a5xx_ucode_init(struct msm_gpu *gpu)
		if (IS_ERR(a5xx_gpu->pfp_bo)) {
			ret = PTR_ERR(a5xx_gpu->pfp_bo);
			a5xx_gpu->pfp_bo = NULL;
			dev_err(gpu->dev->dev, "could not allocate PFP: %d\n",
			DRM_DEV_ERROR(gpu->dev->dev, "could not allocate PFP: %d\n",
				ret);
			return ret;
		}
@@ -1028,7 +1028,7 @@ static void a5xx_fault_detect_irq(struct msm_gpu *gpu)
	struct msm_drm_private *priv = dev->dev_private;
	struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu);

	dev_err(dev->dev, "gpu fault ring %d fence %x status %8.8X rb %4.4x/%4.4x ib1 %16.16llX/%4.4x ib2 %16.16llX/%4.4x\n",
	DRM_DEV_ERROR(dev->dev, "gpu fault ring %d fence %x status %8.8X rb %4.4x/%4.4x ib1 %16.16llX/%4.4x ib2 %16.16llX/%4.4x\n",
		ring ? ring->id : -1, ring ? ring->seqno : 0,
		gpu_read(gpu, REG_A5XX_RBBM_STATUS),
		gpu_read(gpu, REG_A5XX_CP_RB_RPTR),
@@ -1134,7 +1134,7 @@ static const u32 a5xx_registers[] = {

static void a5xx_dump(struct msm_gpu *gpu)
{
	dev_info(gpu->dev->dev, "status:   %08x\n",
	DRM_DEV_INFO(gpu->dev->dev, "status:   %08x\n",
		gpu_read(gpu, REG_A5XX_RBBM_STATUS));
	adreno_dump(gpu);
}
@@ -1505,7 +1505,7 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
	int ret;

	if (!pdev) {
		dev_err(dev->dev, "No A5XX device is defined\n");
		DRM_DEV_ERROR(dev->dev, "No A5XX device is defined\n");
		return ERR_PTR(-ENXIO);
	}

+2 −2
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static void a5xx_preempt_timer(struct timer_list *t)
	if (!try_preempt_state(a5xx_gpu, PREEMPT_TRIGGERED, PREEMPT_FAULTED))
		return;

	dev_err(dev->dev, "%s: preemption timed out\n", gpu->name);
	DRM_DEV_ERROR(dev->dev, "%s: preemption timed out\n", gpu->name);
	queue_work(priv->wq, &gpu->recover_work);
}

@@ -188,7 +188,7 @@ void a5xx_preempt_irq(struct msm_gpu *gpu)
	status = gpu_read(gpu, REG_A5XX_CP_CONTEXT_SWITCH_CNTL);
	if (unlikely(status)) {
		set_preempt_state(a5xx_gpu, PREEMPT_FAULTED);
		dev_err(dev->dev, "%s: Preemption failed to complete\n",
		DRM_DEV_ERROR(dev->dev, "%s: Preemption failed to complete\n",
			gpu->name);
		queue_work(priv->wq, &gpu->recover_work);
		return;
Loading