[PATCH 4/4] init-power

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 11 17:35:49 UTC 2018


---
 drivers/gpu/drm/i915/i915_drv.c      | 15 +++++++++++----
 drivers/gpu/drm/i915/intel_display.c |  3 ---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index eb6e2107b5b6..b91affa06457 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -665,10 +665,6 @@ static int i915_load_modeset_init(struct drm_device *dev)
 		goto cleanup_vga_client;
 
 	/* must happen before intel_power_domains_init_hw() on VLV/CHV */
-	intel_update_rawclk(dev_priv);
-
-	intel_power_domains_init_hw(dev_priv, false);
-
 	intel_csr_ucode_init(dev_priv);
 
 	ret = intel_irq_install(dev_priv);
@@ -1404,7 +1400,15 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
 			goto out_cleanup_hw;
 	}
 
+	intel_update_rawclk(dev_priv);
+	intel_power_domains_init_hw(dev_priv, false);
+
 	ret = i915_load_modeset_init(&dev_priv->drm);
+
+	/* intel_power_domains_init_hw() counter part  */
+	intel_display_set_init_power(dev_priv, false);
+	intel_power_domains_verify_state(dev_priv);
+
 	if (ret < 0)
 		goto out_cleanup_hw;
 
@@ -1777,6 +1781,9 @@ static int i915_drm_resume(struct drm_device *dev)
 
 	intel_opregion_notify_adapter(dev_priv, PCI_D0);
 
+	intel_display_set_init_power(dev_priv, false);
+	intel_power_domains_verify_state(dev_priv);
+
 	enable_rpm_wakeref_asserts(dev_priv);
 
 	return 0;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index cc3f21ddae9c..cfc19cdf6091 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15900,9 +15900,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
 		if (WARN_ON(put_domains))
 			modeset_put_power_domains(dev_priv, put_domains);
 	}
-	intel_display_set_init_power(dev_priv, false);
-
-	intel_power_domains_verify_state(dev_priv);
 
 	intel_fbc_init_pipe_state(dev_priv);
 }
-- 
2.18.0



More information about the Intel-gfx-trybot mailing list