summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gtt.c
diff options
context:
space:
mode:
authorZhi Wang <zhi.a.wang@intel.com>2017-10-10 17:24:26 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-11-16 11:48:24 +0800
commit655c64efe36f199bea16f9ba7388c479d5feed5f (patch)
treee0f527edf4401cce948baf251ef1c4382ddce886 /drivers/gpu/drm/i915/gvt/gtt.c
parent054f4eba2a2985b1db43353b7b5ce90e96cf9bb9 (diff)
downloadlwn-655c64efe36f199bea16f9ba7388c479d5feed5f.tar.gz
lwn-655c64efe36f199bea16f9ba7388c479d5feed5f.zip
drm/i915/gvt: Introduce ops->set_present()
We need ops->set_present() during generating a new scratch page table entry. Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gtt.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/gtt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 74be5e628310..3d6008b116e5 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -397,6 +397,11 @@ static void gtt_entry_clear_present(struct intel_gvt_gtt_entry *e)
e->val64 &= ~BIT(0);
}
+static void gtt_entry_set_present(struct intel_gvt_gtt_entry *e)
+{
+ e->val64 |= BIT(0);
+}
+
/*
* Per-platform GMA routines.
*/
@@ -426,6 +431,7 @@ static struct intel_gvt_gtt_pte_ops gen8_gtt_pte_ops = {
.get_entry = gtt_get_entry64,
.set_entry = gtt_set_entry64,
.clear_present = gtt_entry_clear_present,
+ .set_present = gtt_entry_set_present,
.test_present = gen8_gtt_test_present,
.test_pse = gen8_gtt_test_pse,
.get_pfn = gen8_gtt_get_pfn,