diff options
author | Zhi Wang <zhi.a.wang@intel.com> | 2017-09-10 21:46:06 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2017-11-16 11:46:50 +0800 |
commit | 8cf80a2e4b313d1aba7d10ce6ebfbb44a119c66c (patch) | |
tree | b64b6477a32a7af1057a7d40d6089f3231d1f616 /drivers/gpu/drm/i915/gvt/execlist.c | |
parent | bf4097ea5762bd90d836df9904594eb4822fefa7 (diff) | |
download | linux-8cf80a2e4b313d1aba7d10ce6ebfbb44a119c66c.tar.bz2 |
drm/i915/gvt: Rename reserved ring buffer
"reserved" means reserve something from somewhere. Actually they are
buffers used by command scanner. Rename it to ring_scan_buffer.
v2:
- Remove the usage of an extra variable. (Zhenyu)
Fixes: 0a53bc07f044 ("drm/i915/gvt: Separate cmd scan from request allocation")
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 | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c index f118454d2eab..5e4f35f9e290 100644 --- a/drivers/gpu/drm/i915/gvt/execlist.c +++ b/drivers/gpu/drm/i915/gvt/execlist.c @@ -864,9 +864,9 @@ void intel_vgpu_clean_execlist(struct intel_vgpu *vgpu) clean_workloads(vgpu, ALL_ENGINES); 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; + kfree(vgpu->ring_scan_buffer[i]); + vgpu->ring_scan_buffer[i] = NULL; + vgpu->ring_scan_buffer_size[i] = 0; } } @@ -881,21 +881,21 @@ int intel_vgpu_init_execlist(struct intel_vgpu *vgpu) /* each ring has a shadow ring buffer until vgpu destroyed */ for_each_engine(engine, vgpu->gvt->dev_priv, i) { - vgpu->reserve_ring_buffer_va[i] = + vgpu->ring_scan_buffer[i] = kmalloc(RESERVE_RING_BUFFER_SIZE, GFP_KERNEL); - if (!vgpu->reserve_ring_buffer_va[i]) { - gvt_vgpu_err("fail to alloc reserve ring buffer\n"); + if (!vgpu->ring_scan_buffer[i]) { + gvt_vgpu_err("fail to alloc ring scan buffer\n"); goto out; } - vgpu->reserve_ring_buffer_size[i] = RESERVE_RING_BUFFER_SIZE; + vgpu->ring_scan_buffer_size[i] = RESERVE_RING_BUFFER_SIZE; } return 0; out: for_each_engine(engine, vgpu->gvt->dev_priv, i) { - if (vgpu->reserve_ring_buffer_size[i]) { - kfree(vgpu->reserve_ring_buffer_va[i]); - vgpu->reserve_ring_buffer_va[i] = NULL; - vgpu->reserve_ring_buffer_size[i] = 0; + if (vgpu->ring_scan_buffer_size[i]) { + kfree(vgpu->ring_scan_buffer[i]); + vgpu->ring_scan_buffer[i] = NULL; + vgpu->ring_scan_buffer_size[i] = 0; } } return -ENOMEM; |