clear-pkgs-linux-iot-lts2018/1127-i915-gvt-obtain-power-...

44 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zhao Yakui <yakui.zhao@intel.com>
Date: Fri, 2 Aug 2019 11:05:31 +0800
Subject: [PATCH] i915/gvt: obtain power domain to take the snapshot of gvt
registers correctly
When the VGPU workload is submitted, it needs to check whether the some
vgpu registers are consistent with that in gvt registers. The gvt register
is captured without holding the corresponding power domain. In such case
the snapshot of some registers are incorrect and it complains the
unconformance mmio access on VGPU.
Change-Id: I773b8de2734c293e387546923fa929b553d57b2e
Tracked-On: projectacrn/acrn-hypervisor#3520
Reviewed-by: He Min <min.he@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
drivers/gpu/drm/i915/gvt/mmio_context.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
index 4e99cd0e4fbe..a69263163e34 100644
--- a/drivers/gpu/drm/i915/gvt/mmio_context.c
+++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
@@ -619,6 +619,7 @@ static void get_host_mmio_snapshot(struct intel_gvt *gvt)
mmio_list = gvt->engine_mmio_list.mmio;
if (!gvt->mmio.host_cache_initialized) {
+ intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
/* Snapshot all the non-context MMIOs */
for (mmio = mmio_list; i915_mmio_reg_valid(mmio->reg); mmio++) {
if (mmio->in_context)
@@ -630,6 +631,7 @@ static void get_host_mmio_snapshot(struct intel_gvt *gvt)
gvt_host_reg(gvt, mmio->reg.reg) &= mmio->mask;
}
gvt->mmio.host_cache_initialized = true;
+ intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
}
}
--
https://clearlinux.org