diff options
author | Zhi Wang <zhi.a.wang@intel.com> | 2017-09-10 20:28:09 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2017-11-16 11:46:08 +0800 |
commit | 9a9829e9eb8bc4b4e870ce15a8904a32991608d5 (patch) | |
tree | 74e99c4f64a800c3619e9fad410f64087aab2910 /drivers/gpu/drm/i915/gvt/execlist.c | |
parent | 874b6a910e6cc094629bd2634d14061cf5eb7690 (diff) | |
download | linux-9a9829e9eb8bc4b4e870ce15a8904a32991608d5.tar.bz2 |
drm/i915/gvt: Move workload cache init/clean into intel_vgpu_{setup, clean}_submission()
Move vGPU workload cache initialization/de-initialization into
intel_vgpu_{setup, clean}_submission() since they are not specific to
execlist stuffs.
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/execlist.c')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/execlist.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c index 9f0207205117..0ee40a5ee192 100644 --- a/drivers/gpu/drm/i915/gvt/execlist.c +++ b/drivers/gpu/drm/i915/gvt/execlist.c @@ -856,14 +856,12 @@ void intel_vgpu_clean_execlist(struct intel_vgpu *vgpu) struct intel_engine_cs *engine; clean_workloads(vgpu, ALL_ENGINES); - kmem_cache_destroy(vgpu->workloads); for_each_engine(engine, vgpu->gvt->dev_priv, i) { kfree(vgpu->reserve_ring_buffer_va[i]); vgpu->reserve_ring_buffer_va[i] = NULL; vgpu->reserve_ring_buffer_size[i] = 0; } - } #define RESERVE_RING_BUFFER_SIZE ((1 * PAGE_SIZE)/8) @@ -872,19 +870,8 @@ int intel_vgpu_init_execlist(struct intel_vgpu *vgpu) enum intel_engine_id i; struct intel_engine_cs *engine; - /* each ring has a virtual execlist engine */ - for_each_engine(engine, vgpu->gvt->dev_priv, i) { + for_each_engine(engine, vgpu->gvt->dev_priv, i) init_vgpu_execlist(vgpu, i); - INIT_LIST_HEAD(&vgpu->workload_q_head[i]); - } - - vgpu->workloads = kmem_cache_create("gvt-g_vgpu_workload", - sizeof(struct intel_vgpu_workload), 0, - SLAB_HWCACHE_ALIGN, - NULL); - - if (!vgpu->workloads) - return -ENOMEM; /* each ring has a shadow ring buffer until vgpu destroyed */ for_each_engine(engine, vgpu->gvt->dev_priv, i) { |