diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-09 19:25:17 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-09 20:18:30 +0100 |
commit | 48ae397b6b935c6733f15476c338df27eac9293c (patch) | |
tree | f6e892b3dd01392dbf819fa4f3a4c9d4dabe3b0e /drivers/gpu/drm/i915/gvt | |
parent | 4c60b1aaa255207eea2892d2d55b718db90d1ad8 (diff) | |
download | linux-48ae397b6b935c6733f15476c338df27eac9293c.tar.bz2 |
drm/i915: Push the ring creation flags to the backend
Push the ring creation flags from the outer GEM context to the inner
intel_context to avoid an unsightly back-reference from inside the
backend.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190809182518.20486-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gvt')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/scheduler.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index 4cb3c71327fe..dfb64a6ec838 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -1227,8 +1227,6 @@ int intel_vgpu_setup_submission(struct intel_vgpu *vgpu) } i915_gem_context_set_force_single_submission(ctx); - if (!USES_GUC_SUBMISSION(i915)) - ctx->ring_size = 512 * PAGE_SIZE; /* Max ring buffer size */ i915_context_ppgtt_root_save(s, i915_vm_to_ppgtt(ctx->vm)); @@ -1244,6 +1242,12 @@ int intel_vgpu_setup_submission(struct intel_vgpu *vgpu) goto out_shadow_ctx; } + if (!USES_GUC_SUBMISSION(i915)) { /* Max ring buffer size */ + const unsigned int ring_size = 512 * SZ_4K; + + ce->ring = __intel_context_ring_size(ring_size); + } + ret = intel_context_pin(ce); intel_context_put(ce); if (ret) |