mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-07-22 15:58 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-07-22 15:58 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Matthew Brost

[-- Attachment #1: Type: text/plain, Size: 2051 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_sriov_vf_ccs.c

between commit:

  56441f9e08ad6 ("drm/xe/vf: Fix VF CCS attach/detach race with in-flight BO moves")

from the origin tree and commit:

  d45ad0aa7a1eb ("drm/xe/vf: Fix VF CCS attach/detach race with in-flight BO moves")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
index 6787564629c65,a8c831fbee3b5..0000000000000
--- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
@@@ -3,6 -3,8 +3,8 @@@
   * Copyright © 2025 Intel Corporation
   */
  
+ #include <drm/drm_drv.h>
+ 
  #include "instructions/xe_mi_commands.h"
  #include "instructions/xe_gpu_commands.h"
  #include "xe_bb.h"
@@@ -446,7 -448,7 +448,7 @@@ err_unwind
  	 */
  	for_each_ccs_rw_ctx(ctx_id) {
  		if (bo->bb_ccs[ctx_id])
- 			xe_migrate_ccs_rw_copy_clear(bo, ctx_id);
+ 			xe_migrate_ccs_rw_copy_clear(bo, ctx_id, true);
  	}
  	return err;
  }
@@@ -466,19 -468,27 +468,27 @@@ int xe_sriov_vf_ccs_detach_bo(struct xe
  	struct xe_device *xe = xe_bo_device(bo);
  	enum xe_sriov_vf_ccs_rw_ctxs ctx_id;
  	struct xe_mem_pool_node *bb;
+ 	bool bound;
+ 	int idx;
  
  	xe_assert(xe, IS_VF_CCS_READY(xe));
  
  	if (!xe_bo_has_valid_ccs_bb(bo))
  		return 0;
  
+ 	bound = drm_dev_enter(&xe->drm, &idx);
+ 
  	for_each_ccs_rw_ctx(ctx_id) {
  		bb = bo->bb_ccs[ctx_id];
  		if (!bb)
  			continue;
  
- 		xe_migrate_ccs_rw_copy_clear(bo, ctx_id);
+ 		xe_migrate_ccs_rw_copy_clear(bo, ctx_id, bound);
  	}
+ 
+ 	if (bound)
+ 		drm_dev_exit(idx);
+ 
  	return 0;
  }
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-07-20 14:44 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-07-20 14:44 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Arvind Yadav, Linux Kernel Mailing List, Linux Next Mailing List,
	Niranjana Vishwanathapura, Tejas Upadhyay

[-- Attachment #1: Type: text/plain, Size: 17767 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_guc_submit.c

between commit:

  9b7e60184f4b2 ("drm/xe/guc: Hold device ref until queue teardown completes")

from the origin tree and commits:

  da1124abac689 ("drm/xe/guc: Hold device ref until queue teardown completes")
  5d5a729cc9780 ("drm/xe/multi_queue: preempt primary on queue group suspend")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/xe/xe_guc_submit.c
index 3188cd1658fe4,8aaed4fd13ea3..0000000000000
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@@ -961,6 -961,27 +961,27 @@@ static void __register_exec_queue(struc
  	xe_guc_ct_send(&guc->ct, action, ARRAY_SIZE(action), 0, 0);
  }
  
+ static u32 xe_hwe_guc_logical_to_submit_mask(struct xe_hw_engine *hwe, u32 logical_mask)
+ {
+ 	struct xe_gt *gt = hwe->gt;
+ 
+ 	if (xe_gt_is_usm_hwe(gt, hwe)) {
+ 		int shift = gt->usm.paging_hwe0->logical_instance;
+ 		u32 paging_logical_mask = gt->usm.paging_logical_mask;
+ 
+ 		xe_gt_assert(gt, (logical_mask & paging_logical_mask) == logical_mask);
+ 
+ 		/*
+ 		 * Remap to GUC_PAGING_CLASS logical instance mask, if
+ 		 * applicable.
+ 		 */
+ 		if (xe_guc_has_paging_engine(&hwe->gt->uc.guc))
+ 			return logical_mask >> shift;
+ 	}
+ 
+ 	return logical_mask;
+ }
+ 
  static void register_exec_queue(struct xe_exec_queue *q, int ctx_type)
  {
  	struct xe_guc *guc = exec_queue_to_guc(q);
@@@ -973,8 -994,9 +994,9 @@@
  
  	memset(&info, 0, sizeof(info));
  	info.context_idx = q->guc->id;
- 	info.engine_class = xe_engine_class_to_guc_class(q->class);
- 	info.engine_submit_mask = q->logical_mask;
+ 	info.engine_class = xe_hwe_to_guc_class(q->hwe);
+ 	info.engine_submit_mask =
+ 		xe_hwe_guc_logical_to_submit_mask(q->hwe, q->logical_mask);
  	info.hwlrca_lo = lower_32_bits(xe_lrc_descriptor(lrc));
  	info.hwlrca_hi = upper_32_bits(xe_lrc_descriptor(lrc));
  	info.flags = CONTEXT_REGISTRATION_FLAG_KMD |
@@@ -1671,12 -1693,37 +1693,37 @@@ handle_vf_resume
  	return DRM_GPU_SCHED_STAT_NO_HANG;
  }
  
+ static void guc_exec_queue_multi_queue_drop_suspend(struct xe_exec_queue *q);
+ static int guc_exec_queue_suspend_wait_blocking(struct xe_exec_queue *q);
+ 
  static void guc_exec_queue_fini(struct xe_exec_queue *q)
  {
  	struct xe_guc_exec_queue *ge = q->guc;
  	struct xe_guc *guc = exec_queue_to_guc(q);
  	struct drm_device *drm = &guc_to_xe(guc)->drm;
  
+ 	/*
+ 	 * A secondary can leave the group while still preempt suspended (e.g.
+ 	 * xe_vm_remove_compute_exec_queue() forces its preempt fence to signal,
+ 	 * which suspends it). It holds one forwarded suspend reference on the
+ 	 * primary, so drop it and resume the primary if it was the last member
+ 	 * that had it suspended. Primaries forward to nobody, so they don't need
+ 	 * this.
+ 	 *
+ 	 * First make sure the primary's forwarded suspend has completed. If the
+ 	 * secondary was killed/reset before its preempt fence worker ran, that
+ 	 * worker skips suspend_wait() (see preempt_fence_work_func()), leaving
+ 	 * the primary's suspend possibly in flight. drop_suspend() runs under a
+ 	 * spinlock and cannot wait, so drain it here with the uninterruptible
+ 	 * blocking wait; otherwise resuming the primary in drop_suspend() could
+ 	 * trip the !suspend_pending assert.
+ 	 */
+ 	if (xe_exec_queue_is_multi_queue_secondary(q)) {
+ 		if (READ_ONCE(q->guc->suspend_count))
+ 			guc_exec_queue_suspend_wait_blocking(q);
+ 		guc_exec_queue_multi_queue_drop_suspend(q);
+ 	}
+ 
  	if (xe_exec_queue_is_multi_queue_secondary(q)) {
  		struct xe_exec_queue_group *group = q->multi_queue.group;
  
@@@ -2176,23 -2223,147 +2223,147 @@@ static int guc_exec_queue_set_multi_que
  	return 0;
  }
  
+ /*
+  * Core suspend: take a suspend reference on @q and, on the first reference,
+  * disable its GuC context so the GPU is actually preempted. Caller must have
+  * ensured @q is not killed/banned/wedged. Returns true if this was the first
+  * suspend reference (the 0->1 transition).
+  */
+ static bool __guc_exec_queue_suspend(struct xe_exec_queue *q)
+ {
+ 	struct xe_guc_exec_queue *ge = q->guc;
+ 	struct xe_gpu_scheduler *sched = &ge->sched;
+ 	struct xe_sched_msg *msg = ge->static_msgs + STATIC_MSG_SUSPEND;
+ 	bool first;
+ 
+ 	xe_sched_msg_lock(sched);
+ 	first = (++ge->suspend_count == 1);
+ 	if (first) {
+ 		bool added = guc_exec_queue_try_add_msg(q, msg, SUSPEND);
+ 
+ 		/* slot must be free at 0->1 */
+ 		xe_gt_assert(guc_to_gt(exec_queue_to_guc(q)), added);
+ 		ge->suspend_pending = true;
+ 	}
+ 	xe_sched_msg_unlock(sched);
+ 
+ 	return first;
+ }
+ 
+ /*
+  * Core resume: drop a suspend reference on @q and, on the last reference,
+  * re-enable its GuC context. Returns true if this dropped the last suspend
+  * reference (the 1->0 transition).
+  */
+ static bool __guc_exec_queue_resume(struct xe_exec_queue *q)
+ {
+ 	struct xe_guc_exec_queue *ge = q->guc;
+ 	struct xe_gpu_scheduler *sched = &ge->sched;
+ 	struct xe_sched_msg *msg = ge->static_msgs + STATIC_MSG_RESUME;
+ 	struct xe_guc *guc = exec_queue_to_guc(q);
+ 	bool last;
+ 
+ 	xe_sched_msg_lock(sched);
+ 	xe_gt_assert(guc_to_gt(guc), !ge->suspend_pending);
+ 	xe_gt_assert(guc_to_gt(guc), ge->suspend_count > 0);
+ 	last = (--ge->suspend_count == 0);
+ 	if (last) {
+ 		bool added = guc_exec_queue_try_add_msg(q, msg, RESUME);
+ 
+ 		/* slot must be free at 1->0 */
+ 		xe_gt_assert(guc_to_gt(guc), added);
+ 	}
+ 	xe_sched_msg_unlock(sched);
+ 
+ 	return last;
+ }
+ 
  static int guc_exec_queue_suspend(struct xe_exec_queue *q)
  {
- 	struct xe_gpu_scheduler *sched = &q->guc->sched;
- 	struct xe_sched_msg *msg = q->guc->static_msgs + STATIC_MSG_SUSPEND;
- 
  	if (exec_queue_killed_or_banned_or_wedged(q))
  		return -EINVAL;
  
- 	xe_sched_msg_lock(sched);
- 	if (guc_exec_queue_try_add_msg(q, msg, SUSPEND))
- 		q->guc->suspend_pending = true;
- 	xe_sched_msg_unlock(sched);
+ 	/*
+ 	 * Non-multi-queue queues and multi-queue primaries suspend themselves
+ 	 * directly: their own msg_lock makes the suspend_count 0->1 transition
+ 	 * and the suspend_pending update atomic, so no group level serialization
+ 	 * is needed.
+ 	 */
+ 	if (!xe_exec_queue_is_multi_queue_secondary(q)) {
+ 		__guc_exec_queue_suspend(q);
+ 		return 0;
+ 	}
+ 
+ 	/*
+ 	 * A secondary's suspend is meaningless once the primary - which owns the
+ 	 * group's GuC context - is gone, so fail it too. This keeps the
+ 	 * secondary's effective state consistent with guc_exec_queue_reset_status(),
+ 	 * which already reports the primary's killed/banned/wedged state for
+ 	 * secondaries. A primary killed *after* this check is still handled at
+ 	 * message-processing time, where the SUSPEND is a no-op for a killed
+ 	 * context; this only covers an already-dead primary.
+ 	 */
+ 	if (exec_queue_killed_or_banned_or_wedged(xe_exec_queue_multi_queue_primary(q)))
+ 		return -EINVAL;
+ 
+ 	/*
+ 	 * A secondary doesn't interface with GuC: suspend it like any other
+ 	 * queue (its own suspend_count drives its internally handled scheduler
+ 	 * state) and, only on its own 0->1 transition, forward the suspend to the
+ 	 * primary so the GPU is actually preempted. Hold @suspend_lock so that
+ 	 * observing the secondary's transition and forwarding it to the primary
+ 	 * happen atomically; this keeps the primary's refcount paired with member
+ 	 * transitions even if the same secondary is suspended and resumed
+ 	 * concurrently across rebind cycles.
+ 	 */
+ 	scoped_guard(spinlock, &q->multi_queue.group->suspend_lock) {
+ 		if (__guc_exec_queue_suspend(q))
+ 			__guc_exec_queue_suspend(xe_exec_queue_multi_queue_primary(q));
+ 	}
  
  	return 0;
  }
  
- static int guc_exec_queue_suspend_wait(struct xe_exec_queue *q)
+ static void guc_exec_queue_suspend_timeout_ban(struct xe_exec_queue *q)
+ {
+ 	struct xe_guc *guc = exec_queue_to_guc(q);
+ 
+ 	xe_gt_warn(guc_to_gt(guc),
+ 		   "Suspend fence, guc_id=%d, failed to respond, banning queue",
+ 		   q->guc->id);
+ 	/*
+ 	 * The GuC failed to respond to the suspend within the timeout. This is
+ 	 * not recoverable for this context, so ban it and tear it down via
+ 	 * cleanup rather than leave it suspended forever. __suspend_fence_signal
+ 	 * clears suspend_pending and wakes any waiter.
+ 	 *
+ 	 * @q is the primary here; it owns the group's GuC context, so a failure
+ 	 * to suspend it wedges the whole group. Ban and tear down the entire
+ 	 * group in the multi-queue case.
+ 	 */
+ 	if (xe_exec_queue_is_multi_queue(q)) {
+ 		set_exec_queue_group_banned(q);
+ 		__suspend_fence_signal(q);
+ 		xe_guc_exec_queue_group_trigger_cleanup(q);
+ 	} else {
+ 		set_exec_queue_banned(q);
+ 		__suspend_fence_signal(q);
+ 		xe_guc_exec_queue_trigger_cleanup(q);
+ 	}
+ }
+ 
+ /*
+  * Wait for @q's own suspend to complete: suspend_pending cleared, or the queue
+  * killed / GuC stopped. With @blocking, wait uninterruptibly and do not handle
+  * VF recovery (for callers that must complete on behalf of a possibly
+  * cross-process queue); otherwise wait interruptibly.
+  *
+  * Returns 0 on completion or -ETIME on timeout. Interruptible waits may also
+  * return -EAGAIN (VF recovery in progress, retry) or -ERESTARTSYS (aborted by a
+  * signal; suspend_pending may still be set, so callers must not resume()
+  * without re-confirming the suspend).
+  */
+ static int guc_exec_queue_wait_suspend_done(struct xe_exec_queue *q, bool blocking)
  {
  	struct xe_guc *guc = exec_queue_to_guc(q);
  	struct xe_device *xe = guc_to_xe(guc);
@@@ -2208,44 -2379,146 +2379,146 @@@
  	 xe_guc_read_stopped(guc))
  
  retry:
- 	if (IS_SRIOV_VF(xe))
+ 	if (blocking) {
+ 		if (IS_SRIOV_VF(xe))
+ 			ret = wait_event_timeout(guc->ct.wq, WAIT_COND, HZ * 5);
+ 		else
+ 			ret = wait_event_timeout(q->guc->suspend_wait, WAIT_COND,
+ 						 HZ * 5);
+ 	} else if (IS_SRIOV_VF(xe)) {
  		ret = wait_event_interruptible_timeout(guc->ct.wq, WAIT_COND ||
- 						       vf_recovery(guc),
- 						       HZ * 5);
- 	else
+ 						       vf_recovery(guc), HZ * 5);
+ 	} else {
  		ret = wait_event_interruptible_timeout(q->guc->suspend_wait,
  						       WAIT_COND, HZ * 5);
+ 	}
  
- 	if (vf_recovery(guc) && !xe_device_wedged((guc_to_xe(guc))))
+ 	if (!blocking && vf_recovery(guc) && !xe_device_wedged(xe))
  		return -EAGAIN;
  
- 	if (!ret) {
- 		xe_gt_warn(guc_to_gt(guc),
- 			   "Suspend fence, guc_id=%d, failed to respond",
- 			   q->guc->id);
- 		/* XXX: Trigger GT reset? */
+ 	if (!ret)
  		return -ETIME;
- 	} else if (IS_SRIOV_VF(xe) && !WAIT_COND) {
+ 	else if (!blocking && IS_SRIOV_VF(xe) && !WAIT_COND)
  		/* Corner case on RESFIX DONE where vf_recovery() changes */
  		goto retry;
- 	}
  
  #undef WAIT_COND
  
  	return ret < 0 ? ret : 0;
  }
  
+ static int guc_exec_queue_suspend_wait_common(struct xe_exec_queue *q, bool blocking)
+ {
+ 	int ret;
+ 
+ 	/*
+ 	 * A secondary's suspend rides the sched-message worker (short-circuited,
+ 	 * no GuC round-trip) and so is not synchronous with
+ 	 * guc_exec_queue_suspend(): its own suspend_pending may still be set
+ 	 * here. Waiting on the primary alone is not sufficient - if the primary
+ 	 * was already suspended, the forward is a refcount-only transition that
+ 	 * queues no new primary SUSPEND and leaves the primary's suspend_pending
+ 	 * clear, so the primary wait would return immediately while the
+ 	 * secondary's suspend is still in flight, and a later resume() would trip
+ 	 * the secondary's !suspend_pending assert. So first wait for the
+ 	 * secondary's own suspend to complete, then wait on the primary.
+ 	 *
+ 	 * A timeout on either bans the queue (being multi-queue, that tears down
+ 	 * the whole group). A secondary suspend has no real GuC round-trip, so
+ 	 * its timeout is a software scheduler stall rather than a GuC fault, but
+ 	 * banning is still the safe recovery: otherwise the queue is left with
+ 	 * suspend_pending set and a subsequent resume() trips the !suspend_pending
+ 	 * assert.
+ 	 */
+ 	if (xe_exec_queue_is_multi_queue_secondary(q)) {
+ 		ret = guc_exec_queue_wait_suspend_done(q, blocking);
+ 		if (ret == -ETIME)
+ 			guc_exec_queue_suspend_timeout_ban(q);
+ 		if (ret)
+ 			return ret;
+ 	}
+ 
+ 	q = xe_exec_queue_multi_queue_primary(q);
+ 	ret = guc_exec_queue_wait_suspend_done(q, blocking);
+ 	if (ret == -ETIME)
+ 		guc_exec_queue_suspend_timeout_ban(q);
+ 
+ 	return ret;
+ }
+ 
+ static int guc_exec_queue_suspend_wait(struct xe_exec_queue *q)
+ {
+ 	return guc_exec_queue_suspend_wait_common(q, false);
+ }
+ 
+ /*
+  * Uninterruptible variant of guc_exec_queue_suspend_wait() for callers that
+  * must complete the wait on behalf of a queue possibly owned by a different
+  * process (e.g. cleanup/undo paths). An interruptible wait could return
+  * -ERESTARTSYS if the calling task is signalled, leaving that queue suspended
+  * forever (cross-process DoS). VF recovery is deliberately not handled (no
+  * -EAGAIN) since a blocking caller cannot retry.
+  */
+ static int guc_exec_queue_suspend_wait_blocking(struct xe_exec_queue *q)
+ {
+ 	return guc_exec_queue_suspend_wait_common(q, true);
+ }
+ 
  static void guc_exec_queue_resume(struct xe_exec_queue *q)
  {
- 	struct xe_gpu_scheduler *sched = &q->guc->sched;
- 	struct xe_sched_msg *msg = q->guc->static_msgs + STATIC_MSG_RESUME;
- 	struct xe_guc *guc = exec_queue_to_guc(q);
+ 	/*
+ 	 * Non-multi-queue queues and multi-queue primaries resume themselves
+ 	 * directly; their own msg_lock is sufficient.
+ 	 */
+ 	if (!xe_exec_queue_is_multi_queue_secondary(q)) {
+ 		__guc_exec_queue_resume(q);
+ 		return;
+ 	}
  
- 	xe_gt_assert(guc_to_gt(guc), !q->guc->suspend_pending);
+ 	/*
+ 	 * Mirror of guc_exec_queue_suspend(): resume the secondary like any
+ 	 * other queue and, only on its own 1->0 transition, forward the resume
+ 	 * to the primary so the primary's GuC context is re-enabled once the
+ 	 * last member that suspended it resumes. @suspend_lock keeps the
+ 	 * secondary transition and the primary forward atomic.
+ 	 */
+ 	scoped_guard(spinlock, &q->multi_queue.group->suspend_lock) {
+ 		if (__guc_exec_queue_resume(q))
+ 			__guc_exec_queue_resume(xe_exec_queue_multi_queue_primary(q));
+ 	}
+ }
  
- 	xe_sched_msg_lock(sched);
- 	guc_exec_queue_try_add_msg(q, msg, RESUME);
- 	xe_sched_msg_unlock(sched);
+ /*
+  * Drop a leaving secondary's forwarded suspend reference on the primary and
+  * resume the primary if this was the last member that had it suspended.
+  * See guc_exec_queue_fini().
+  */
+ static void guc_exec_queue_multi_queue_drop_suspend(struct xe_exec_queue *q)
+ {
+ 	scoped_guard(spinlock, &q->multi_queue.group->suspend_lock) {
+ 		struct xe_exec_queue *primary = xe_exec_queue_multi_queue_primary(q);
+ 
+ 		/*
+ 		 * A suspended secondary holds exactly one suspend reference on the
+ 		 * primary (forwarded on its 0->1 transition). If it leaves while
+ 		 * still suspended, release that reference so the primary is not
+ 		 * kept disabled forever.
+ 		 */
+ 		if (!READ_ONCE(q->guc->suspend_count))
+ 			break;
+ 
+ 		if (exec_queue_killed_or_banned_or_wedged(primary))
+ 			break;
+ 
+ 		/*
+ 		 * No suspend_wait() here (and we can't - suspend_lock is a
+ 		 * spinlock). guc_exec_queue_fini() has already drained the
+ 		 * primary's forwarded suspend with the blocking wait, so its
+ 		 * suspend has completed (suspend_pending cleared) by the time we
+ 		 * resume it here. __guc_exec_queue_resume() asserts this.
+ 		 */
+ 		__guc_exec_queue_resume(primary);
+ 	}
  }
  
  static bool guc_exec_queue_reset_status(struct xe_exec_queue *q)
@@@ -2274,6 -2547,7 +2547,7 @@@ static const struct xe_exec_queue_ops g
  	.set_multi_queue_priority = guc_exec_queue_set_multi_queue_priority,
  	.suspend = guc_exec_queue_suspend,
  	.suspend_wait = guc_exec_queue_suspend_wait,
+ 	.suspend_wait_blocking = guc_exec_queue_suspend_wait_blocking,
  	.resume = guc_exec_queue_resume,
  	.reset_status = guc_exec_queue_reset_status,
  };
@@@ -3030,6 -3304,38 +3304,38 @@@ int xe_guc_exec_queue_memory_cat_error_
  
  	/* Treat the same as engine reset */
  	xe_guc_exec_queue_reset_trigger_cleanup(q);
+ 
+ 	return 0;
+ }
+ 
+ int xe_guc_uncorrectable_error_handler(struct xe_guc *guc, u32 *msg, u32 len)
+ {
+ 	struct xe_gt *gt = guc_to_gt(guc);
+ 	struct xe_exec_queue *q;
+ 	u32 guc_id;
+ 
+ 	if (unlikely(!len || len > 1))
+ 		return -EPROTO;
+ 
+ 	guc_id = msg[0];
+ 
+ 	if (guc_id == GUC_ID_UNKNOWN) {
+ 		xe_gt_err(gt, "GuC: Uncorrectable local error with unknown GuC id\n");
+ 		return 0;
+ 	}
+ 
+ 	q = g2h_exec_queue_lookup(guc, guc_id);
+ 	if (unlikely(!q))
+ 		return -EPROTO;
+ 
+ 	xe_gt_err(gt,
+ 		  "GuC: Uncorrectable local error! guc_id=%d class=%s, logical_mask=0x%x",
+ 		  guc_id, xe_hw_engine_class_to_str(q->class), q->logical_mask);
+ 
+ 	trace_xe_guc_uncorrectable_error(q);
+ 
+ 	/* Treat the same as engine reset */
+ 	xe_guc_exec_queue_reset_trigger_cleanup(q);
  
  	return 0;
  }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-06-15 14:43 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-06-15 14:43 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost, Rodrigo Vivi

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_guc_submit.c

between commit:

  347ccc0453fca ("drm/xe: fix job timeout recovery for unstarted jobs and kernel queues")

from the origin tree and commit:

  b1107d085e7e8 ("drm/xe: fix job timeout recovery for unstarted jobs and kernel queues")
  a889e9b06bfdb ("drm/xe: wedge from the timeout handler only after releasing the queue")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/xe/xe_guc_submit.c
index 12a410458df6f,afe5d99cdd8bc..0000000000000
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@@ -1493,7 -1493,7 +1493,7 @@@ guc_exec_queue_timedout_job(struct drm_
  	struct xe_device *xe = guc_to_xe(guc);
  	int err = -ETIME;
  	pid_t pid = -1;
- 	bool wedged = false, skip_timeout_check;
+ 	bool wedged = false, wedge_device = false, skip_timeout_check;
  
  	xe_gt_assert(guc_to_gt(guc), !exec_queue_destroyed(q));
  
@@@ -1638,7 -1638,7 +1638,7 @@@ trigger_reset
  			}
  			if (q->flags & EXEC_QUEUE_FLAG_KERNEL) {
  				xe_gt_WARN(q->gt, true, "Kernel-submitted job timed out\n");
- 				xe_device_declare_wedged(gt_to_xe(q->gt));
+ 				wedge_device = true;
  			}
  		} else if (q->flags & EXEC_QUEUE_FLAG_VM && !exec_queue_killed(q)) {
  			xe_gt_WARN(q->gt, true, "VM job timed out on non-killed execqueue\n");
@@@ -1658,6 -1658,9 +1658,9 @@@
  		xe_guc_exec_queue_trigger_cleanup(q);
  	}
  
+ 	if (wedge_device)
+ 		xe_device_declare_wedged(gt_to_xe(q->gt));
+ 
  	/*
  	 * We want the job added back to the pending list so it gets freed; this
  	 * is what DRM_GPU_SCHED_STAT_NO_HANG does.
@@@ -2241,14 -2244,6 +2244,6 @@@ static bool guc_exec_queue_reset_status
  	return exec_queue_reset(q) || exec_queue_killed_or_banned_or_wedged(q);
  }
  
- static bool guc_exec_queue_active(struct xe_exec_queue *q)
- {
- 	struct xe_exec_queue *primary = xe_exec_queue_multi_queue_primary(q);
- 
- 	return exec_queue_enabled(primary) &&
- 		!exec_queue_pending_disable(primary);
- }
- 
  /*
   * All of these functions are an abstraction layer which other parts of Xe can
   * use to trap into the GuC backend. All of these functions, aside from init,
@@@ -2268,7 -2263,6 +2263,6 @@@ static const struct xe_exec_queue_ops g
  	.suspend_wait = guc_exec_queue_suspend_wait,
  	.resume = guc_exec_queue_resume,
  	.reset_status = guc_exec_queue_reset_status,
- 	.active = guc_exec_queue_active,
  };
  
  static void guc_exec_queue_stop(struct xe_guc *guc, struct xe_exec_queue *q)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-03-23 16:11 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-03-23 16:11 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost, Zhanjun Dong

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_guc_submit.c

between commit:

  e0f82655df6fb ("drm/xe: Trigger queue cleanup if not in wedged mode 2")

from the origin tree and commits:

  e25ba41c8227c ("drm/xe: Trigger queue cleanup if not in wedged mode 2")
  a7f607610da72 ("drm/xe: Use XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET enum instead of magic number")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/xe/xe_guc_submit.c
index cb32053d57ecd,a145234f662b5..0000000000000
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@@ -1334,12 -1334,13 +1334,13 @@@ void xe_guc_submit_wedge(struct xe_guc 
  	if (!guc->submission_state.initialized)
  		return;
  
- 	if (xe->wedged.mode == 2) {
+ 	if (xe->wedged.mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET) {
  		err = devm_add_action_or_reset(guc_to_xe(guc)->drm.dev,
  					       guc_submit_wedged_fini, guc);
  		if (err) {
- 			xe_gt_err(gt, "Failed to register clean-up on wedged.mode=2; "
- 				  "Although device is wedged.\n");
+ 			xe_gt_err(gt, "Failed to register clean-up on wedged.mode=%s; "
+ 				  "Although device is wedged.\n",
+ 				  xe_wedged_mode_to_string(XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET));
  			return;
  		}
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-02-24 12:43 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-02-24 12:43 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Matt Roper,
	Rodrigo Vivi

[-- Attachment #1: Type: text/plain, Size: 26439 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_wa.c

between commit:

  bc6387a2e0c15 ("drm/xe/xe2_hpg: Fix handling of Wa_14019988906 & Wa_14019877138")

from the origin tree and commits:

  97ec6cb8109ce ("drm/xe: Consolidate workaround entries for Wa_15016589081")
  fe681e7b44d78 ("drm/xe: Consolidate workaround entries for Wa_18033852989")
  c2142a1a84152 ("drm/xe: Consolidate workaround entries for Wa_14019988906")
  f0d6d356f8ac4 ("drm/xe: Consolidate workaround entries for Wa_14019386621")
  55b19abb6c44d ("drm/xe: Consolidate workaround entries for Wa_14019877138")
  7b6f615d2b1f0 ("drm/xe: Consolidate workaround entries for Wa_13012615864")
  a9b2f1467464f ("drm/xe: Consolidate workaround entries for Wa_14021402888")
  909a0bcd37c6c ("drm/xe: Consolidate workaround entries for Wa_16021639441")
  792880cada369 ("drm/xe: Consolidate workaround entries for Wa_14018471104")
  37681c32f2597 ("drm/xe: Consolidate workaround entries for Wa_14020338487")
  1aaea53115870 ("drm/xe: Consolidate workaround entries for Wa_16018712365")
  ef32868d58490 ("drm/xe: Consolidate workaround entries for Wa_18032247524")
  6b4578b7c1b5b ("drm/xe: Consolidate workaround entries for Wa_16021865536")
  c9459e8c8baa9 ("drm/xe: Consolidate workaround entries for Wa_16028005424")
  aa0f0a678370b ("drm/xe: Consolidate workaround entries for Wa_14019449301")
  941f538b0af81 ("drm/xe: Consolidate workaround entries for Wa_16021867713")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/xe/xe_wa.c
index c7b1bd79ab17b,50f5d3381b4cd..0000000000000
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@@ -111,6 -111,17 +111,17 @@@
   *    difference of how they are maintained in the code. In xe it uses the
   *    xe_rtp infrastructure so the workarounds can be kept in tables, following
   *    a more declarative approach rather than procedural.
+  *
+  * .. note::
+  *    When a workaround applies to every single known IP version in a range,
+  *    the preferred handling is to use a single range-based RTP entry rather
+  *    than individual entries for each version, even if some of the intermediate
+  *    version numbers are currently unused.  If a new intermediate IP version
+  *    appears in the future and is enabled in the driver, any existing
+  *    range-based entries that contain the new version number will need to be
+  *    analyzed to determine whether their workarounds should apply to the new
+  *    version, or whether any existing range based entries needs to be split
+  *    into two entries that do not include the new intermediate version.
   */
  
  #undef XE_REG_MCR
@@@ -120,6 -131,8 +131,8 @@@ __diag_push()
  __diag_ignore_all("-Woverride-init", "Allow field overrides in table");
  
  static const struct xe_rtp_entry_sr gt_was[] = {
+ 	/* Workarounds applying over a range of IPs */
+ 
  	{ XE_RTP_NAME("14011060649"),
  	  XE_RTP_RULES(MEDIA_VERSION_RANGE(1200, 1255),
  		       ENGINE_CLASS(VIDEO_DECODE),
@@@ -135,6 -148,22 +148,22 @@@
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1260)),
  	  XE_RTP_ACTIONS(CLR(MISCCPCTL, DOP_CLOCK_GATE_RENDER_ENABLE))
  	},
+ 	{ XE_RTP_NAME("16021867713"),
+ 	  XE_RTP_RULES(MEDIA_VERSION_RANGE(1300, 3002),
+ 		       ENGINE_CLASS(VIDEO_DECODE)),
+ 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
+ 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
+ 	},
+ 	{ XE_RTP_NAME("14019449301"),
+ 	  XE_RTP_RULES(MEDIA_VERSION_RANGE(1301, 2000), ENGINE_CLASS(VIDEO_DECODE)),
+ 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)),
+ 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
+ 	},
+ 	{ XE_RTP_NAME("16028005424"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3005), OR,
+ 		       MEDIA_VERSION_RANGE(1301, 3500)),
+ 	  XE_RTP_ACTIONS(SET(GUC_INTR_CHICKEN, DISABLE_SIGNALING_ENGINES))
+ 	},
  
  	/* DG1 */
  
@@@ -191,10 -220,6 +220,6 @@@
  
  	/* Xe_LPG */
  
- 	{ XE_RTP_NAME("14015795083"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1271), GRAPHICS_STEP(A0, B0)),
- 	  XE_RTP_ACTIONS(CLR(MISCCPCTL, DOP_CLOCK_GATE_RENDER_ENABLE))
- 	},
  	{ XE_RTP_NAME("14018575942"),
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1274)),
  	  XE_RTP_ACTIONS(SET(COMP_MOD_CTRL, FORCE_MISS_FTLB))
@@@ -206,12 -231,6 +231,6 @@@
  
  	/* Xe_LPM+ */
  
- 	{ XE_RTP_NAME("16021867713"),
- 	  XE_RTP_RULES(MEDIA_VERSION(1300),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
  	{ XE_RTP_NAME("22016670082"),
  	  XE_RTP_RULES(MEDIA_VERSION(1300)),
  	  XE_RTP_ACTIONS(SET(XELPMP_SQCNT1, ENFORCE_RAR))
@@@ -225,17 -244,6 +244,6 @@@
  	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F10(0), IECPUNIT_CLKGATE_DIS)),
  	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
  	},
- 	{ XE_RTP_NAME("16021867713"),
- 	  XE_RTP_RULES(MEDIA_VERSION(2000),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
- 	{ XE_RTP_NAME("14019449301"),
- 	  XE_RTP_RULES(MEDIA_VERSION(2000), ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
  
  	/* Xe2_HPG */
  
@@@ -249,20 -257,6 +257,6 @@@
  			     LSN_DIM_Z_WGT(1)))
  	},
  
- 	/* Xe2_HPM */
- 
- 	{ XE_RTP_NAME("16021867713"),
- 	  XE_RTP_RULES(MEDIA_VERSION(1301),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
- 	{ XE_RTP_NAME("14019449301"),
- 	  XE_RTP_RULES(MEDIA_VERSION(1301), ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
- 
  	/* Xe3_LPG */
  
  	{ XE_RTP_NAME("14021871409"),
@@@ -272,43 -266,48 +266,48 @@@
  
  	/* Xe3_LPM */
  
- 	{ XE_RTP_NAME("16021867713"),
- 	  XE_RTP_RULES(MEDIA_VERSION(3000),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
  	{ XE_RTP_NAME("16021865536"),
- 	  XE_RTP_RULES(MEDIA_VERSION(3000),
+ 	  XE_RTP_RULES(MEDIA_VERSION_RANGE(3000, 3002),
  		       ENGINE_CLASS(VIDEO_DECODE)),
  	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F10(0), IECPUNIT_CLKGATE_DIS)),
  	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
  	},
- 	{ XE_RTP_NAME("16021865536"),
- 	  XE_RTP_RULES(MEDIA_VERSION(3002),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F10(0), IECPUNIT_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
- 	{ XE_RTP_NAME("16021867713"),
- 	  XE_RTP_RULES(MEDIA_VERSION(3002),
- 		       ENGINE_CLASS(VIDEO_DECODE)),
- 	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)),
- 	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
- 	},
  	{ XE_RTP_NAME("14021486841"),
  	  XE_RTP_RULES(MEDIA_VERSION(3000), MEDIA_STEP(A0, B0),
  		       ENGINE_CLASS(VIDEO_DECODE)),
  	  XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F10(0), RAMDFTUNIT_CLKGATE_DIS)),
  	  XE_RTP_ENTRY_FLAG(FOREACH_ENGINE),
  	},
+ 
+ 	/* Xe3P_LPG */
+ 
+ 	{ XE_RTP_NAME("14025160223"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)),
+ 	  XE_RTP_ACTIONS(SET(MMIOATSREQLIMIT_GAM_WALK_3D,
+ 			     DIS_ATS_WRONLY_PG))
+ 	},
+ 	{ XE_RTP_NAME("16028780921"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)),
+ 	  XE_RTP_ACTIONS(SET(CCCHKNREG2, LOCALITYDIS))
+ 	},
+ 	{ XE_RTP_NAME("14026144927"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)),
+ 	  XE_RTP_ACTIONS(SET(L3SQCREG2, L3_SQ_DISABLE_COAMA_2WAY_COH |
+ 			     L3_SQ_DISABLE_COAMA))
+ 	},
+ 	{ XE_RTP_NAME("14025635424"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)),
+ 	  XE_RTP_ACTIONS(SET(GAMSTLB_CTRL2, STLB_SINGLE_BANK_MODE))
+ 	},
  	{ XE_RTP_NAME("16028005424"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3005)),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0)),
  	  XE_RTP_ACTIONS(SET(GUC_INTR_CHICKEN, DISABLE_SIGNALING_ENGINES))
  	},
  };
  
  static const struct xe_rtp_entry_sr engine_was[] = {
+ 	/* Workarounds applying over a range of IPs */
+ 
  	{ XE_RTP_NAME("22010931296, 18011464164, 14010919138"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(1200), ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(FF_THREAD_MODE(RENDER_RING_BASE),
@@@ -344,6 -343,48 +343,48 @@@
  	  XE_RTP_ACTIONS(SET(FF_SLICE_CS_CHICKEN1(RENDER_RING_BASE),
  			     FFSC_PERCTX_PREEMPT_CTRL))
  	},
+ 	{ XE_RTP_NAME("18032247524"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, SEQUENTIAL_ACCESS_UPGRADE_DISABLE))
+ 	},
+ 	{ XE_RTP_NAME("16018712365"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, XE2_ALLOC_DPA_STARVE_FIX_DIS))
+ 	},
+ 	{ XE_RTP_NAME("14020338487"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
+ 	},
+ 	{ XE_RTP_NAME("14018471104"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, ENABLE_SMP_LD_RENDER_SURFACE_CONTROL))
+ 	},
+ 	/*
+ 	 * Although this workaround isn't required for the RCS, disabling these
+ 	 * reports has no impact for our driver or the GuC, so we go ahead and
+ 	 * apply this to all engines for simplicity.
+ 	 */
+ 	{ XE_RTP_NAME("16021639441"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), OR,
+ 		       MEDIA_VERSION_RANGE(1301, 2000)),
+ 	  XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
+ 			     GHWSP_CSB_REPORT_DIS |
+ 			     PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
+ 			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
+ 	},
+ 	{ XE_RTP_NAME("14021402888"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 3005), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
+ 	},
+ 	{ XE_RTP_NAME("13012615864"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 3005),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, RES_CHK_SPR_DIS))
+ 	},
  
  	/* TGL */
  
@@@ -459,11 -500,6 +500,6 @@@
  		       ENGINE_CLASS(COMPUTE)),
  	  XE_RTP_ACTIONS(SET(RING_HWSTAM(RENDER_RING_BASE), ~0))
  	},
- 	{ XE_RTP_NAME("14014999345"),
- 	  XE_RTP_RULES(PLATFORM(PVC), ENGINE_CLASS(COMPUTE),
- 		       GRAPHICS_STEP(B0, C0)),
- 	  XE_RTP_ACTIONS(SET(CACHE_MODE_SS, DISABLE_ECC))
- 	},
  
  	/* Xe_LPG */
  
@@@ -486,149 -522,48 +522,48 @@@
  
  	/* Xe2_LPG */
  
- 	{ XE_RTP_NAME("18032247524"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, SEQUENTIAL_ACCESS_UPGRADE_DISABLE))
- 	},
- 	{ XE_RTP_NAME("16018712365"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, XE2_ALLOC_DPA_STARVE_FIX_DIS))
- 	},
- 	{ XE_RTP_NAME("14020338487"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
- 	},
  	{ XE_RTP_NAME("18034896535, 16021540221"), /* 16021540221: GRAPHICS_STEP(A0, B0) */
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(ROW_CHICKEN4, DISABLE_TDL_PUSH))
  	},
- 	{ XE_RTP_NAME("14018471104"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, ENABLE_SMP_LD_RENDER_SURFACE_CONTROL))
- 	},
- 	/*
- 	 * These two workarounds are the same, just applying to different
- 	 * engines.  Although Wa_18032095049 (for the RCS) isn't required on
- 	 * all steppings, disabling these reports has no impact for our
- 	 * driver or the GuC, so we go ahead and treat it the same as
- 	 * Wa_16021639441 which does apply to all steppings.
- 	 */
- 	{ XE_RTP_NAME("18032095049, 16021639441"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004)),
- 	  XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
- 			     GHWSP_CSB_REPORT_DIS |
- 			     PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
- 			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
- 	},
  	{ XE_RTP_NAME("16018610683"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, SLM_WMTP_RESTORE))
  	},
- 	{ XE_RTP_NAME("14021402888"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
- 	},
- 	{ XE_RTP_NAME("13012615864"),
+ 	{ XE_RTP_NAME("18041344222"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2004),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, RES_CHK_SPR_DIS))
+ 		       FUNC(xe_rtp_match_first_render_or_compute),
+ 		       FUNC(xe_rtp_match_gt_has_discontiguous_dss_groups)),
+ 	  XE_RTP_ACTIONS(SET(TDL_CHICKEN, EUSTALL_PERF_SAMPLING_DISABLE))
  	},
  
  	/* Xe2_HPG */
  
- 	{ XE_RTP_NAME("16018712365"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, XE2_ALLOC_DPA_STARVE_FIX_DIS))
- 	},
  	{ XE_RTP_NAME("16018737384"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2999),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(ROW_CHICKEN, EARLY_EOT_DIS))
  	},
- 	{ XE_RTP_NAME("14020338487"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
- 	},
- 	{ XE_RTP_NAME("18032247524"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, SEQUENTIAL_ACCESS_UPGRADE_DISABLE))
- 	},
- 	{ XE_RTP_NAME("14018471104"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, ENABLE_SMP_LD_RENDER_SURFACE_CONTROL))
- 	},
- 	/*
- 	 * Although this workaround isn't required for the RCS, disabling these
- 	 * reports has no impact for our driver or the GuC, so we go ahead and
- 	 * apply this to all engines for simplicity.
- 	 */
- 	{ XE_RTP_NAME("16021639441"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002)),
- 	  XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
- 			     GHWSP_CSB_REPORT_DIS |
- 			     PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
- 			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
- 	},
  	{ XE_RTP_NAME("14019811474"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2001),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, WR_REQ_CHAINING_DIS))
  	},
- 	{ XE_RTP_NAME("14021402888"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
- 	},
  	{ XE_RTP_NAME("14021821874, 14022954250"),
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, STK_ID_RESTRICT))
  	},
- 	{ XE_RTP_NAME("13012615864"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, RES_CHK_SPR_DIS))
- 	},
  	{ XE_RTP_NAME("18041344222"),
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
  		       FUNC(xe_rtp_match_first_render_or_compute),
- 		       FUNC(xe_rtp_match_not_sriov_vf),
  		       FUNC(xe_rtp_match_gt_has_discontiguous_dss_groups)),
  	  XE_RTP_ACTIONS(SET(TDL_CHICKEN, EUSTALL_PERF_SAMPLING_DISABLE))
  	},
  
- 	/* Xe2_LPM */
- 
- 	{ XE_RTP_NAME("16021639441"),
- 	  XE_RTP_RULES(MEDIA_VERSION(2000)),
- 	  XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
- 			     GHWSP_CSB_REPORT_DIS |
- 			     PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
- 			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
- 	},
- 
- 	/* Xe2_HPM */
- 
- 	{ XE_RTP_NAME("16021639441"),
- 	  XE_RTP_RULES(MEDIA_VERSION(1301)),
- 	  XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
- 			     GHWSP_CSB_REPORT_DIS |
- 			     PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
- 			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
- 	},
- 
  	/* Xe3_LPG */
  
- 	{ XE_RTP_NAME("14021402888"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3001),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
- 	},
  	{ XE_RTP_NAME("18034896535"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(3000), GRAPHICS_STEP(A0, B0),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
@@@ -641,35 -576,40 +576,40 @@@
  				   SMP_FORCE_128B_OVERFETCH))
  	},
  	{ XE_RTP_NAME("14023061436"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3001),
- 		       FUNC(xe_rtp_match_first_render_or_compute), OR,
- 		       GRAPHICS_VERSION_RANGE(3003, 3005),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3005),
  		       FUNC(xe_rtp_match_first_render_or_compute)),
  	  XE_RTP_ACTIONS(SET(TDL_CHICKEN, QID_WAIT_FOR_THREAD_NOT_RUN_DISABLE))
  	},
- 	{ XE_RTP_NAME("13012615864"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3000, 3001), OR,
- 		       GRAPHICS_VERSION_RANGE(3003, 3005),
- 		       FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, RES_CHK_SPR_DIS))
- 	},
  	{ XE_RTP_NAME("16023105232"),
  	  XE_RTP_RULES(MEDIA_VERSION_RANGE(1301, 3000), OR,
  		       GRAPHICS_VERSION_RANGE(2001, 3001)),
  	  XE_RTP_ACTIONS(SET(RING_PSMI_CTL(0), RC_SEMA_IDLE_MSG_DISABLE,
  			     XE_RTP_ACTION_FLAG(ENGINE_BASE)))
  	},
- 	{ XE_RTP_NAME("14021402888"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3003, 3005), FUNC(xe_rtp_match_first_render_or_compute)),
- 	  XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
- 	},
  	{ XE_RTP_NAME("18041344222"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(3000),
  		       FUNC(xe_rtp_match_first_render_or_compute),
- 		       FUNC(xe_rtp_match_not_sriov_vf),
  		       FUNC(xe_rtp_match_gt_has_discontiguous_dss_groups)),
  	  XE_RTP_ACTIONS(SET(TDL_CHICKEN, EUSTALL_PERF_SAMPLING_DISABLE))
  	},
+ 
+ 	/* Xe3p_LPG*/
+ 
+ 	{ XE_RTP_NAME("22021149932"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, SAMPLER_LD_LSC_DISABLE))
+ 	},
+ 	{ XE_RTP_NAME("14025676848"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, LSCFE_SAME_ADDRESS_ATOMICS_COALESCING_DISABLE))
+ 	},
+ 	{ XE_RTP_NAME("16028951944"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0),
+ 		       FUNC(xe_rtp_match_first_render_or_compute)),
+ 	  XE_RTP_ACTIONS(SET(ROW_CHICKEN5, CPSS_AWARE_DIS))
+ 	},
  };
  
  static const struct xe_rtp_entry_sr lrc_was[] = {
@@@ -706,6 -646,26 +646,26 @@@
  	  XE_RTP_RULES(GRAPHICS_VERSION(1200)),
  	  XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN4, DISABLE_TDC_LOAD_BALANCING_CALC))
  	},
+ 	{ XE_RTP_NAME("14019877138"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1255, 2004), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
+ 	},
+ 	{ XE_RTP_NAME("14019386621"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(VF_SCRATCHPAD, XE2_VFG_TED_CREDIT_INTERFACE_DISABLE))
+ 	},
+ 	{ XE_RTP_NAME("14019988906"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FLSH_IGNORES_PSD))
+ 	},
+ 	{ XE_RTP_NAME("18033852989"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN1, DISABLE_BOTTOM_CLIP_RECTANGLE_TEST))
+ 	},
+ 	{ XE_RTP_NAME("15016589081"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
+ 	},
  
  	/* DG1 */
  
@@@ -742,10 -702,6 +702,6 @@@
  	  XE_RTP_RULES(PLATFORM(DG2)),
  	  XE_RTP_ACTIONS(SET(CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE))
  	},
- 	{ XE_RTP_NAME("14019877138"),
- 	  XE_RTP_RULES(PLATFORM(DG2)),
- 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
- 	},
  
  	/* PVC */
  
@@@ -763,29 -719,9 +719,9 @@@
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1274)),
  	  XE_RTP_ACTIONS(SET(CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE))
  	},
- 	{ XE_RTP_NAME("14019877138"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1274), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
- 	},
  
  	/* Xe2_LPG */
  
- 	{ XE_RTP_NAME("14019386621"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(VF_SCRATCHPAD, XE2_VFG_TED_CREDIT_INTERFACE_DISABLE))
- 	},
- 	{ XE_RTP_NAME("14019877138"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
- 	},
- 	{ XE_RTP_NAME("14019988906"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FLSH_IGNORES_PSD))
- 	},
- 	{ XE_RTP_NAME("18033852989"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN1, DISABLE_BOTTOM_CLIP_RECTANGLE_TEST))
- 	},
  	{ XE_RTP_NAME("14021567978"),
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED),
  		       ENGINE_CLASS(RENDER)),
@@@ -805,32 -741,16 +741,24 @@@
  			     DIS_PARTIAL_AUTOSTRIP |
  			     DIS_AUTOSTRIP))
  	},
- 	{ XE_RTP_NAME("15016589081"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
- 	},
  
  	/* Xe2_HPG */
  	{ XE_RTP_NAME("15010599737"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_SF_ROUND_NEAREST_EVEN))
  	},
- 	{ XE_RTP_NAME("14019386621"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(VF_SCRATCHPAD, XE2_VFG_TED_CREDIT_INTERFACE_DISABLE))
- 	},
  	{ XE_RTP_NAME("14020756599"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS))
  	},
 +	{ XE_RTP_NAME("14019988906"),
 +	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
 +	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FLSH_IGNORES_PSD))
 +	},
 +	{ XE_RTP_NAME("14019877138"),
 +	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
 +	  XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
 +	},
  	{ XE_RTP_NAME("14021490052"),
  	  XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(FF_MODE,
@@@ -840,18 -760,10 +768,10 @@@
  			     DIS_PARTIAL_AUTOSTRIP |
  			     DIS_AUTOSTRIP))
  	},
- 	{ XE_RTP_NAME("15016589081"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
- 	},
  	{ XE_RTP_NAME("22021007897"),
  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN4, SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE))
  	},
- 	{ XE_RTP_NAME("18033852989"),
- 	  XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
- 	  XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN1, DISABLE_BOTTOM_CLIP_RECTANGLE_TEST))
- 	},
  
  	/* Xe3_LPG */
  	{ XE_RTP_NAME("14021490052"),
@@@ -877,6 -789,10 +797,10 @@@
  		       ENGINE_CLASS(RENDER)),
  	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
  	},
+ 	{ XE_RTP_NAME("14026781792"),
+ 	  XE_RTP_RULES(GRAPHICS_VERSION(3510), ENGINE_CLASS(RENDER)),
+ 	  XE_RTP_ACTIONS(SET(FF_MODE, DIS_TE_PATCH_CTRL))
+ 	},
  };
  
  static __maybe_unused const struct xe_rtp_entry oob_was[] = {
@@@ -943,7 -859,8 +867,8 @@@ void xe_wa_process_gt(struct xe_gt *gt
  
  	xe_rtp_process_ctx_enable_active_tracking(&ctx, gt->wa_active.gt,
  						  ARRAY_SIZE(gt_was));
- 	xe_rtp_process_to_sr(&ctx, gt_was, ARRAY_SIZE(gt_was), &gt->reg_sr);
+ 	xe_rtp_process_to_sr(&ctx, gt_was, ARRAY_SIZE(gt_was),
+ 			     &gt->reg_sr, false);
  }
  EXPORT_SYMBOL_IF_KUNIT(xe_wa_process_gt);
  
@@@ -961,7 -878,8 +886,8 @@@ void xe_wa_process_engine(struct xe_hw_
  
  	xe_rtp_process_ctx_enable_active_tracking(&ctx, hwe->gt->wa_active.engine,
  						  ARRAY_SIZE(engine_was));
- 	xe_rtp_process_to_sr(&ctx, engine_was, ARRAY_SIZE(engine_was), &hwe->reg_sr);
+ 	xe_rtp_process_to_sr(&ctx, engine_was, ARRAY_SIZE(engine_was),
+ 			     &hwe->reg_sr, false);
  }
  
  /**
@@@ -978,7 -896,8 +904,8 @@@ void xe_wa_process_lrc(struct xe_hw_eng
  
  	xe_rtp_process_ctx_enable_active_tracking(&ctx, hwe->gt->wa_active.lrc,
  						  ARRAY_SIZE(lrc_was));
- 	xe_rtp_process_to_sr(&ctx, lrc_was, ARRAY_SIZE(lrc_was), &hwe->reg_lrc);
+ 	xe_rtp_process_to_sr(&ctx, lrc_was, ARRAY_SIZE(lrc_was),
+ 			     &hwe->reg_lrc, true);
  }
  
  /**

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-02-23 13:39 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-02-23 13:39 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Kees Cook, Linus Torvalds, Linux Kernel Mailing List,
	Linux Next Mailing List, Matthew Brost, Satyanarayana K V P

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_bb.c

between commits:

  69050f8d6d075 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
  bf4afc53b77ae ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument")

from the origin tree and commit:

  bcd768d787e7b ("drm/xe/vf: Fix fs_reclaim warning with CCS save/restore BB allocation")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/xe/xe_bb.c
index 4749aa7f94660,b0aceaec2685e..0000000000000
--- a/drivers/gpu/drm/xe/xe_bb.c
+++ b/drivers/gpu/drm/xe/xe_bb.c
@@@ -59,12 -59,18 +59,18 @@@ err
  	return ERR_PTR(err);
  }
  
- struct xe_bb *xe_bb_ccs_new(struct xe_gt *gt, u32 dwords,
- 			    enum xe_sriov_vf_ccs_rw_ctxs ctx_id)
+ /**
+  * xe_bb_alloc() - Allocate a new batch buffer structure
+  * @gt: the &xe_gt
+  *
+  * Allocates and initializes a new xe_bb structure with an associated
+  * uninitialized suballoc object.
+  *
+  * Returns: Batch buffer structure or an ERR_PTR(-ENOMEM).
+  */
+ struct xe_bb *xe_bb_alloc(struct xe_gt *gt)
  {
 -	struct xe_bb *bb = kmalloc(sizeof(*bb), GFP_KERNEL);
 +	struct xe_bb *bb = kmalloc_obj(*bb);
- 	struct xe_device *xe = gt_to_xe(gt);
- 	struct xe_sa_manager *bb_pool;
  	int err;
  
  	if (!bb)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-02-23 13:35 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-02-23 13:35 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Ashutosh Dixit, Kees Cook, Linus Torvalds,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Shuicheng Lin

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/xe/xe_nvm.c

between commits:

  69050f8d6d075 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
  bf4afc53b77ae ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument")

from the origin tree and commits:

  8a44241b0b83a ("drm/xe/nvm: Fix double-free on aux add failure")
  7755ed58a49f4 ("drm/xe/nvm: Defer xe->nvm assignment until init succeeds")
  a3187c0c2bbd9 ("drm/xe/nvm: Fix double-free on aux add failure")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/xe/xe_nvm.c
index 9c4ccd3b39d4d,1fdfb690ea3d3..0000000000000
--- a/drivers/gpu/drm/xe/xe_nvm.c
+++ b/drivers/gpu/drm/xe/xe_nvm.c
@@@ -133,12 -133,10 +133,10 @@@ int xe_nvm_init(struct xe_device *xe
  	if (WARN_ON(xe->nvm))
  		return -EFAULT;
  
- 	xe->nvm = kzalloc_obj(*nvm);
- 	if (!xe->nvm)
 -	nvm = kzalloc(sizeof(*nvm), GFP_KERNEL);
++	nvm = kzalloc_obj(*nvm);
+ 	if (!nvm)
  		return -ENOMEM;
  
- 	nvm = xe->nvm;
- 
  	nvm->writable_override = xe_nvm_writable_override(xe);
  	nvm->non_posted_erase = xe_nvm_non_posted_erase(xe);
  	nvm->bar.parent = &pdev->resource[0];

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2026-02-23 13:34 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2026-02-23 13:34 UTC (permalink / raw)
  To: Thomas Hellström, DRM XE List
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost, Satyanarayana K V P

[-- Attachment #1: Type: text/plain, Size: 2594 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  drivers/gpu/drm/drm_suballoc.c

between commit:

  69050f8d6d075 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")

from the origin tree and commit:

  16843e6638b74 ("drm/sa: Split drm_suballoc_new() into SA alloc and init helpers")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/drm_suballoc.c
index e44ad39e310cd,dc9bef3c0419d..0000000000000
--- a/drivers/gpu/drm/drm_suballoc.c
+++ b/drivers/gpu/drm/drm_suballoc.c
@@@ -293,13 -293,37 +293,37 @@@ static bool drm_suballoc_next_hole(stru
  }
  
  /**
-  * drm_suballoc_new() - Make a suballocation.
+  * drm_suballoc_alloc() - Allocate uninitialized suballoc object.
+  * @gfp: gfp flags used for memory allocation.
+  *
+  * Allocate memory for an uninitialized suballoc object. Intended usage is
+  * allocate memory for suballoc object outside of a reclaim tainted context
+  * and then be initialized at a later time in a reclaim tainted context.
+  *
+  * @drm_suballoc_free() should be used to release the memory if returned
+  * suballoc object is in uninitialized state.
+  *
+  * Return: a new uninitialized suballoc object, or an ERR_PTR(-ENOMEM).
+  */
+ struct drm_suballoc *drm_suballoc_alloc(gfp_t gfp)
+ {
+ 	struct drm_suballoc *sa;
+ 
 -	sa = kmalloc(sizeof(*sa), gfp);
++	sa = kmalloc_obj(*sa, gfp);
+ 	if (!sa)
+ 		return ERR_PTR(-ENOMEM);
+ 
+ 	sa->manager = NULL;
+ 
+ 	return sa;
+ }
+ EXPORT_SYMBOL(drm_suballoc_alloc);
+ 
+ /**
+  * drm_suballoc_insert() - Initialize a suballocation and insert a hole.
   * @sa_manager: pointer to the sa_manager
+  * @sa: The struct drm_suballoc.
   * @size: number of bytes we want to suballocate.
-  * @gfp: gfp flags used for memory allocation. Typically GFP_KERNEL but
-  *       the argument is provided for suballocations from reclaim context or
-  *       where the caller wants to avoid pipelining rather than wait for
-  *       reclaim.
   * @intr: Whether to perform waits interruptible. This should typically
   *        always be true, unless the caller needs to propagate a
   *        non-interruptible context from above layers.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* linux-next: manual merge of the drm-xe tree with the origin tree
@ 2025-09-15 22:18 Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2025-09-15 22:18 UTC (permalink / raw)
  To: Lucas De Marchi, Thomas Hellström, DRM XE List
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Rodrigo Vivi

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got conflicts in:

  drivers/gpu/drm/xe/tests/xe_bo.c
  drivers/gpu/drm/xe/xe_bo.c
  drivers/gpu/drm/xe/xe_bo.h
  drivers/gpu/drm/xe/xe_dma_buf.c
  drivers/gpu/drm/xe/xe_exec.c
  drivers/gpu/drm/xe/xe_vm.c

between commit:

  5c87fee3c96ce ("drm/xe: Attempt to bring bos back to VRAM after eviction")

from the origin tree and commits:

  cb3d7b3b46b79 ("drm/xe: Attempt to bring bos back to VRAM after eviction")
  0131514f97890 ("drm/xe: Pass down drm_exec context to validation")
  8f25e5abcbfb9 ("drm/xe: Convert existing drm_exec transactions for exhaustive eviction")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/xe/tests/xe_bo.c
index 7b40cc8be1c9c,2294cf89f3e11..0000000000000
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
diff --cc drivers/gpu/drm/xe/xe_bo.c
index 870f433472811,8422f3cab1139..0000000000000
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
diff --cc drivers/gpu/drm/xe/xe_bo.h
index cfb1ec266a6da,a77af42b5f9ea..0000000000000
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
diff --cc drivers/gpu/drm/xe/xe_dma_buf.c
index 95d06bd65b0f1,607c3f4ef3b92..0000000000000
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
diff --cc drivers/gpu/drm/xe/xe_exec.c
index 374c831e691b2,7715e74bb9454..0000000000000
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
diff --cc drivers/gpu/drm/xe/xe_vm.c
index c00a5ff318176,0cacab20ff852..0000000000000
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-22 15:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22 15:58 linux-next: manual merge of the drm-xe tree with the origin tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-07-20 14:44 Mark Brown
2026-06-15 14:43 Mark Brown
2026-03-23 16:11 Mark Brown
2026-02-24 12:43 Mark Brown
2026-02-23 13:39 Mark Brown
2026-02-23 13:35 Mark Brown
2026-02-23 13:34 Mark Brown
2025-09-15 22:18 Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®