Commit e7187bab authored by Tian Tao's avatar Tian Tao

drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_de

Use drm_err instead of DRM_ERROR in hibmc_drm_de
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-4-git-send-email-tiantao6@hisilicon.com
parent ae34c15b
...@@ -71,12 +71,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane, ...@@ -71,12 +71,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
return PTR_ERR(crtc_state); return PTR_ERR(crtc_state);
if (src_w != state->crtc_w || src_h != state->crtc_h) { if (src_w != state->crtc_w || src_h != state->crtc_h) {
DRM_DEBUG_ATOMIC("scale not support\n"); drm_dbg_atomic(plane->dev, "scale not support\n");
return -EINVAL; return -EINVAL;
} }
if (state->crtc_x < 0 || state->crtc_y < 0) { if (state->crtc_x < 0 || state->crtc_y < 0) {
DRM_DEBUG_ATOMIC("crtc_x/y of drm_plane state is invalid\n"); drm_dbg_atomic(plane->dev, "crtc_x/y of drm_plane state is invalid\n");
return -EINVAL; return -EINVAL;
} }
...@@ -87,12 +87,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane, ...@@ -87,12 +87,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
crtc_state->adjusted_mode.hdisplay || crtc_state->adjusted_mode.hdisplay ||
state->crtc_y + state->crtc_h > state->crtc_y + state->crtc_h >
crtc_state->adjusted_mode.vdisplay) { crtc_state->adjusted_mode.vdisplay) {
DRM_DEBUG_ATOMIC("visible portion of plane is invalid\n"); drm_dbg_atomic(plane->dev, "visible portion of plane is invalid\n");
return -EINVAL; return -EINVAL;
} }
if (state->fb->pitches[0] % 128 != 0) { if (state->fb->pitches[0] % 128 != 0) {
DRM_DEBUG_ATOMIC("wrong stride with 128-byte aligned\n"); drm_dbg_atomic(plane->dev, "wrong stride with 128-byte aligned\n");
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -515,7 +515,7 @@ int hibmc_de_init(struct hibmc_drm_private *priv) ...@@ -515,7 +515,7 @@ int hibmc_de_init(struct hibmc_drm_private *priv)
NULL); NULL);
if (ret) { if (ret) {
DRM_ERROR("failed to init plane: %d\n", ret); drm_err(dev, "failed to init plane: %d\n", ret);
return ret; return ret;
} }
...@@ -524,13 +524,13 @@ int hibmc_de_init(struct hibmc_drm_private *priv) ...@@ -524,13 +524,13 @@ int hibmc_de_init(struct hibmc_drm_private *priv)
ret = drm_crtc_init_with_planes(dev, crtc, plane, ret = drm_crtc_init_with_planes(dev, crtc, plane,
NULL, &hibmc_crtc_funcs, NULL); NULL, &hibmc_crtc_funcs, NULL);
if (ret) { if (ret) {
DRM_ERROR("failed to init crtc: %d\n", ret); drm_err(dev, "failed to init crtc: %d\n", ret);
return ret; return ret;
} }
ret = drm_mode_crtc_set_gamma_size(crtc, 256); ret = drm_mode_crtc_set_gamma_size(crtc, 256);
if (ret) { if (ret) {
DRM_ERROR("failed to set gamma size: %d\n", ret); drm_err(dev, "failed to set gamma size: %d\n", ret);
return ret; return ret;
} }
drm_crtc_helper_add(crtc, &hibmc_crtc_helper_funcs); drm_crtc_helper_add(crtc, &hibmc_crtc_helper_funcs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment