]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: add intel_uncore_init_early
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Tue, 2 Apr 2019 20:10:31 +0000 (13:10 -0700)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Apr 2019 09:04:44 +0000 (10:04 +0100)
Encapsulate the uncore early init and be consistent with the
"_early" naming.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190402201032.15841-1-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h

index 0ca57dc5da5c209b004b6156eee53fa7701bdd2f..5bfacf353fa40e0e3160a518db9d18381836a245 100644 (file)
@@ -870,10 +870,11 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv)
 
        intel_device_info_subplatform_init(dev_priv);
 
+       intel_uncore_init_early(&dev_priv->uncore);
+
        spin_lock_init(&dev_priv->irq_lock);
        spin_lock_init(&dev_priv->gpu_error.lock);
        mutex_init(&dev_priv->backlight_lock);
-       spin_lock_init(&dev_priv->uncore.lock);
 
        mutex_init(&dev_priv->sb_lock);
        mutex_init(&dev_priv->av_mutex);
index 106df24f20a501f838502df9172eb4dbd8492925..3ccda8b7b783a5fc4e42c655108255b4e9ac96ef 100644 (file)
@@ -1524,6 +1524,10 @@ static void uncore_mmio_cleanup(struct intel_uncore *uncore)
        pci_iounmap(pdev, uncore->regs);
 }
 
+void intel_uncore_init_early(struct intel_uncore *uncore)
+{
+       spin_lock_init(&uncore->lock);
+}
 
 int intel_uncore_init(struct intel_uncore *uncore)
 {
index 896585a1c2dd6ac7f9ed8df1de243ef58c0b5294..78de1af59334d3a1959a16f60cf6bca2e0ab33ce 100644 (file)
@@ -178,6 +178,7 @@ intel_uncore_has_fifo(const struct intel_uncore *uncore)
 }
 
 void intel_uncore_sanitize(struct drm_i915_private *dev_priv);
+void intel_uncore_init_early(struct intel_uncore *uncore);
 int intel_uncore_init(struct intel_uncore *uncore);
 void intel_uncore_prune(struct intel_uncore *uncore);
 bool intel_uncore_unclaimed_mmio(struct intel_uncore *uncore);