aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-08-07 06:30:23 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-08 08:11:13 -0400
commit88a94a58a07267d979cc168c3e511b99f4164951 (patch)
tree9924ce72f21af7d15ec95adb3054d9d1680844e6 /drivers/gpu/drm/i915/intel_sprite.c
parentb39d53f624d50d1588933e0ab17f19a5f2da5d94 (diff)
drm/i915: Don't try to disable plane if it's already disabled
Check plane->fb in intel_disable_plane() to determine if the plane is already disabled. If the plane has an fb, then it must also have a crtc, so we can drop the plane->crtc check and just call intel_enable_primary() directly. v2: WARN and bail if the plane doesn't have a crtc when it should Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> 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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index d4e0592e3389..0a174d7e5854 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -863,8 +863,13 @@ intel_disable_plane(struct drm_plane *plane)
863 struct intel_plane *intel_plane = to_intel_plane(plane); 863 struct intel_plane *intel_plane = to_intel_plane(plane);
864 int ret = 0; 864 int ret = 0;
865 865
866 if (plane->crtc) 866 if (!plane->fb)
867 intel_enable_primary(plane->crtc); 867 return 0;
868
869 if (WARN_ON(!plane->crtc))
870 return -EINVAL;
871
872 intel_enable_primary(plane->crtc);
868 intel_plane->disable_plane(plane, plane->crtc); 873 intel_plane->disable_plane(plane, plane->crtc);
869 874
870 if (!intel_plane->obj) 875 if (!intel_plane->obj)