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 8B948C531F9 for ; Fri, 24 Jul 2026 20:25:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B50510E0C5; Fri, 24 Jul 2026 20:25:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JyU/goV1"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4A1C10E0B5 for ; Fri, 24 Jul 2026 20:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784924748; x=1816460748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nzkyzUZiHEtKBJ8ASQsDvN42OUxop+aI93EbTj9ZqKk=; b=JyU/goV11NmX+FaKGYbCjlkLCJ6LrJP0xjpgtYCem5Uus6QtNX5k19Z7 a5ILbKA+X6mNGPl9z6FaodyJI2NuUTxEMBDqYVBnr6tydV3yaBpgS+RQ6 zfEXaCdgzEz8Q+ZgixHfqHsNIwcmknnFFj0ib7Rrd8My5m0pBNPRfMkuc eYxXyir5vEImz8HePp2AQEwTA7CuwQceoetbezhgcb/5OAdJw+3bqG3HQ 20105x0oTb8dJAvk0mjY+DwK87ZXR5ZkhGorpj0XQHjHQtuIkbJIKAmNC +YT0If4xHouIKtmh4Ljhz5SS3C+ZRa0uxJnhKDLElBlgVQP3Y0/cE8jDN A==; X-CSE-ConnectionGUID: eryRloJZTOmWWiyb2PJQIQ== X-CSE-MsgGUID: mNxSSTCpQEOCCz6Wfaeh+Q== X-IronPort-AV: E=McAfee;i="6800,10657,11855"; a="85540909" X-IronPort-AV: E=Sophos;i="6.25,183,1779174000"; d="scan'208";a="85540909" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2026 13:25:47 -0700 X-CSE-ConnectionGUID: LkJQMEDBTBuo1aYqhfezfg== X-CSE-MsgGUID: jI5Yt6+BSQCfHqMZ8xJihA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,183,1779174000"; d="scan'208";a="254874764" Received: from dut4402arlh.fm.intel.com ([10.105.10.136]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2026 13:25:44 -0700 From: Stuart Summers To: Cc: intel-xe@lists.freedesktop.org, rodrigo.vivi@intel.com, matthew.brost@intel.com, umesh.nerlige.ramappa@intel.com, Michal.Wajdeczko@intel.com, matthew.d.roper@intel.com, daniele.ceraolospurio@intel.com, shuicheng.lin@intel.com, Stuart Summers Subject: [PATCH 3/9] drm/xe: Add a new debug focused configfs group Date: Fri, 24 Jul 2026 20:25:40 +0000 Message-ID: <20260724202539.53850-14-stuart.summers@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260724202539.53850-11-stuart.summers@intel.com> References: <20260724202539.53850-11-stuart.summers@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 skeleton code for a new debug specific configfs group. Just add the structure for now. Actual debug content will be added in a subsequent patch. Signed-off-by: Stuart Summers Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7 --- drivers/gpu/drm/xe/Makefile | 2 ++ drivers/gpu/drm/xe/xe_configfs.c | 5 +++++ drivers/gpu/drm/xe/xe_configfs_debug.c | 14 ++++++++++++++ drivers/gpu/drm/xe/xe_configfs_debug.h | 13 +++++++++++++ drivers/gpu/drm/xe/xe_configfs_types.h | 3 +++ 5 files changed, 37 insertions(+) create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.c create mode 100644 drivers/gpu/drm/xe/xe_configfs_debug.h diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 67ada1d6c2fb..5765751781ae 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -162,6 +162,8 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o xe-$(CONFIG_CONFIGFS_FS) += xe_configfs.o +xe_debug_configfs_obj-$(CONFIG_DRM_XE_DEBUG) := xe_configfs_debug.o +xe-$(CONFIG_CONFIGFS_FS) += $(xe_debug_configfs_obj-y) # graphics virtualization (SR-IOV) support xe-y += \ diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c index f8f9afe82488..4b92e3072d56 100644 --- a/drivers/gpu/drm/xe/xe_configfs.c +++ b/drivers/gpu/drm/xe/xe_configfs.c @@ -14,6 +14,7 @@ #include "instructions/xe_mi_commands.h" #include "xe_configfs.h" +#include "xe_configfs_debug.h" #include "xe_defaults.h" #include "xe_gt_types.h" #include "xe_module.h" @@ -1233,6 +1234,10 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro config_group_init_type_name(&dev->sriov, "sriov", &xe_config_sriov_type); configfs_add_default_group(&dev->sriov, &dev->group); } +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG) + config_group_init_type_name(&dev->debug, "debug", &xe_configfs_debug_type); + configfs_add_default_group(&dev->debug, &dev->group); +#endif mutex_init(&dev->lock); diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c new file mode 100644 index 000000000000..45617282cec5 --- /dev/null +++ b/drivers/gpu/drm/xe/xe_configfs_debug.c @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright © 2026 Intel Corporation + */ + +#include +#include + +#include "xe_configfs_debug.h" +#include "xe_configfs_types.h" + +const struct config_item_type xe_configfs_debug_type = { + .ct_owner = THIS_MODULE, +}; diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.h b/drivers/gpu/drm/xe/xe_configfs_debug.h new file mode 100644 index 000000000000..5f938450aed2 --- /dev/null +++ b/drivers/gpu/drm/xe/xe_configfs_debug.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2026 Intel Corporation + */ +#ifndef _XE_CONFIGFS_DEBUG_H_ +#define _XE_CONFIGFS_DEBUG_H_ + +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG) && IS_ENABLED(CONFIG_CONFIGFS_FS) +struct config_item_type; +extern const struct config_item_type xe_configfs_debug_type; +#endif + +#endif /* _XE_CONFIGFS_DEBUG_H_ */ diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h b/drivers/gpu/drm/xe/xe_configfs_types.h index 3be7d6160b4c..e22b9424f719 100644 --- a/drivers/gpu/drm/xe/xe_configfs_types.h +++ b/drivers/gpu/drm/xe/xe_configfs_types.h @@ -22,6 +22,9 @@ struct wa_bb { struct xe_config_group_device { struct config_group group; struct config_group sriov; +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG) + struct config_group debug; +#endif /* * Fields sorted by type (largest first) then name: struct arrays, -- 2.43.0