aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_fb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-03-26 14:02:49 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-12-19 04:24:55 -0500
commita078a3ddc7209474e8dd827743390e9ed4bc6881 (patch)
tree1e2fad881073d06f186aebc4b2f4f2f32cdc5296 /drivers/gpu/drm/omapdrm/omap_fb.c
parent6941e3d12b3284ea5b8d32b7023221700cad5f49 (diff)
drm: omapdrm: fb: Turn framebuffer creation error messages into debug
Don't print userspace parameters validation failures as error messages to avoid giving userspace the ability to flood the kernel log. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fb.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c
index 016aac9a7731..a30f2060c1d6 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -404,8 +404,8 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
404 } 404 }
405 405
406 if (!format || !dss_format) { 406 if (!format || !dss_format) {
407 dev_err(dev->dev, "unsupported pixel format: %4.4s\n", 407 dev_dbg(dev->dev, "unsupported pixel format: %4.4s\n",
408 (char *)&mode_cmd->pixel_format); 408 (char *)&mode_cmd->pixel_format);
409 ret = -EINVAL; 409 ret = -EINVAL;
410 goto fail; 410 goto fail;
411 } 411 }
@@ -427,13 +427,13 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
427 * bytes per pixel. 427 * bytes per pixel.
428 */ 428 */
429 if (format->num_planes == 2 && pitch != mode_cmd->pitches[1]) { 429 if (format->num_planes == 2 && pitch != mode_cmd->pitches[1]) {
430 dev_err(dev->dev, "pitches differ between planes 0 and 1\n"); 430 dev_dbg(dev->dev, "pitches differ between planes 0 and 1\n");
431 ret = -EINVAL; 431 ret = -EINVAL;
432 goto fail; 432 goto fail;
433 } 433 }
434 434
435 if (pitch % format->cpp[0]) { 435 if (pitch % format->cpp[0]) {
436 dev_err(dev->dev, 436 dev_dbg(dev->dev,
437 "buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n", 437 "buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n",
438 pitch, format->cpp[0]); 438 pitch, format->cpp[0]);
439 ret = -EINVAL; 439 ret = -EINVAL;
@@ -448,7 +448,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
448 size = pitch * mode_cmd->height / vsub; 448 size = pitch * mode_cmd->height / vsub;
449 449
450 if (size > omap_gem_mmap_size(bos[i]) - mode_cmd->offsets[i]) { 450 if (size > omap_gem_mmap_size(bos[i]) - mode_cmd->offsets[i]) {
451 dev_err(dev->dev, 451 dev_dbg(dev->dev,
452 "provided buffer object is too small! %d < %d\n", 452 "provided buffer object is too small! %d < %d\n",
453 bos[i]->size - mode_cmd->offsets[i], size); 453 bos[i]->size - mode_cmd->offsets[i], size);
454 ret = -EINVAL; 454 ret = -EINVAL;