浏览代码

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 <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>
Gustavo Padovan 11 年之前
父节点
当前提交
083fe3b035
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/gpu/drm/drm_plane_helper.c

+ 5 - 0
drivers/gpu/drm/drm_plane_helper.c

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