Commit 43dae319 authored by Daniel Stone's avatar Daniel Stone Committed by Heiko Stuebner

drm/rockchip: Don't spam logs in atomic check

Userspace should not be able to trigger DRM_ERROR messages to spam the
logs; especially not through atomic commit parameters which are
completely legitimate for userspace to attempt.
Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
Fixes: 7707f722 ("drm/rockchip: Add support for afbc")
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230808104405.522493-1-daniels@collabora.com
parent 19635463
...@@ -833,12 +833,12 @@ static int vop_plane_atomic_check(struct drm_plane *plane, ...@@ -833,12 +833,12 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
* need align with 2 pixel. * need align with 2 pixel.
*/ */
if (fb->format->is_yuv && ((new_plane_state->src.x1 >> 16) % 2)) { if (fb->format->is_yuv && ((new_plane_state->src.x1 >> 16) % 2)) {
DRM_ERROR("Invalid Source: Yuv format not support odd xpos\n"); DRM_DEBUG_KMS("Invalid Source: Yuv format not support odd xpos\n");
return -EINVAL; return -EINVAL;
} }
if (fb->format->is_yuv && new_plane_state->rotation & DRM_MODE_REFLECT_Y) { if (fb->format->is_yuv && new_plane_state->rotation & DRM_MODE_REFLECT_Y) {
DRM_ERROR("Invalid Source: Yuv format does not support this rotation\n"); DRM_DEBUG_KMS("Invalid Source: Yuv format does not support this rotation\n");
return -EINVAL; return -EINVAL;
} }
...@@ -846,7 +846,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane, ...@@ -846,7 +846,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
struct vop *vop = to_vop(crtc); struct vop *vop = to_vop(crtc);
if (!vop->data->afbc) { if (!vop->data->afbc) {
DRM_ERROR("vop does not support AFBC\n"); DRM_DEBUG_KMS("vop does not support AFBC\n");
return -EINVAL; return -EINVAL;
} }
...@@ -855,14 +855,15 @@ static int vop_plane_atomic_check(struct drm_plane *plane, ...@@ -855,14 +855,15 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
return ret; return ret;
if (new_plane_state->src.x1 || new_plane_state->src.y1) { if (new_plane_state->src.x1 || new_plane_state->src.y1) {
DRM_ERROR("AFBC does not support offset display, xpos=%d, ypos=%d, offset=%d\n", DRM_DEBUG_KMS("AFBC does not support offset display, " \
new_plane_state->src.x1, "xpos=%d, ypos=%d, offset=%d\n",
new_plane_state->src.y1, fb->offsets[0]); new_plane_state->src.x1, new_plane_state->src.y1,
fb->offsets[0]);
return -EINVAL; return -EINVAL;
} }
if (new_plane_state->rotation && new_plane_state->rotation != DRM_MODE_ROTATE_0) { if (new_plane_state->rotation && new_plane_state->rotation != DRM_MODE_ROTATE_0) {
DRM_ERROR("No rotation support in AFBC, rotation=%d\n", DRM_DEBUG_KMS("No rotation support in AFBC, rotation=%d\n",
new_plane_state->rotation); new_plane_state->rotation);
return -EINVAL; return -EINVAL;
} }
......
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