summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/mmio.h
diff options
context:
space:
mode:
authorHang Yuan <hang.yuan@linux.intel.com>2018-07-03 12:31:17 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2018-07-05 10:33:37 +0300
commit6cef21a1964933b77c855c55bac2723053cc676d (patch)
treebdf2e1fe62316d01c8fb44d1bae88e0b87cdb583 /drivers/gpu/drm/i915/gvt/mmio.h
parenta4cae23cc05ccec749c2fc70fa9d8cda7c582319 (diff)
downloadlinux-6cef21a1964933b77c855c55bac2723053cc676d.tar.xz
drm/i915/gvt: update vreg on inhibit context lri command
Commit cd7e 61b9"init mmio by lri command in vgpu inhibit context" initializes registers saved/restored in context with its vreg value through lri command in ring buffer. It relies on vreg got updated on every guest access. There is a case found that Linux guest uses lri command in inhibit-ctx to update the register. This patch adds vreg update on this case. v2: move mmio_attribute functions to gvt.h (Zhenyu) v3: use mask_mmio_write in vreg update v4: refine codes and add more comments (Zhenyu) Fixes: cd7e61b9("drm/i915/gvt: init mmio by lri command in vgpu inhibit context") Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com> Signed-off-by: Weinan Li <weinan.z.li@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/mmio.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/mmio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/mmio.h b/drivers/gpu/drm/i915/gvt/mmio.h
index 71b620875943..dac8c6401e26 100644
--- a/drivers/gpu/drm/i915/gvt/mmio.h
+++ b/drivers/gpu/drm/i915/gvt/mmio.h
@@ -98,4 +98,6 @@ bool intel_gvt_in_force_nonpriv_whitelist(struct intel_gvt *gvt,
int intel_vgpu_mmio_reg_rw(struct intel_vgpu *vgpu, unsigned int offset,
void *pdata, unsigned int bytes, bool is_read);
+int intel_vgpu_mask_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
+ void *p_data, unsigned int bytes);
#endif