diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index b859f944b53b..b5e30b16a9cc 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -868,7 +868,6 @@ intel_disable_plane(struct drm_plane *plane) | |||
868 | struct drm_device *dev = plane->dev; | 868 | struct drm_device *dev = plane->dev; |
869 | struct intel_plane *intel_plane = to_intel_plane(plane); | 869 | struct intel_plane *intel_plane = to_intel_plane(plane); |
870 | struct intel_crtc *intel_crtc; | 870 | struct intel_crtc *intel_crtc; |
871 | int ret = 0; | ||
872 | 871 | ||
873 | if (!plane->fb) | 872 | if (!plane->fb) |
874 | return 0; | 873 | return 0; |
@@ -883,20 +882,18 @@ intel_disable_plane(struct drm_plane *plane) | |||
883 | intel_plane->disable_plane(plane, plane->crtc); | 882 | intel_plane->disable_plane(plane, plane->crtc); |
884 | } | 883 | } |
885 | 884 | ||
886 | if (!intel_plane->obj) | 885 | if (intel_plane->obj) { |
887 | goto out; | 886 | if (intel_crtc->active) |
888 | 887 | intel_wait_for_vblank(dev, intel_plane->pipe); | |
889 | if (intel_crtc->active) | ||
890 | intel_wait_for_vblank(dev, intel_plane->pipe); | ||
891 | 888 | ||
892 | mutex_lock(&dev->struct_mutex); | 889 | mutex_lock(&dev->struct_mutex); |
893 | intel_unpin_fb_obj(intel_plane->obj); | 890 | intel_unpin_fb_obj(intel_plane->obj); |
894 | mutex_unlock(&dev->struct_mutex); | 891 | mutex_unlock(&dev->struct_mutex); |
895 | 892 | ||
896 | intel_plane->obj = NULL; | 893 | intel_plane->obj = NULL; |
897 | out: | 894 | } |
898 | 895 | ||
899 | return ret; | 896 | return 0; |
900 | } | 897 | } |
901 | 898 | ||
902 | static void intel_destroy_plane(struct drm_plane *plane) | 899 | static void intel_destroy_plane(struct drm_plane *plane) |