From: Andi Shyti <andi.shyti@linux.intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Andi Shyti <andi.shyti@linux.intel.com>
Subject: [PATCH v3 10/15] drm/i915/gt: Store engine-related sysfs kobjects
Date: Fri, 23 Aug 2024 15:08:50 +0200 [thread overview]
Message-ID: <20240823130855.72436-11-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20240823130855.72436-1-andi.shyti@linux.intel.com>
Upcoming commits will need to access engine-related kobjects to
enable the creation and destruction of sysfs interfaces at
runtime.
For this, store the "engine" directory (i915->sysfs_engine), the
engine files (gt->kobj), and the default data
(gt->kobj_defaults).
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 ++
drivers/gpu/drm/i915/gt/sysfs_engines.c | 4 ++++
drivers/gpu/drm/i915/i915_drv.h | 1 +
3 files changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_types.h b/drivers/gpu/drm/i915/gt/intel_engine_types.h
index ba55c059063d..cdc695fda918 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_engine_types.h
@@ -388,6 +388,8 @@ struct intel_engine_cs {
u32 context_size;
u32 mmio_base;
+ struct kobject *kobj;
+
struct intel_engine_tlb_inv tlb_inv;
/*
diff --git a/drivers/gpu/drm/i915/gt/sysfs_engines.c b/drivers/gpu/drm/i915/gt/sysfs_engines.c
index 021f51d9b456..f67f76df1cfe 100644
--- a/drivers/gpu/drm/i915/gt/sysfs_engines.c
+++ b/drivers/gpu/drm/i915/gt/sysfs_engines.c
@@ -506,6 +506,8 @@ void intel_engines_add_sysfs(struct drm_i915_private *i915)
if (!dir)
return;
+ i915->sysfs_engine = dir;
+
for_each_uabi_engine(engine, i915) {
struct kobject *kobj;
@@ -526,6 +528,8 @@ void intel_engines_add_sysfs(struct drm_i915_private *i915)
add_defaults(container_of(kobj, struct kobj_engine, base));
+ engine->kobj = kobj;
+
if (0) {
err_object:
kobject_put(kobj);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 94f7f6cc444c..3a8a757f5bd5 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -320,6 +320,7 @@ struct drm_i915_private {
struct intel_gt *gt[I915_MAX_GT];
struct kobject *sysfs_gt;
+ struct kobject *sysfs_engine;
/* Quick lookup of media GT (current platforms only have one) */
struct intel_gt *media_gt;
--
2.45.2
next prev parent reply other threads:[~2024-08-23 13:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 13:08 [PATCH v3 00/15] CCS static load balance Andi Shyti
2024-08-23 13:08 ` [PATCH v3 01/15] drm/i915/gt: Avoid using masked workaround for CCS_MODE setting Andi Shyti
2024-08-23 13:08 ` [PATCH v3 02/15] drm/i915/gt: Move the CCS mode variable to a global position Andi Shyti
2024-08-23 13:08 ` [PATCH v3 03/15] drm/i915/gt: Allow the creation of multi-mode CCS masks Andi Shyti
2024-08-23 13:08 ` [PATCH v3 04/15] drm/i915/gt: Refactor uabi engine class/instance list creation Andi Shyti
2024-08-23 13:08 ` [PATCH v3 05/15] drm/i915/gem: Mark and verify UABI engine validity Andi Shyti
2024-08-23 13:08 ` [PATCH v3 06/15] drm/i915/gt: Introduce for_each_enabled_engine() and apply it in selftests Andi Shyti
2024-08-23 13:08 ` [PATCH v3 07/15] drm/i915/gt: Manage CCS engine creation within UABI exposure Andi Shyti
2024-08-23 13:08 ` [PATCH v3 08/15] drm/i915/gt: Remove cslices mask value from the CCS structure Andi Shyti
2024-08-23 13:08 ` [PATCH v3 09/15] drm/i915/gt: Expose the number of total CCS slices Andi Shyti
2024-08-23 13:08 ` Andi Shyti [this message]
2024-08-23 13:08 ` [PATCH v3 11/15] drm/i915/gt: Store active CCS mask Andi Shyti
2024-08-23 13:08 ` [PATCH v3 12/15] drm/i915: Protect access to the UABI engines list with a mutex Andi Shyti
2024-08-23 13:08 ` [PATCH v3 13/15] drm/i915/gt: Isolate single sysfs engine file creation Andi Shyti
2024-08-23 13:08 ` [PATCH v3 14/15] drm/i915/gt: Implement creation and removal routines for CCS engines Andi Shyti
2024-08-26 22:07 ` kernel test robot
2024-08-23 13:08 ` [PATCH v3 15/15] drm/i915/gt: Allow the user to change the CCS mode through sysfs Andi Shyti
2024-08-27 17:36 ` Daniel Vetter
2024-08-23 14:14 ` ✗ Fi.CI.CHECKPATCH: warning for CCS static load balance Patchwork
2024-08-23 14:14 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-23 14:26 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-08-23 15:48 ` ✗ Fi.CI.CHECKPATCH: warning for CCS static load balance (rev2) Patchwork
2024-08-23 15:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-08-23 16:04 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-24 14:44 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-27 9:25 ` [PATCH v3 00/15] CCS static load balance Andi Shyti
2024-08-27 17:31 ` Daniel Vetter
2024-08-28 8:20 ` Andi Shyti
2024-08-28 13:47 ` Daniel Vetter
2024-08-28 15:35 ` Andi Shyti
2024-09-02 11:13 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240823130855.72436-11-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox