[Intel-gfx] [PATCH] drm/i915: Pass dev_priv to intel_setup_outputs()

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Nov 23 13:59:54 UTC 2016


On Wed, Nov 23, 2016 at 03:48:30PM +0200, Ander Conselvan de Oliveira wrote:
> Pass dev_priv to intel_setup_outputs() and functions called by it, since
> those are all intel i915 specific functions. Also, in the majority of
> the functions dev_priv is used more often than dev. In the rare cases
> where there are a few calls back into drm core, a local dev variable was
> added.
> 
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c      |   4 +-
>  drivers/gpu/drm/i915/i915_drv.h      |   2 +-
>  drivers/gpu/drm/i915/intel_crt.c     |   7 +-
>  drivers/gpu/drm/i915/intel_ddi.c     |   5 +-
>  drivers/gpu/drm/i915/intel_display.c | 120 ++++++++++++++++-------------------
>  drivers/gpu/drm/i915/intel_dp.c      |   8 +--
>  drivers/gpu/drm/i915/intel_drv.h     |  22 ++++---
>  drivers/gpu/drm/i915/intel_dsi.c     |   8 +--
>  drivers/gpu/drm/i915/intel_dvo.c     |   9 ++-
>  drivers/gpu/drm/i915/intel_hdmi.c    |   8 +--
>  drivers/gpu/drm/i915/intel_lvds.c    |   4 +-
>  drivers/gpu/drm/i915/intel_psr.c     |   4 +-
>  drivers/gpu/drm/i915/intel_sdvo.c    |  19 +++---
>  drivers/gpu/drm/i915/intel_tv.c      |   4 +-
>  14 files changed, 107 insertions(+), 117 deletions(-)
> 
<snip>
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 4e0d025..fe9a359 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -1431,15 +1431,15 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  	}
>  }
>  
> -void intel_dsi_init(struct drm_device *dev)
> +void intel_dsi_init(struct drm_i915_private *dev_priv)
>  {
> +	struct drm_device *dev = &dev_priv->drm;
>  	struct intel_dsi *intel_dsi;
>  	struct intel_encoder *intel_encoder;
>  	struct drm_encoder *encoder;
>  	struct intel_connector *intel_connector;
>  	struct drm_connector *connector;
>  	struct drm_display_mode *scan, *fixed_mode = NULL;
> -	struct drm_i915_private *dev_priv = to_i915(dev);
>  	enum port port;
>  	unsigned int i;
>  
> @@ -1474,8 +1474,8 @@ void intel_dsi_init(struct drm_device *dev)
>  
>  	connector = &intel_connector->base;
>  
> -	drm_encoder_init(dev, encoder, &intel_dsi_funcs, DRM_MODE_ENCODER_DSI,
> -			 "DSI %c", port_name(port));
> +	drm_encoder_init(&dev_priv->drm, encoder, &intel_dsi_funcs,
> +			 DRM_MODE_ENCODER_DSI, "DSI %c", port_name(port));

Here you have introduced a local 'dev', so this hunk doesn't seem
necessary. But no biggie. Patch lgtm.

Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list