Commit 1aa1b11c authored by Dave Airlie's avatar Dave Airlie

drm/kms: reduce some messages to debug level (v2)

These can all be trigged from userspace if you pass the right values.

v2: rebase on later kernel.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 5bc69bf9
...@@ -2104,7 +2104,7 @@ int drm_mode_addfb(struct drm_device *dev, ...@@ -2104,7 +2104,7 @@ int drm_mode_addfb(struct drm_device *dev,
fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r); fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r);
if (IS_ERR(fb)) { if (IS_ERR(fb)) {
DRM_ERROR("could not create framebuffer\n"); DRM_DEBUG_KMS("could not create framebuffer\n");
ret = PTR_ERR(fb); ret = PTR_ERR(fb);
goto out; goto out;
} }
...@@ -2193,7 +2193,7 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r) ...@@ -2193,7 +2193,7 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r)
ret = format_check(r); ret = format_check(r);
if (ret) { if (ret) {
DRM_ERROR("bad framebuffer format 0x%08x\n", r->pixel_format); DRM_DEBUG_KMS("bad framebuffer format 0x%08x\n", r->pixel_format);
return ret; return ret;
} }
...@@ -2202,12 +2202,12 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r) ...@@ -2202,12 +2202,12 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r)
num_planes = drm_format_num_planes(r->pixel_format); num_planes = drm_format_num_planes(r->pixel_format);
if (r->width == 0 || r->width % hsub) { if (r->width == 0 || r->width % hsub) {
DRM_ERROR("bad framebuffer width %u\n", r->height); DRM_DEBUG_KMS("bad framebuffer width %u\n", r->height);
return -EINVAL; return -EINVAL;
} }
if (r->height == 0 || r->height % vsub) { if (r->height == 0 || r->height % vsub) {
DRM_ERROR("bad framebuffer height %u\n", r->height); DRM_DEBUG_KMS("bad framebuffer height %u\n", r->height);
return -EINVAL; return -EINVAL;
} }
...@@ -2215,12 +2215,12 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r) ...@@ -2215,12 +2215,12 @@ static int framebuffer_check(struct drm_mode_fb_cmd2 *r)
unsigned int width = r->width / (i != 0 ? hsub : 1); unsigned int width = r->width / (i != 0 ? hsub : 1);
if (!r->handles[i]) { if (!r->handles[i]) {
DRM_ERROR("no buffer object handle for plane %d\n", i); DRM_DEBUG_KMS("no buffer object handle for plane %d\n", i);
return -EINVAL; return -EINVAL;
} }
if (r->pitches[i] < drm_format_plane_cpp(r->pixel_format, i) * width) { if (r->pitches[i] < drm_format_plane_cpp(r->pixel_format, i) * width) {
DRM_ERROR("bad pitch %u for plane %d\n", r->pitches[i], i); DRM_DEBUG_KMS("bad pitch %u for plane %d\n", r->pitches[i], i);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -2257,12 +2257,12 @@ int drm_mode_addfb2(struct drm_device *dev, ...@@ -2257,12 +2257,12 @@ int drm_mode_addfb2(struct drm_device *dev,
return -EINVAL; return -EINVAL;
if ((config->min_width > r->width) || (r->width > config->max_width)) { if ((config->min_width > r->width) || (r->width > config->max_width)) {
DRM_ERROR("bad framebuffer width %d, should be >= %d && <= %d\n", DRM_DEBUG_KMS("bad framebuffer width %d, should be >= %d && <= %d\n",
r->width, config->min_width, config->max_width); r->width, config->min_width, config->max_width);
return -EINVAL; return -EINVAL;
} }
if ((config->min_height > r->height) || (r->height > config->max_height)) { if ((config->min_height > r->height) || (r->height > config->max_height)) {
DRM_ERROR("bad framebuffer height %d, should be >= %d && <= %d\n", DRM_DEBUG_KMS("bad framebuffer height %d, should be >= %d && <= %d\n",
r->height, config->min_height, config->max_height); r->height, config->min_height, config->max_height);
return -EINVAL; return -EINVAL;
} }
...@@ -2275,7 +2275,7 @@ int drm_mode_addfb2(struct drm_device *dev, ...@@ -2275,7 +2275,7 @@ int drm_mode_addfb2(struct drm_device *dev,
fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); fb = dev->mode_config.funcs->fb_create(dev, file_priv, r);
if (IS_ERR(fb)) { if (IS_ERR(fb)) {
DRM_ERROR("could not create framebuffer\n"); DRM_DEBUG_KMS("could not create framebuffer\n");
ret = PTR_ERR(fb); ret = PTR_ERR(fb);
goto out; goto out;
} }
......
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