[PATCH 2/2] drm/gem-fb-helper: Use debug message on gem lookup failure

Daniel Vetter daniel at ffwll.ch
Mon Aug 21 16:23:11 UTC 2017


On Sat, Aug 19, 2017 at 04:34:45PM +0200, Noralf Trønnes wrote:
> 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 at ideasonboard.com>
> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

But pls make sure you get Laurent's review too :-)

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 ++--
>  include/drm/drm_gem_framebuffer_helper.h     | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> index 9a36d44..adea2b8 100644
> --- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> +++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
> @@ -156,7 +156,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;
>  		}
> @@ -234,7 +234,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;
> diff --git a/include/drm/drm_gem_framebuffer_helper.h b/include/drm/drm_gem_framebuffer_helper.h
> index db9cfa0..5ca7cdc 100644
> --- a/include/drm/drm_gem_framebuffer_helper.h
> +++ b/include/drm/drm_gem_framebuffer_helper.h
> @@ -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;
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list