summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2016-10-21 09:59:10 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-24 10:43:47 +0800
commitd1bbef6d15357bab359177b093c0015dc61aab7c (patch)
treee810e57234466dd080b682db4d209b638dcbcddc
parent19e6393fb5366a89705a62b3276ce42e990d12ce (diff)
drm/i915/gvt: Fix failure when ACPI is not enabled
Directly use memremap instead of acpi function for opregion mapping. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
-rw-r--r--drivers/gpu/drm/i915/gvt/opregion.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index 973c8a9d0b15..95218913b0bc 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -163,7 +163,7 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu, u32 gpa)
*/
void intel_gvt_clean_opregion(struct intel_gvt *gvt)
{
- iounmap(gvt->opregion.opregion_va);
+ memunmap(gvt->opregion.opregion_va);
gvt->opregion.opregion_va = NULL;
}
@@ -181,8 +181,8 @@ int intel_gvt_init_opregion(struct intel_gvt *gvt)
pci_read_config_dword(gvt->dev_priv->drm.pdev, INTEL_GVT_PCI_OPREGION,
&gvt->opregion.opregion_pa);
- gvt->opregion.opregion_va = acpi_os_ioremap(gvt->opregion.opregion_pa,
- INTEL_GVT_OPREGION_SIZE);
+ gvt->opregion.opregion_va = memremap(gvt->opregion.opregion_pa,
+ INTEL_GVT_OPREGION_SIZE, MEMREMAP_WB);
if (!gvt->opregion.opregion_va) {
gvt_err("fail to map host opregion\n");
return -EFAULT;