[Intel-gfx] [PATCH] drm/i915: Nuke 'mode' argument to intel_get_load_detect_pipe()

Jani Nikula jani.nikula at linux.intel.com
Wed Oct 30 14:43:50 UTC 2019


On Tue, 29 Oct 2019, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> We always pass mode==NULL to intel_get_load_detect_pipe(). Remove
> the pointless function argument.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_crt.c     | 2 +-
>  drivers/gpu/drm/i915/display/intel_display.c | 7 ++-----
>  drivers/gpu/drm/i915/display/intel_display.h | 1 -
>  drivers/gpu/drm/i915/display/intel_tv.c      | 2 +-
>  4 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c
> index ff6126ea793c..25118619e240 100644
> --- a/drivers/gpu/drm/i915/display/intel_crt.c
> +++ b/drivers/gpu/drm/i915/display/intel_crt.c
> @@ -844,7 +844,7 @@ intel_crt_detect(struct drm_connector *connector,
>  	}
>  
>  	/* for pre-945g platforms use load detect */
> -	ret = intel_get_load_detect_pipe(connector, NULL, &tmp, ctx);
> +	ret = intel_get_load_detect_pipe(connector, &tmp, ctx);
>  	if (ret > 0) {
>  		if (intel_crt_detect_ddc(connector))
>  			status = connector_status_connected;
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index e56a75c07043..1862546356fd 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -11328,7 +11328,6 @@ static int intel_modeset_disable_planes(struct drm_atomic_state *state,
>  }
>  
>  int intel_get_load_detect_pipe(struct drm_connector *connector,
> -			       const struct drm_display_mode *mode,
>  			       struct intel_load_detect_pipe *old,
>  			       struct drm_modeset_acquire_ctx *ctx)
>  {
> @@ -11435,10 +11434,8 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
>  
>  	crtc_state->base.active = crtc_state->base.enable = true;
>  
> -	if (!mode)
> -		mode = &load_detect_mode;
> -
> -	ret = drm_atomic_set_mode_for_crtc(&crtc_state->base, mode);
> +	ret = drm_atomic_set_mode_for_crtc(&crtc_state->base,
> +					   &load_detect_mode);
>  	if (ret)
>  		goto fail;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index ca7ca2804d8b..355c50088589 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -509,7 +509,6 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
>  			 struct intel_digital_port *dport,
>  			 unsigned int expected_mask);
>  int intel_get_load_detect_pipe(struct drm_connector *connector,
> -			       const struct drm_display_mode *mode,
>  			       struct intel_load_detect_pipe *old,
>  			       struct drm_modeset_acquire_ctx *ctx);
>  void intel_release_load_detect_pipe(struct drm_connector *connector,
> diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
> index 70726b481244..5556d8300a88 100644
> --- a/drivers/gpu/drm/i915/display/intel_tv.c
> +++ b/drivers/gpu/drm/i915/display/intel_tv.c
> @@ -1701,7 +1701,7 @@ intel_tv_detect(struct drm_connector *connector,
>  		struct intel_load_detect_pipe tmp;
>  		int ret;
>  
> -		ret = intel_get_load_detect_pipe(connector, NULL, &tmp, ctx);
> +		ret = intel_get_load_detect_pipe(connector, &tmp, ctx);
>  		if (ret < 0)
>  			return ret;

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list