Patch "drm/i915: Fix compute pre-emption w/a to apply to compute engines" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/i915: Fix compute pre-emption w/a to apply to compute engines

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-fix-compute-pre-emption-w-a-to-apply-to-com.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1b72d32e13c79187ddcb72504c9bc4d11a436df1
Author: John Harrison <John.C.Harrison@xxxxxxxxx>
Date:   Thu Oct 6 14:38:11 2022 -0700

    drm/i915: Fix compute pre-emption w/a to apply to compute engines
    
    [ Upstream commit c3bd49cd9a1043b963331e7fd874b380bed3f2bd ]
    
    An earlier patch added support for compute engines. However, it missed
    enabling the anti-pre-emption w/a for the new engine class. So move
    the 'compute capable' flag earlier and use it for the pre-emption w/a
    test.
    
    Fixes: c674c5b9342e ("drm/i915/xehp: CCS should use RCS setup functions")
    Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
    Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
    Cc: Aravind Iddamsetty <aravind.iddamsetty@xxxxxxxxx>
    Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
    Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
    Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
    Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Cc: John Harrison <John.C.Harrison@xxxxxxxxx>
    Cc: Jason Ekstrand <jason@xxxxxxxxxxxxxx>
    Cc: "Michał Winiarski" <michal.winiarski@xxxxxxxxx>
    Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
    Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
    Cc: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@xxxxxxxxx>
    Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@xxxxxxxxx>
    Cc: "Thomas Hellström" <thomas.hellstrom@xxxxxxxxxxxxxxx>
    Cc: Stuart Summers <stuart.summers@xxxxxxxxx>
    Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
    Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
    Cc: Ramalingam C <ramalingam.c@xxxxxxxxx>
    Cc: Akeem G Abodunrin <akeem.g.abodunrin@xxxxxxxxx>
    Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>
    Reviewed-by: Matt Roper <matthew.d.roper@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-3-John.C.Harrison@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index d6cc90ae70c9..83bfeb872bda 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -486,6 +486,17 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id,
 	engine->logical_mask = BIT(logical_instance);
 	__sprint_engine_name(engine);
 
+	if ((engine->class == COMPUTE_CLASS && !RCS_MASK(engine->gt) &&
+	     __ffs(CCS_MASK(engine->gt)) == engine->instance) ||
+	     engine->class == RENDER_CLASS)
+		engine->flags |= I915_ENGINE_FIRST_RENDER_COMPUTE;
+
+	/* 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;
+	}
+
 	engine->props.heartbeat_interval_ms =
 		CONFIG_DRM_I915_HEARTBEAT_INTERVAL;
 	engine->props.max_busywait_duration_ns =
@@ -498,20 +509,9 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id,
 		CONFIG_DRM_I915_TIMESLICE_DURATION;
 
 	/* Override to uninterruptible for OpenCL workloads. */
-	if (GRAPHICS_VER(i915) == 12 && engine->class == RENDER_CLASS)
+	if (GRAPHICS_VER(i915) == 12 && (engine->flags & I915_ENGINE_HAS_RCS_REG_STATE))
 		engine->props.preempt_timeout_ms = 0;
 
-	if ((engine->class == COMPUTE_CLASS && !RCS_MASK(engine->gt) &&
-	     __ffs(CCS_MASK(engine->gt)) == engine->instance) ||
-	     engine->class == RENDER_CLASS)
-		engine->flags |= I915_ENGINE_FIRST_RENDER_COMPUTE;
-
-	/* 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;
-	}
-
 	/* Cap properties according to any system limits */
 #define CLAMP_PROP(field) \
 	do { \



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux