summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/execlist.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2016-10-20 08:30:33 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-20 12:31:35 +0300
commit0fac21e7e978f8556d3f9bb1b2fadfc722bfe992 (patch)
tree520034ed58fa687bbf3588d4f4786b8318e0b7f4 /drivers/gpu/drm/i915/gvt/execlist.c
parent3eec872207cc8230bc98cffa8895173e4effacb2 (diff)
downloadlinux-0fac21e7e978f8556d3f9bb1b2fadfc722bfe992.tar.xz
drm/i915/gvt: properly access enabled intel_engine_cs
Switch to use new for_each_engine() helper to properly access enabled intel_engine_cs as i915 core has changed that to be dynamic managed. At GVT-g init time would still depend on ring mask to determine engine list as it's earlier. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/execlist.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/execlist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
index d4bd29306d84..0e9b340897e3 100644
--- a/drivers/gpu/drm/i915/gvt/execlist.c
+++ b/drivers/gpu/drm/i915/gvt/execlist.c
@@ -817,10 +817,11 @@ void intel_vgpu_clean_execlist(struct intel_vgpu *vgpu)
int intel_vgpu_init_execlist(struct intel_vgpu *vgpu)
{
- int i;
+ enum intel_engine_id i;
+ struct intel_engine_cs *engine;
/* each ring has a virtual execlist engine */
- for (i = 0; i < I915_NUM_ENGINES; i++) {
+ for_each_engine(engine, vgpu->gvt->dev_priv, i) {
init_vgpu_execlist(vgpu, i);
INIT_LIST_HEAD(&vgpu->workload_q_head[i]);
}