[PATCH] drm/i915: Remove unnecessary goto in intel_primary_plane_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The same logic can be implemented without it, and it even saves a line
of code.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 42bcbea..c424c36 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11803,13 +11803,11 @@ intel_primary_plane_disable(struct drm_plane *plane)
 	 * In either case, we need to unpin the FB and let the fb pointer get
 	 * updated, but otherwise we don't need to touch the hardware.
 	 */
-	if (!intel_crtc->primary_enabled)
-		goto disable_unpin;
-
-	intel_crtc_wait_for_pending_flips(plane->crtc);
-	intel_disable_primary_hw_plane(plane, plane->crtc);
+	if (intel_crtc->primary_enabled) {
+		intel_crtc_wait_for_pending_flips(plane->crtc);
+		intel_disable_primary_hw_plane(plane, plane->crtc);
+	}
 
-disable_unpin:
 	mutex_lock(&dev->struct_mutex);
 	i915_gem_track_fb(intel_fb_obj(plane->fb), NULL,
 			  INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe));
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux