[Intel-gfx] [PATCH 03/11] drm/i915: keep power domains init/remove calls at the same level
Jani Nikula
jani.nikula at intel.com
Tue Oct 8 12:14:20 UTC 2019
On Mon, 07 Oct 2019, Jani Nikula <jani.nikula at intel.com> wrote:
> Move intel_power_domains_init_hw() call one level higher, to be on the
> same level as all the other intel_power_domains_*() calls in the
> probe/remove paths.
>
> This also moves the power domain hw init earlier in the sequence, along
> with the dependent intel_update_rawclk() call. As far as I can tell
> there should not be any other dependencies on the initalization that's
> now done after these calls (vblank init, bios init, vga register).
As Imre told me, the power domain code depends on both the vga and bios
inits. Drawing board, here we go again.
BR,
Jani.
>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 0abfece20c57..16ac5e88e1ec 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -289,11 +289,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
> if (ret)
> goto out;
>
> - /* must happen before intel_power_domains_init_hw() on VLV/CHV */
> - intel_update_rawclk(i915);
> -
> - intel_power_domains_init_hw(i915, false);
> -
> intel_csr_ucode_init(i915);
>
> ret = intel_irq_install(i915);
> @@ -336,7 +331,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
> intel_irq_uninstall(i915);
> cleanup_csr:
> intel_csr_ucode_fini(i915);
> - intel_power_domains_driver_remove(i915);
> intel_vga_unregister(i915);
> out:
> return ret;
> @@ -1493,6 +1487,11 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (ret < 0)
> goto out_cleanup_mmio;
>
> + /* must happen before intel_power_domains_init_hw() on VLV/CHV */
> + intel_update_rawclk(i915);
> +
> + intel_power_domains_init_hw(i915, false);
> +
> ret = i915_driver_modeset_probe(i915);
> if (ret < 0)
> goto out_cleanup_hw;
> @@ -1506,6 +1505,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> return 0;
>
> out_cleanup_hw:
> + intel_power_domains_driver_remove(i915);
> i915_driver_hw_remove(i915);
> i915_ggtt_driver_release(i915);
> out_cleanup_mmio:
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list