summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_plane_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-17 20:24:02 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-17 20:24:02 +0100
commit72a3697097b8dc92f5b8362598f5730a9986eb83 (patch)
tree221a922470b6eb5c37a01ee2b2e5ae0c2070bbea /drivers/gpu/drm/drm_plane_helper.c
parent22b8b13b6f436ffbb6e540f5f8039b1084a72794 (diff)
parentdafffda023b04f87e695dfcf5448e4da964d2e95 (diff)
Merge branch 'topic/core-stuff' into topic/atomic-core
Backmerge my drm-misc branch because of conflicts. Just simple stuff but better to clear this out before I merge the other atomic patches. Conflicts: drivers/gpu/drm/drm_crtc.c drivers/gpu/drm/drm_edid.c Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_plane_helper.c')
-rw-r--r--drivers/gpu/drm/drm_plane_helper.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index ae61fb21ea86..f24c4cfe674b 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -142,6 +142,17 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
{
int hscale, vscale;
+ if (!fb) {
+ *visible = false;
+ return 0;
+ }
+
+ /* crtc should only be NULL when disabling (i.e., !fb) */
+ if (WARN_ON(!crtc)) {
+ *visible = false;
+ return 0;
+ }
+
if (!crtc->enabled && !can_update_disabled) {
DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n");
return -EINVAL;
@@ -155,11 +166,6 @@ 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)
/*