aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-03-16 13:38:51 +0200
committerImre Deak <imre.deak@intel.com>2016-03-17 15:22:04 +0200
commit861f878e6a7a8bc152c92de358b96eb3bd086f78 (patch)
tree00b88684202618c560bc84950cbd0a337c68f391 /drivers/gpu/drm/i915/i915_dma.c
parentFix MCHBAR cleanup on the driver init error path (diff)
downloadlinux-dev-861f878e6a7a8bc152c92de358b96eb3bd086f78.tar.xz
linux-dev-861f878e6a7a8bc152c92de358b96eb3bd086f78.zip
drm/i915: Move load time PCH detect, DPIO, power domain SW init earlier
These are all SW only init steps not accessing the device and they only need the platform identification macros to work, which are already available earlier, so move these init steps earlier. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1458128348-15730-3-git-send-email-imre.deak@intel.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 1cbd99528329..c79f53292a6f 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1020,7 +1020,12 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (ret < 0)
goto out_free_priv;
+ /* This must be called before any calls to HAS_PCH_* */
+ intel_detect_pch(dev);
+
intel_pm_setup(dev);
+ intel_init_dpio(dev_priv);
+ intel_power_domains_init(dev_priv);
intel_runtime_pm_get(dev_priv);
@@ -1045,9 +1050,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (ret < 0)
goto put_bridge;
- /* This must be called before any calls to HAS_PCH_* */
- intel_detect_pch(dev);
-
intel_uncore_init(dev);
ret = i915_gem_gtt_init(dev);
@@ -1124,16 +1126,12 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
intel_device_info_runtime_init(dev);
- intel_init_dpio(dev_priv);
-
if (INTEL_INFO(dev)->num_pipes) {
ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes);
if (ret)
goto out_gem_unload;
}
- intel_power_domains_init(dev_priv);
-
ret = i915_load_modeset_init(dev);
if (ret < 0) {
DRM_ERROR("failed to init modeset\n");