aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_plane_helper.c
diff options
context:
space:
mode:
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 18a1ac6ac22f..391dfb7d1086 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,
142{ 142{
143 int hscale, vscale; 143 int hscale, vscale;
144 144
145 if (!fb) {
146 *visible = false;
147 return 0;
148 }
149
150 /* crtc should only be NULL when disabling (i.e., !fb) */
151 if (WARN_ON(!crtc)) {
152 *visible = false;
153 return 0;
154 }
155
145 if (!crtc->enabled && !can_update_disabled) { 156 if (!crtc->enabled && !can_update_disabled) {
146 DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n"); 157 DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n");
147 return -EINVAL; 158 return -EINVAL;
@@ -155,11 +166,6 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
155 return -ERANGE; 166 return -ERANGE;
156 } 167 }
157 168
158 if (!fb) {
159 *visible = false;
160 return 0;
161 }
162
163 *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale); 169 *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale);
164 if (!*visible) 170 if (!*visible)
165 /* 171 /*