Re: [PATCH 9/9] drm/i915: remove the now redundant i915_driver_modeset_* call layer

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

 



On Tue, Feb 04, 2020 at 03:42:28PM +0200, Jani Nikula wrote:
> The i915_driver_modeset_*() functions have become irrelevant, and the
> extra layer can be removed.
> 
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Ok, some extraneous layers scraped off. Good.

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 76 +++++++++------------------------
>  1 file changed, 19 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index fca693ad6cd7..c097dced0d9b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -272,58 +272,6 @@ intel_teardown_mchbar(struct drm_i915_private *dev_priv)
>  		release_resource(&dev_priv->mch_res);
>  }
>  
> -/* part #1: call before irq install */
> -static int i915_driver_modeset_probe_noirq(struct drm_i915_private *i915)
> -{
> -	return intel_modeset_init_noirq(i915);
> -}
> -
> -/* part #2: call after irq install */
> -static int i915_driver_modeset_probe(struct drm_i915_private *i915)
> -{
> -	int ret;
> -
> -	/* Important: The output setup functions called by modeset_init need
> -	 * working irqs for e.g. gmbus and dp aux transfers. */
> -	ret = intel_modeset_init_nogem(i915);
> -	if (ret)
> -		goto out;
> -
> -	ret = i915_gem_init(i915);
> -	if (ret)
> -		goto cleanup_modeset;
> -
> -	ret = intel_modeset_init(i915);
> -	if (ret)
> -		goto cleanup_gem;
> -
> -	return 0;
> -
> -cleanup_gem:
> -	i915_gem_suspend(i915);
> -	i915_gem_driver_remove(i915);
> -	i915_gem_driver_release(i915);
> -cleanup_modeset:
> -	/* FIXME */
> -	intel_modeset_driver_remove(i915);
> -	intel_irq_uninstall(i915);
> -	intel_modeset_driver_remove_noirq(i915);
> -out:
> -	return ret;
> -}
> -
> -/* part #1: call before irq uninstall */
> -static void i915_driver_modeset_remove(struct drm_i915_private *i915)
> -{
> -	intel_modeset_driver_remove(i915);
> -}
> -
> -/* part #2: call after irq uninstall */
> -static void i915_driver_modeset_remove_noirq(struct drm_i915_private *i915)
> -{
> -	intel_modeset_driver_remove_noirq(i915);
> -}
> -
>  static void intel_init_dpio(struct drm_i915_private *dev_priv)
>  {
>  	/*
> @@ -1502,7 +1450,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (ret < 0)
>  		goto out_cleanup_mmio;
>  
> -	ret = i915_driver_modeset_probe_noirq(i915);
> +	ret = intel_modeset_init_noirq(i915);
>  	if (ret < 0)
>  		goto out_cleanup_hw;
>  
> @@ -1510,10 +1458,20 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (ret)
>  		goto out_cleanup_modeset;
>  
> -	ret = i915_driver_modeset_probe(i915);
> -	if (ret < 0)
> +	/* Important: The output setup functions called by modeset_init need
> +	 * working irqs for e.g. gmbus and dp aux transfers. */
> +	ret = intel_modeset_init_nogem(i915);
> +	if (ret)
>  		goto out_cleanup_irq;
>  
> +	ret = i915_gem_init(i915);
> +	if (ret)
> +		goto out_cleanup_modeset;
> +
> +	ret = intel_modeset_init(i915);
> +	if (ret)
> +		goto out_cleanup_gem;
> +
>  	i915_driver_register(i915);
>  
>  	enable_rpm_wakeref_asserts(&i915->runtime_pm);
> @@ -1522,6 +1480,10 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	return 0;
>  
> +out_cleanup_gem:
> +	i915_gem_suspend(i915);
> +	i915_gem_driver_remove(i915);
> +	i915_gem_driver_release(i915);
>  out_cleanup_irq:
>  	intel_irq_uninstall(i915);
>  out_cleanup_modeset:
> @@ -1565,11 +1527,11 @@ void i915_driver_remove(struct drm_i915_private *i915)
>  
>  	intel_gvt_driver_remove(i915);
>  
> -	i915_driver_modeset_remove(i915);
> +	intel_modeset_driver_remove(i915);
>  
>  	intel_irq_uninstall(i915);
>  
> -	i915_driver_modeset_remove_noirq(i915);
> +	intel_modeset_driver_remove_noirq(i915);
>  
>  	i915_reset_error_state(i915);
>  	i915_gem_driver_remove(i915);
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux