Skip to content

Commit f7de502

Browse files
dceraoloickle
authored andcommitted
drm/i915: make more uncore function work on intel_uncore
Move the init, fini, prune, suspend, resume function to work on intel_uncore instead of dev_priv. Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Paulo Zanoni <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3ceea6a commit f7de502

File tree

6 files changed

+159
-156
lines changed

6 files changed

+159
-156
lines changed

drivers/gpu/drm/i915/i915_drv.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,11 +1031,11 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
10311031
if (ret < 0)
10321032
goto err_bridge;
10331033

1034-
intel_uncore_init(dev_priv);
1034+
intel_uncore_init(&dev_priv->uncore);
10351035

10361036
intel_device_info_init_mmio(dev_priv);
10371037

1038-
intel_uncore_prune(dev_priv);
1038+
intel_uncore_prune(&dev_priv->uncore);
10391039

10401040
intel_uc_init_mmio(dev_priv);
10411041

@@ -1048,7 +1048,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
10481048
return 0;
10491049

10501050
err_uncore:
1051-
intel_uncore_fini(dev_priv);
1051+
intel_uncore_fini(&dev_priv->uncore);
10521052
i915_mmio_cleanup(dev_priv);
10531053
err_bridge:
10541054
pci_dev_put(dev_priv->bridge_dev);
@@ -1062,7 +1062,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
10621062
*/
10631063
static void i915_driver_cleanup_mmio(struct drm_i915_private *dev_priv)
10641064
{
1065-
intel_uncore_fini(dev_priv);
1065+
intel_uncore_fini(&dev_priv->uncore);
10661066
i915_mmio_cleanup(dev_priv);
10671067
pci_dev_put(dev_priv->bridge_dev);
10681068
}
@@ -2124,7 +2124,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
21242124

21252125
i915_gem_suspend_late(dev_priv);
21262126

2127-
intel_uncore_suspend(dev_priv);
2127+
intel_uncore_suspend(&dev_priv->uncore);
21282128

21292129
intel_power_domains_suspend(dev_priv,
21302130
get_suspend_mode(dev_priv, hibernation));
@@ -2320,7 +2320,9 @@ static int i915_drm_resume_early(struct drm_device *dev)
23202320
DRM_ERROR("Resume prepare failed: %d, continuing anyway\n",
23212321
ret);
23222322

2323-
intel_uncore_resume_early(dev_priv);
2323+
intel_uncore_resume_early(&dev_priv->uncore);
2324+
2325+
i915_check_and_clear_faults(dev_priv);
23242326

23252327
if (INTEL_GEN(dev_priv) >= 11 || IS_GEN9_LP(dev_priv)) {
23262328
gen9_sanitize_dc_state(dev_priv);
@@ -2890,7 +2892,7 @@ static int intel_runtime_suspend(struct device *kdev)
28902892

28912893
intel_runtime_pm_disable_interrupts(dev_priv);
28922894

2893-
intel_uncore_suspend(dev_priv);
2895+
intel_uncore_suspend(&dev_priv->uncore);
28942896

28952897
ret = 0;
28962898
if (INTEL_GEN(dev_priv) >= 11) {
@@ -2907,7 +2909,7 @@ static int intel_runtime_suspend(struct device *kdev)
29072909

29082910
if (ret) {
29092911
DRM_ERROR("Runtime suspend failed, disabling it (%d)\n", ret);
2910-
intel_uncore_runtime_resume(dev_priv);
2912+
intel_uncore_runtime_resume(&dev_priv->uncore);
29112913

29122914
intel_runtime_pm_enable_interrupts(dev_priv);
29132915

@@ -3004,7 +3006,7 @@ static int intel_runtime_resume(struct device *kdev)
30043006
ret = vlv_resume_prepare(dev_priv, true);
30053007
}
30063008

3007-
intel_uncore_runtime_resume(dev_priv);
3009+
intel_uncore_runtime_resume(&dev_priv->uncore);
30083010

30093011
intel_runtime_pm_enable_interrupts(dev_priv);
30103012

0 commit comments

Comments
 (0)