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

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

 



Quoting Jani Nikula (2019-10-07 16:09:36)
> The i915_driver_modeset_*() functions have become irrelevant, and the
> extra layer can be removed.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  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 5a778944d7a8..2e19e70b3963 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -269,58 +269,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)
>  {
>         /*
> @@ -1466,7 +1414,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>         intel_power_domains_init_hw(i915, false);
>  
> -       ret = i915_driver_modeset_probe_noirq(i915);
> +       ret = intel_modeset_init_noirq(i915);
>         if (ret < 0)
>                 goto out_cleanup_hw;
>  
> @@ -1474,10 +1422,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;

Fwiw, I'm really digging the nomenclature, and I think it is the biggest
advance made in sorting out the init sequence.
-Chris
_______________________________________________
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