diff mbox

[12/58] drm/i915: rip out encoder->disable/enable checks

Message ID 1345403595-9678-13-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Daniel Vetter Aug. 19, 2012, 7:12 p.m. UTC
All encoders are now converted so there's no need for these checks any
more.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

Comments

Jesse Barnes Sept. 4, 2012, 8:11 p.m. UTC | #1
On Sun, 19 Aug 2012 21:12:29 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> All encoders are now converted so there's no need for these checks any
> more.
> 
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 24 ++++++++----------------
>  1 file changed, 8 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0d48ebe..4805385 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3267,10 +3267,8 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
>  	intel_crtc_update_cursor(crtc, true);
>  
>  encoders:
> -	for_each_encoder_on_crtc(dev, crtc, encoder) {
> -		if (encoder->enable)
> -			encoder->enable(encoder);
> -	}
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->enable(encoder);
>  }
>  
>  static void ironlake_crtc_disable(struct drm_crtc *crtc)
> @@ -3285,10 +3283,8 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
>  
>  	/* XXX: For compatability with the crtc helper code, call the encoder's
>  	 * disable function unconditionally for now. */
> -	for_each_encoder_on_crtc(dev, crtc, encoder) {
> -		if (encoder->disable)
> -			encoder->disable(encoder);
> -	}
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->disable(encoder);
>  
>  	if (!intel_crtc->active)
>  		return;
> @@ -3412,10 +3408,8 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
>  	intel_crtc_update_cursor(crtc, true);
>  
>  encoders:
> -	for_each_encoder_on_crtc(dev, crtc, encoder) {
> -		if (encoder->enable)
> -			encoder->enable(encoder);
> -	}
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->enable(encoder);
>  }
>  
>  static void i9xx_crtc_disable(struct drm_crtc *crtc)
> @@ -3429,10 +3423,8 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
>  
>  	/* XXX: For compatability with the crtc helper code, call the encoder's
>  	 * disable function unconditionally for now. */
> -	for_each_encoder_on_crtc(dev, crtc, encoder) {
> -		if (encoder->disable)
> -			encoder->disable(encoder);
> -	}
> +	for_each_encoder_on_crtc(dev, crtc, encoder)
> +		encoder->disable(encoder);
>  
>  	if (!intel_crtc->active)
>  		return;

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0d48ebe..4805385 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3267,10 +3267,8 @@  static void ironlake_crtc_enable(struct drm_crtc *crtc)
 	intel_crtc_update_cursor(crtc, true);
 
 encoders:
-	for_each_encoder_on_crtc(dev, crtc, encoder) {
-		if (encoder->enable)
-			encoder->enable(encoder);
-	}
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->enable(encoder);
 }
 
 static void ironlake_crtc_disable(struct drm_crtc *crtc)
@@ -3285,10 +3283,8 @@  static void ironlake_crtc_disable(struct drm_crtc *crtc)
 
 	/* XXX: For compatability with the crtc helper code, call the encoder's
 	 * disable function unconditionally for now. */
-	for_each_encoder_on_crtc(dev, crtc, encoder) {
-		if (encoder->disable)
-			encoder->disable(encoder);
-	}
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->disable(encoder);
 
 	if (!intel_crtc->active)
 		return;
@@ -3412,10 +3408,8 @@  static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_crtc_update_cursor(crtc, true);
 
 encoders:
-	for_each_encoder_on_crtc(dev, crtc, encoder) {
-		if (encoder->enable)
-			encoder->enable(encoder);
-	}
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->enable(encoder);
 }
 
 static void i9xx_crtc_disable(struct drm_crtc *crtc)
@@ -3429,10 +3423,8 @@  static void i9xx_crtc_disable(struct drm_crtc *crtc)
 
 	/* XXX: For compatability with the crtc helper code, call the encoder's
 	 * disable function unconditionally for now. */
-	for_each_encoder_on_crtc(dev, crtc, encoder) {
-		if (encoder->disable)
-			encoder->disable(encoder);
-	}
+	for_each_encoder_on_crtc(dev, crtc, encoder)
+		encoder->disable(encoder);
 
 	if (!intel_crtc->active)
 		return;