Skip to content

Commit

Permalink
drm/i915/gvt: correct the emulation in TLB control handler
Browse files Browse the repository at this point in the history
Need a explicit write_vreg in TLB MMIO write handler, beside that
TLB vreg should update correspondingly following HW status to do
correct emulation.

Signed-off-by: Ping Gao <ping.a.gao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
  • Loading branch information
Ping Gao authored and Zhenyu Wang committed Nov 7, 2016
1 parent 5f399f1 commit f24940e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gvt/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,8 @@ static int gvt_reg_tlb_control_handler(struct intel_vgpu *vgpu,
int rc = 0;
unsigned int id = 0;

write_vreg(vgpu, offset, p_data, bytes);

switch (offset) {
case 0x4260:
id = RCS;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gvt/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ static void handle_tlb_pending_event(struct intel_vgpu *vgpu, int ring_id)

if (wait_for_atomic((I915_READ_FW(reg) == 0), 50))
gvt_err("timeout in invalidate ring (%d) tlb\n", ring_id);
else
vgpu_vreg(vgpu, regs[ring_id]) = 0;

intel_uncore_forcewake_put(dev_priv, fw);

Expand Down

0 comments on commit f24940e

Please sign in to comment.