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). Cc: Imre Deak <imre.deak@xxxxxxxxx> Cc: Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> --- 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: -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx