From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F2ACC79F83 for ; Thu, 3 Sep 2026 23:59:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3F5C10F804; Thu, 3 Sep 2026 23:59:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VBwTMxMS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFB0810E4BC for ; Thu, 3 Sep 2026 23:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788479930; x=1820015930; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7hz7K7ymTGgo7IFQicADgMT9IXLhYEAZauY39SxbdWI=; b=VBwTMxMSWdiG1TXIjTH5fBzvHAooLkxql5V8qzvTpRmXy615qVV99gSz IetIwNUQaXnqldGrBAOeNKutlIKHmo6q/lOHkr305pZu9JVoh2kj4XjNX K5eOAJENBzjA8LmWJatJLqNDnxyj2o+y3Pd3E4Ha6boQewDXewc5qltXx LLsSqHuTyk9uur6//CkGXZB21SIZouHoRBpHO28fvhYK3M9+WRY2WX4Ql OjIh5z7FR1HcNElujiVj2Qn52mME1Z1vuLXzTRXE0A4w9taYWeBVM0dy4 MeQJIl7/VhVA2idl6QUDjWGtixjeQFOJrHEvwRw6F98RehnvcVN+gdAXB g==; X-CSE-ConnectionGUID: k6fkaEUMQxKgDo65abQjKg== X-CSE-MsgGUID: N+Xb5g31RIi6sGHPCwHaFw== X-IronPort-AV: E=McAfee;i="6800,10657,11895"; a="99637804" X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="99637804" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 16:58:49 -0700 X-CSE-ConnectionGUID: X1sWRkfnQA+16PRcVfpvlQ== X-CSE-MsgGUID: Sg24KJ7CQ/ezAZLSLuHmWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="274029039" Received: from gsse-cloud1.jf.intel.com ([10.54.39.91]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 16:58:49 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Cc: Stuart Summers Subject: [PATCH v4 04/25] drm/xe: Add job count to GuC exec queue snapshot Date: Thu, 3 Sep 2026 16:58:21 -0700 Message-Id: <20260903235842.3401722-5-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260903235842.3401722-1-matthew.brost@intel.com> References: <20260903235842.3401722-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Add the job count to the GuC exec queue snapshot, as this is useful debug information. Signed-off-by: Matthew Brost Reviewed-by: Stuart Summers Link: https://patch.msgid.link/20260228013501.106680-5-matthew.brost@intel.com Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/xe/xe_guc_submit.c | 2 ++ drivers/gpu/drm/xe/xe_guc_submit_types.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index 99d8c807ff05..cf306568ef30 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -3658,6 +3658,7 @@ xe_guc_exec_queue_snapshot_capture(struct xe_exec_queue *q) snapshot->logical_mask = q->logical_mask; snapshot->width = q->width; snapshot->refcount = kref_read(&q->refcount); + snapshot->jobcount = atomic_read(&q->job_cnt); snapshot->sched_timeout = sched->base.timeout; snapshot->sched_props.timeslice_us = q->sched_props.timeslice_us; snapshot->sched_props.preempt_timeout_us = @@ -3730,6 +3731,7 @@ xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snaps drm_printf(p, "\tLogical mask: 0x%x\n", snapshot->logical_mask); drm_printf(p, "\tWidth: %d\n", snapshot->width); drm_printf(p, "\tRef: %d\n", snapshot->refcount); + drm_printf(p, "\tJob count: %d\n", snapshot->jobcount); drm_printf(p, "\tTimeout: %ld (ms)\n", snapshot->sched_timeout); drm_printf(p, "\tTimeslice: %u (us)\n", snapshot->sched_props.timeslice_us); diff --git a/drivers/gpu/drm/xe/xe_guc_submit_types.h b/drivers/gpu/drm/xe/xe_guc_submit_types.h index 7824f61b1290..8271702e692e 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit_types.h +++ b/drivers/gpu/drm/xe/xe_guc_submit_types.h @@ -77,6 +77,8 @@ struct xe_guc_submit_exec_queue_snapshot { u16 width; /** @refcount: ref count of this exec queue */ u32 refcount; + /** @jobcount: job count of this exec queue */ + u32 jobcount; /** * @sched_timeout: the time after which a job is removed from the * scheduler. -- 2.34.1