[PATCH] drm/xe: Add WA BB to capture active context utilization

Lucas De Marchi lucas.demarchi at intel.com
Thu May 1 13:58:23 UTC 2025


On Wed, Apr 30, 2025 at 11:28:40AM -0700, Umesh Nerlige Ramappa wrote:
>>>u32 xe_lrc_update_timestamp(struct xe_lrc *lrc, u32 *old_ts)
>>>{
>>>+	u32 ctx_lrc, ctx_reg, engine_id;
>>>+
>>>	*old_ts = lrc->ctx_timestamp;
>>>
>>>-	lrc->ctx_timestamp = xe_lrc_ctx_timestamp(lrc);
>>>+	ctx_lrc = xe_lrc_ctx_timestamp(lrc);
>>>+	if (ctx_lrc == 1) {
>>
>>so in the rare case this clashes with a real sched-out value, the
>>outcome will be that we will read a bogus timestamp and the math will be
>>totally invalid. Maybe start using the entire u64 counter for this since
>>it would then not wrap in practice?
>
>I was trying to keep it compatible with platforms without 64 bit 
>CTX_TIMESTAMP. Also th issue is reported on DG2.

DG2 is not even officially supported. If we can make it very unlikely on
DG2 and impossible on Xe2 and later, let's do it.

Lucas De Marchi


More information about the Intel-xe mailing list