diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-01 11:02:13 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 06:46:59 -0400 |
commit | 5f3fb46bbd643ddacde33fd5fe6f4db4ca963312 (patch) | |
tree | 95198cf0a8e9b2c22e957dbcb6f4472f88f4e20c /drivers/gpu/drm/i915/intel_sprite.c | |
parent | 82284b6becdbef6d8cd3fb43e8698510833a5129 (diff) |
drm/i915: Kill a goto from sprite disable code
Let's not use goto when a simple if suffices. This is not error handling
code or anything, so the goto looks out of place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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) |