[Intel-gfx] [PATCH 5/7] drm/i915: rip out now unused is_foo tracking from crtc code

Jani Nikula jani.nikula at linux.intel.com
Fri May 10 13:39:06 CEST 2013


On Tue, 30 Apr 2013, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> More ugly stuff gone for good! The big special case left now is
> lvds (which is indeed really special).

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

A follow-up patch could switch the switches to ifs for the OCD folks. ;)

> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 28 +++-------------------------
>  1 file changed, 3 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e68d26a..44bcfae 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4833,8 +4833,8 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
>  	int refclk, num_connectors = 0;
>  	intel_clock_t clock, reduced_clock;
>  	u32 dspcntr;
> -	bool ok, has_reduced_clock = false, is_sdvo = false;
> -	bool is_lvds = false, is_tv = false;
> +	bool ok, has_reduced_clock = false;
> +	bool is_lvds = false;
>  	struct intel_encoder *encoder;
>  	const intel_limit_t *limit;
>  	int ret;
> @@ -4844,15 +4844,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
>  		case INTEL_OUTPUT_LVDS:
>  			is_lvds = true;
>  			break;
> -		case INTEL_OUTPUT_SDVO:
> -		case INTEL_OUTPUT_HDMI:
> -			is_sdvo = true;
> -			if (encoder->needs_tv_clock)
> -				is_tv = true;
> -			break;
> -		case INTEL_OUTPUT_TVOUT:
> -			is_tv = true;
> -			break;
>  		}
>  
>  		num_connectors++;
> @@ -5291,7 +5282,6 @@ static int ironlake_get_refclk(struct drm_crtc *crtc)
>  	struct drm_device *dev = crtc->dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct intel_encoder *encoder;
> -	struct intel_encoder *edp_encoder = NULL;
>  	int num_connectors = 0;
>  	bool is_lvds = false;
>  
> @@ -5300,9 +5290,6 @@ static int ironlake_get_refclk(struct drm_crtc *crtc)
>  		case INTEL_OUTPUT_LVDS:
>  			is_lvds = true;
>  			break;
> -		case INTEL_OUTPUT_EDP:
> -			edp_encoder = encoder;
> -			break;
>  		}
>  		num_connectors++;
>  	}
> @@ -5461,22 +5448,13 @@ static bool ironlake_compute_clocks(struct drm_crtc *crtc,
>  	struct intel_encoder *intel_encoder;
>  	int refclk;
>  	const intel_limit_t *limit;
> -	bool ret, is_sdvo = false, is_tv = false, is_lvds = false;
> +	bool ret, is_lvds = false;
>  
>  	for_each_encoder_on_crtc(dev, crtc, intel_encoder) {
>  		switch (intel_encoder->type) {
>  		case INTEL_OUTPUT_LVDS:
>  			is_lvds = true;
>  			break;
> -		case INTEL_OUTPUT_SDVO:
> -		case INTEL_OUTPUT_HDMI:
> -			is_sdvo = true;
> -			if (intel_encoder->needs_tv_clock)
> -				is_tv = true;
> -			break;
> -		case INTEL_OUTPUT_TVOUT:
> -			is_tv = true;
> -			break;
>  		}
>  	}
>  
> -- 
> 1.7.11.7
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list