drm/gem-fb-helper: Use debug message on gem lookup failure
authorNoralf Trønnes <noralf@tronnes.org>
Mon, 11 Sep 2017 16:37:45 +0000 (18:37 +0200)
committerNoralf Trønnes <noralf@tronnes.org>
Sat, 16 Sep 2017 12:06:53 +0000 (14:06 +0200)
GEM lookup failure can easily be triggered by userspace so make
it a debug message, not an error message.

Also remove unnecessary inner parentheses and fix alphabetical
struct declaration order.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1505147865-18194-2-git-send-email-noralf@tronnes.org
drivers/gpu/drm/drm_gem_framebuffer_helper.c
include/drm/drm_gem_framebuffer_helper.h

index d54a083dc5dd076581da6cd1b81df6b5f1083a28..fc7e995541c9859d0711e3c39f9cadfc1e7d1ea4 100644 (file)
@@ -154,7 +154,7 @@ drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
 
                objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]);
                if (!objs[i]) {
-                       DRM_DEV_ERROR(dev->dev, "Failed to lookup GEM\n");
+                       DRM_DEBUG_KMS("Failed to lookup GEM object\n");
                        ret = -ENOENT;
                        goto err_gem_object_put;
                }
@@ -232,7 +232,7 @@ int drm_gem_fb_prepare_fb(struct drm_plane *plane,
        struct dma_buf *dma_buf;
        struct dma_fence *fence;
 
-       if ((plane->state->fb == state->fb) || !state->fb)
+       if (plane->state->fb == state->fb || !state->fb)
                return 0;
 
        dma_buf = drm_gem_fb_get_obj(state->fb, 0)->dma_buf;
index db9cfa07235edaaba88f610cfd93bfd03b33b7ae..5ca7cdc3f5276cb9ab85e13e6151ea808664bb0c 100644 (file)
@@ -2,8 +2,8 @@
 #define __DRM_GEM_FB_HELPER_H__
 
 struct drm_device;
-struct drm_file;
 struct drm_fb_helper_surface_size;
+struct drm_file;
 struct drm_framebuffer;
 struct drm_framebuffer_funcs;
 struct drm_gem_object;