Commit d18ac1a7 authored by Chris Wilson's avatar Chris Wilson Committed by Zhenyu Wang

drm/i915/gvt: Purge dev_priv->gt

Use the right intel_gt stored as a backpointer in intel_vgpu.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210129004933.29755-2-chris@chris-wilson.co.ukReviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 97ea6565
...@@ -522,12 +522,11 @@ static void init_vgpu_execlist(struct intel_vgpu *vgpu, ...@@ -522,12 +522,11 @@ static void init_vgpu_execlist(struct intel_vgpu *vgpu,
static void clean_execlist(struct intel_vgpu *vgpu, static void clean_execlist(struct intel_vgpu *vgpu,
intel_engine_mask_t engine_mask) intel_engine_mask_t engine_mask)
{ {
struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
struct intel_engine_cs *engine;
struct intel_vgpu_submission *s = &vgpu->submission; struct intel_vgpu_submission *s = &vgpu->submission;
struct intel_engine_cs *engine;
intel_engine_mask_t tmp; intel_engine_mask_t tmp;
for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp) { for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp) {
kfree(s->ring_scan_buffer[engine->id]); kfree(s->ring_scan_buffer[engine->id]);
s->ring_scan_buffer[engine->id] = NULL; s->ring_scan_buffer[engine->id] = NULL;
s->ring_scan_buffer_size[engine->id] = 0; s->ring_scan_buffer_size[engine->id] = 0;
...@@ -537,11 +536,10 @@ static void clean_execlist(struct intel_vgpu *vgpu, ...@@ -537,11 +536,10 @@ static void clean_execlist(struct intel_vgpu *vgpu,
static void reset_execlist(struct intel_vgpu *vgpu, static void reset_execlist(struct intel_vgpu *vgpu,
intel_engine_mask_t engine_mask) intel_engine_mask_t engine_mask)
{ {
struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
intel_engine_mask_t tmp; intel_engine_mask_t tmp;
for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp) for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp)
init_vgpu_execlist(vgpu, engine); init_vgpu_execlist(vgpu, engine);
} }
......
...@@ -1015,13 +1015,12 @@ void intel_vgpu_clean_workloads(struct intel_vgpu *vgpu, ...@@ -1015,13 +1015,12 @@ void intel_vgpu_clean_workloads(struct intel_vgpu *vgpu,
intel_engine_mask_t engine_mask) intel_engine_mask_t engine_mask)
{ {
struct intel_vgpu_submission *s = &vgpu->submission; struct intel_vgpu_submission *s = &vgpu->submission;
struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
struct intel_vgpu_workload *pos, *n; struct intel_vgpu_workload *pos, *n;
intel_engine_mask_t tmp; intel_engine_mask_t tmp;
/* free the unsubmited workloads in the queues. */ /* free the unsubmited workloads in the queues. */
for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp) { for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp) {
list_for_each_entry_safe(pos, n, list_for_each_entry_safe(pos, n,
&s->workload_q_head[engine->id], list) { &s->workload_q_head[engine->id], list) {
list_del_init(&pos->list); list_del_init(&pos->list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment