提交 a078a3dd 编写于 作者: L Laurent Pinchart

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: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 6941e3d1
...@@ -404,7 +404,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, ...@@ -404,7 +404,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
} }
if (!format || !dss_format) { if (!format || !dss_format) {
dev_err(dev->dev, "unsupported pixel format: %4.4s\n", dev_dbg(dev->dev, "unsupported pixel format: %4.4s\n",
(char *)&mode_cmd->pixel_format); (char *)&mode_cmd->pixel_format);
ret = -EINVAL; ret = -EINVAL;
goto fail; goto fail;
...@@ -427,13 +427,13 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, ...@@ -427,13 +427,13 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
* bytes per pixel. * bytes per pixel.
*/ */
if (format->num_planes == 2 && pitch != mode_cmd->pitches[1]) { if (format->num_planes == 2 && pitch != mode_cmd->pitches[1]) {
dev_err(dev->dev, "pitches differ between planes 0 and 1\n"); dev_dbg(dev->dev, "pitches differ between planes 0 and 1\n");
ret = -EINVAL; ret = -EINVAL;
goto fail; goto fail;
} }
if (pitch % format->cpp[0]) { if (pitch % format->cpp[0]) {
dev_err(dev->dev, dev_dbg(dev->dev,
"buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n", "buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n",
pitch, format->cpp[0]); pitch, format->cpp[0]);
ret = -EINVAL; ret = -EINVAL;
...@@ -448,7 +448,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, ...@@ -448,7 +448,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev,
size = pitch * mode_cmd->height / vsub; size = pitch * mode_cmd->height / vsub;
if (size > omap_gem_mmap_size(bos[i]) - mode_cmd->offsets[i]) { if (size > omap_gem_mmap_size(bos[i]) - mode_cmd->offsets[i]) {
dev_err(dev->dev, dev_dbg(dev->dev,
"provided buffer object is too small! %d < %d\n", "provided buffer object is too small! %d < %d\n",
bos[i]->size - mode_cmd->offsets[i], size); bos[i]->size - mode_cmd->offsets[i], size);
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册