drm: make sure visible is set to false if fb is null
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 24 Oct 2014 18:00:17 +0000 (19:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:21:29 +0000 (23:21 +0100)
We can't let visible set true while the fb is null, some places of
the code only check for visible to base its decisions.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_plane_helper.c

index 827ec1a3040b202fc025a9d1b8af54e32b67726f..fe4d1fb2376cd488d22974a2710d2b2571fb6122 100644 (file)
@@ -127,6 +127,11 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
                return -ERANGE;
        }
 
+       if (!fb) {
+               *visible = false;
+               return 0;
+       }
+
        *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale);
        if (!*visible)
                /*