drm/msm/sde: consolidate SDE error logging on DRM standard calls
Replace instances of pr_err and dev_err with DRM_ERROR.
Change-Id: I2ed06765ba4e980ee56c0c249f2aca997a7bf1b6
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.c b/drivers/gpu/drm/msm/sde/sde_crtc.c
index d8104dd..096cb34 100644
--- a/drivers/gpu/drm/msm/sde/sde_crtc.c
+++ b/drivers/gpu/drm/msm/sde/sde_crtc.c
@@ -145,7 +145,6 @@
{
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
struct sde_crtc_mixer *mixer = sde_crtc->mixer;
- struct drm_device *dev = crtc->dev;
struct sde_hw_mixer *lm;
unsigned long flags;
struct drm_display_mode *mode;
@@ -171,7 +170,7 @@
(sde_crtc->num_mixers == 0)) {
rc = sde_crtc_reserve_hw_resources(crtc, sde_crtc->encoder);
if (rc) {
- dev_err(dev->dev, " error reserving HW resource for this CRTC\n");
+ DRM_ERROR("error reserving HW resource for CRTC\n");
return;
}
}
@@ -577,7 +576,6 @@
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
struct sde_kms *sde_kms = get_kms(crtc);
struct drm_plane *plane;
- struct drm_device *dev = crtc->dev;
struct plane_state pstates[SDE_STAGE_MAX];
int max_stages = CRTC_HW_MIXER_MAXSTAGES(sde_kms->catalog, 0);
int cnt = 0, i;
@@ -591,7 +589,7 @@
struct drm_plane_state *pstate;
if (cnt >= (max_stages)) {
- dev_err(dev->dev, "too many planes!\n");
+ DRM_ERROR("too many planes!\n");
return -EINVAL;
}
@@ -704,7 +702,7 @@
rc = sde_crtc_reserve_hw_resources(crtc, encoder);
if (rc) {
- dev_err(dev->dev, " error reserving HW resource for this CRTC\n");
+ DRM_ERROR(" error reserving HW resource for this CRTC\n");
return ERR_PTR(-EINVAL);
}
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index 6dbf346..395967e 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -434,8 +434,7 @@
if (MDP_FORMAT_IS_YUV(format) &&
(!(psde->features & SDE_SSPP_SCALER) ||
!(psde->features & BIT(SDE_SSPP_CSC)))) {
- dev_err(plane->dev->dev,
- "Pipe doesn't support YUV\n");
+ DRM_ERROR("Pipe doesn't support YUV\n");
return -EINVAL;
}
@@ -443,8 +442,8 @@
if (!(psde->features & SDE_SSPP_SCALER) &&
(((state->src_w >> 16) != state->crtc_w) ||
((state->src_h >> 16) != state->crtc_h))) {
- dev_err(plane->dev->dev,
- "Pipe doesn't support scaling (%dx%d -> %dx%d)\n",
+ DRM_ERROR(
+ "Unsupported Pipe scaling (%dx%d -> %dx%d)\n",
state->src_w >> 16, state->src_h >> 16,
state->crtc_w, state->crtc_h);
@@ -576,7 +575,7 @@
blob = drm_property_lookup_blob(dev,
(uint32_t)val);
if (!blob) {
- dev_err(dev->dev, "Blob not found\n");
+ DRM_ERROR("Blob not found\n");
val = 0;
} else {
val = blob->base.id;
@@ -598,7 +597,7 @@
}
if (ret == -EINVAL)
- dev_err(dev->dev, "Invalid property set\n");
+ DRM_ERROR("Invalid property set\n");
return ret;
}
@@ -637,7 +636,7 @@
}
if (ret == -EINVAL)
- dev_err(dev->dev, "Invalid property get\n");
+ DRM_ERROR("Invalid property get\n");
return ret;
}
@@ -894,7 +893,7 @@
return plane;
fail:
- pr_err("%s: Plane creation failed\n", __func__);
+ DRM_ERROR("Plane creation failed\n");
if (plane)
sde_plane_destroy(plane);
exit: