[Intel-gfx] [PATCH] drm/i915/execlists: Disable preemption under GVT
Zhenyu Wang
zhenyuw at linux.intel.com
Mon Jun 24 09:02:31 UTC 2019
On 2019.06.21 20:13:13 +0100, Chris Wilson wrote:
> Preempt-to-busy uses a GPU semaphore to enforce an idle-barrier across
> preemption, but mediated gvt does not fully support semaphores.
>
Current looks semaphore is still used from emit_fini_breadcrumb which
caused gvt error, gvt may support memory based semaphore but not for
reg based.
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index c8a0c9b32764..d8649e759ce8 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -294,6 +294,9 @@ static inline bool need_preempt(const struct intel_engine_cs *engine,
> {
> int last_prio;
>
> + if (!intel_engine_has_preemption(engine))
> + return false;
> +
> /*
> * Check if the current priority hint merits a preemption attempt.
> *
> @@ -890,6 +893,9 @@ need_timeslice(struct intel_engine_cs *engine, const struct i915_request *rq)
> {
> int hint;
>
> + if (!intel_engine_has_preemption(engine))
> + return false;
> +
> if (list_is_last(&rq->sched.link, &engine->active.requests))
> return false;
>
> @@ -2672,10 +2678,11 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
> engine->unpark = NULL;
>
> engine->flags |= I915_ENGINE_SUPPORTS_STATS;
> - if (!intel_vgpu_active(engine->i915))
> + if (!intel_vgpu_active(engine->i915)) {
> engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
> - if (HAS_LOGICAL_RING_PREEMPTION(engine->i915))
> - engine->flags |= I915_ENGINE_HAS_PREEMPTION;
> + if (HAS_LOGICAL_RING_PREEMPTION(engine->i915))
> + engine->flags |= I915_ENGINE_HAS_PREEMPTION;
> + }
> }
>
> static void execlists_destroy(struct intel_engine_cs *engine)
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190624/aa3d29af/attachment.sig>
More information about the Intel-gfx
mailing list