[Intel-gfx] [PATCH 8/8] drm/i915/xehp: Extend uninterruptible OpenCL workloads to CCS
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Sep 8 14:15:06 UTC 2021
On 07/09/2021 18:19, Matt Roper wrote:
> From: John Harrison <John.C.Harrison at Intel.com>
>
> Now that OpenCL workloads can run on the compute engine, we need to set
> preempt_timeout_ms = 0 on the CCS engines too.
>
> Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index 2f719f0ecac3..7e6ac0ae1f07 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -377,16 +377,17 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id)
> engine->props.timeslice_duration_ms =
> CONFIG_DRM_I915_TIMESLICE_DURATION;
>
> - /* Override to uninterruptible for OpenCL workloads. */
> - if (GRAPHICS_VER(i915) == 12 && engine->class == RENDER_CLASS)
> - engine->props.preempt_timeout_ms = 0;
> -
> /* features common between engines sharing EUs */
> if (engine->class == RENDER_CLASS || engine->class == COMPUTE_CLASS) {
> engine->flags |= I915_ENGINE_HAS_RCS_REG_STATE;
> engine->flags |= I915_ENGINE_HAS_EU_PRIORITY;
> }
>
> + /* Override to uninterruptible for OpenCL workloads. */
> + if (GRAPHICS_VER(i915) == 12 &&
> + engine->flags & I915_ENGINE_HAS_RCS_REG_STATE)
> + engine->props.preempt_timeout_ms = 0;
> +
> engine->defaults = engine->props; /* never to change again */
>
> engine->context_size = intel_engine_context_size(gt, engine->class);
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the dri-devel
mailing list