From: Gustavo Padovan Date: Fri, 24 Oct 2014 18:00:17 +0000 (+0100) Subject: drm: make sure visible is set to false if fb is null X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=083fe3b035d286d79071fd77d2a2c5abfdef495b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: make sure visible is set to false if fb is null 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 Reviewed-by: Ville Syrjälä Acked-by: Dave Airlie Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 827ec1a3040b..fe4d1fb2376c 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -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) /*