blob: 82f12029acd961430d4f5f993ec1b7121c60a9f8 [file] [log] [blame]
From f8c90237dd96b86d6bdba3de6496993241a6501c Mon Sep 17 00:00:00 2001
From: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Fri, 4 Oct 2013 21:22:49 -0700
Subject: drm/i915: Prevent using uninitialized MMIO funcs
For upcoming patches which will have GEN specific MMIO functions, we'll
need to initialize the uncore data structure earlier than we do today.
If we do not do this, the following will be problematic:
intel_uncore_sanitize
intel_disable_gt_powersave
gen6_disable_rps
I915_WRITE(GEN6_RC_CONTROL, 0); <--- MMIO
intel_uncore_init // initializes MMIO
By initializing the function pointers first, we should be safe.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 78511f2a6fc6960c8917d9655fffb687822a0225)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/i915_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1622,8 +1622,8 @@ int i915_driver_load(struct drm_device *
intel_irq_init(dev);
intel_pm_init(dev);
- intel_uncore_sanitize(dev);
intel_uncore_init(dev);
+ intel_uncore_sanitize(dev);
/* Try to make sure MCHBAR is enabled before poking at it */
intel_setup_mchbar(dev);