Skip to contentSkip to conversation

drm/xe: Make xe_gt_freq part of the Documentation

PATCH In review Rodrigo Vivi 4 participants 8 messages May 21, 2025 – May 27, 2025

Subsystems (4)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/2 drm/xe: Make xe_gt_freq part of the Documentation

The documentation was created with the creation of the component, however it has never been actually shown in the actual Documentation.

While doing this, fixes the identation style, to avoid new warnings while building htmldocs.

Fixes bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs")
---
 Documentation/gpu/xe/index.rst      |  1 +
 Documentation/gpu/xe/xe_gt_freq.rst | 14 ++++++++++++++
 drivers/gpu/drm/xe/xe_gt_freq.c     |  2 ++
 3 files changed, 17 insertions(+)
 create mode 100644 Documentation/gpu/xe/xe_gt_freq.rst
Documentation/gpu/xe/index.rst +1 -0
index b2369561f24e..42ba6c263cd0 100644
@@ -16,6 +16,7 @@ DG2, etc is provided to prototype the driver.
    xe_migrate
    xe_cs
    xe_pm
+   xe_gt_freq
    xe_pcode
    xe_gt_mcr
    xe_wa
Documentation/gpu/xe/xe_gt_freq.rst new file +14 -0
new file mode 100644
index 000000000000..c0811200e327
@@ -0,0 +1,14 @@
+.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+==========================
+Xe GT Frequency Management
+==========================
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_gt_freq.c
+   :doc: Xe GT Frequency Management
+
+Internal API
+============
+
+.. kernel-doc:: drivers/gpu/drm/xe/xe_gt_freq.c
+   :internal:
drivers/gpu/drm/xe/xe_gt_freq.c +2 -0
index 868a5d2c1a52..3293d89f1386 100644
@@ -32,6 +32,7 @@
  * Xe's Freq provides a sysfs API for frequency management:
  *
  * device/tile#/gt#/freq0/<item>_freq *read-only* files:
+ *
  * - act_freq: The actual resolved frequency decided by PCODE.
  * - cur_freq: The current one requested by GuC PC to the PCODE.
  * - rpn_freq: The Render Performance (RP) N level, which is the minimal one.
@@ -39,6 +40,7 @@
  * - rp0_freq: The Render Performance (RP) 0 level, which is the maximum one.
  *
  * device/tile#/gt#/freq0/<item>_freq *read-write* files:
+ *
  * - min_freq: Min frequency request.
  * - max_freq: Max frequency request.
  *             If max <= min, then freq_min becomes a fixed frequency request.
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

PATCH 2/2 drm/xe: Add missing documentation of rpa_freq

While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime.

Fixes c6aac2fa77a3 ("drm/xe: Introduce the RPa information")
Cc Vinay Belgaumkar <[email protected]>
Cc Lucas De Marchi <[email protected]>
---
 drivers/gpu/drm/xe/xe_gt_freq.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/xe/xe_gt_freq.c +3 -0
index 3293d89f1386..60d9354e7dbf 100644
@@ -36,7 +36,10 @@
  * - act_freq: The actual resolved frequency decided by PCODE.
  * - cur_freq: The current one requested by GuC PC to the PCODE.
  * - rpn_freq: The Render Performance (RP) N level, which is the minimal one.
+ * - rpa_freq: The Render Performance (RP) A level, which is the achiveable one.
+ *   Calculated by PCODE at runtime based on multiple running conditions
  * - rpe_freq: The Render Performance (RP) E level, which is the efficient one.
+ *   Calculated by PCODE at runtime based on multiple running conditions
  * - rp0_freq: The Render Performance (RP) 0 level, which is the maximum one.
  *
  * device/tile#/gt#/freq0/<item>_freq *read-write* files:
Signature · 1 line
2.49.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/xe: Add missing documentation of rpa_freq

Quoted 16 lines · Rodrigo Vivi

While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime.

Fixes c6aac2fa77a3 ("drm/xe: Introduce the RPa information")
Cc Vinay Belgaumkar <[email protected]>
Cc Lucas De Marchi <[email protected]>
---
  drivers/gpu/drm/xe/xe_gt_freq.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/xe/xe_gt_freq.c +0 -0
index 3293d89f1386..60d9354e7dbf 100644

drivers/gpu/drm/xe/xe_gt_freq.c line 42

Quoted 7 lines
drivers/gpu/drm/xe/xe_gt_freq.c +3 -0
@@ -36,7 +36,10 @@
   * - act_freq: The actual resolved frequency decided by PCODE.
   * - cur_freq: The current one requested by GuC PC to the PCODE.
   * - rpn_freq: The Render Performance (RP) N level, which is the minimal one.
+ * - rpa_freq: The Render Performance (RP) A level, which is the achiveable one.
+ *   Calculated by PCODE at runtime based on multiple running conditions
   * - rpe_freq: The Render Performance (RP) E level, which is the efficient one.
+ *   Calculated by PCODE at runtime based on multiple running conditions

Nit: Do we need full stop at the end of these sentences?

Quoted 3 lines
drivers/gpu/drm/xe/xe_gt_freq.c +0 -0
   * - rp0_freq: The Render Performance (RP) 0 level, which is the maximum one.
   *
   * device/tile#/gt#/freq0/<item>_freq *read-write* files:
Reviewed-by
#3 lore raw

Re: [PATCH 2/2] drm/xe: Add missing documentation of rpa_freq

Quoted 13 lines · Vinay
Quoted 11 lines · Rodrigo Vivi

While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime.

Fixes c6aac2fa77a3 ("drm/xe: Introduce the RPa information")
Cc Vinay Belgaumkar <[email protected]>
Cc Lucas De Marchi <[email protected]>
---
 drivers/gpu/drm/xe/xe_gt_freq.c | 3 +++
 1 file changed, 3 insertions(+)
Quoted 14 lines

drivers/gpu/drm/xe/xe_gt_freq.c line 42

Quoted 12 lines
drivers/gpu/drm/xe/xe_gt_freq.c +3 -0
index 3293d89f1386..60d9354e7dbf 100644
@@ -36,7 +36,10 @@
  * - act_freq: The actual resolved frequency decided by PCODE.
  * - cur_freq: The current one requested by GuC PC to the PCODE.
  * - rpn_freq: The Render Performance (RP) N level, which is the minimal one.
+ * - rpa_freq: The Render Performance (RP) A level, which is the achiveable one.
+ *   Calculated by PCODE at runtime based on multiple running conditions
  * - rpe_freq: The Render Performance (RP) E level, which is the efficient one.
+ *   Calculated by PCODE at runtime based on multiple running conditions

Nit: Do we need full stop at the end of these sentences?

yeah, let's add them to be consistent with the other items

Lucas De Marchi

Quoted 6 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_gt_freq.c +0 -0
  * - rp0_freq: The Render Performance (RP) 0 level, which is the maximum one.
  *
  * device/tile#/gt#/freq0/<item>_freq *read-write* files:
#4 lore raw

✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation
URL : https://patchwork.freedesktop.org/series/149341/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 2d8dc23f1e6c drm-tip: 2025y-05m-21d-13h-29m-52s UTC integration manifest === git am output follows ===
Applying: drm/xe: Make xe_gt_freq part of the Documentation
Applying: drm/xe: Add missing documentation of rpa_freq

#5 lore raw

✗ CI.checkpatch: warning for series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation
URL : https://patchwork.freedesktop.org/series/149341/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 202708c00696422fd217223bb679a353a5936e23
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 755eaaae1ddb782db25cb525dc95a54ad6cd2aab

Author: Rodrigo Vivi <[email protected]>
Date:   Wed May 21 12:51:48 2025 -0400

drm/xe: Add missing documentation of rpa_freq

While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime.

Fixes c6aac2fa77a3 ("drm/xe: Introduce the RPa information")
Cc Vinay Belgaumkar <[email protected]>
Cc Lucas De Marchi <[email protected]>

+ /mt/dim checkpatch 2d8dc23f1e6ce72fe9e45fd0db71076d90a4e1aa drm-intel 656cd397f8f5 drm/xe: Make xe_gt_freq part of the Documentation
-:28: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #28:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 35 lines checked 755eaaae1ddb drm/xe: Add missing documentation of rpa_freq

#6 lore raw

✗ CI.KUnit: failure for series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/xe: Make xe_gt_freq part of the Documentation
URL : https://patchwork.freedesktop.org/series/149341/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig ERROR:root:../drivers/gpu/drm/drm_bridge.c:1406:6: error: redefinition of ‘devm_drm_put_bridge’ 1406 | void devm_drm_put_bridge(struct device *dev, struct drm_bridge *bridge)

      |      ^~~~~~~~~~~~~~~~~~~
In file included from ../drivers/gpu/drm/drm_bridge.c:31:
../include/drm/drm_bridge.h:1314:20: note: previous definition of ‘devm_drm_put_bridge’ with type ‘void(struct device *, struct drm_bridge *)’
 1314 | static inline void devm_drm_put_bridge(struct device *dev, struct drm_bridge *bridge) {}
      |                    ^~~~~~~~~~~~~~~~~~~

make[6]: *** [../scripts/Makefile.build:203: drivers/gpu/drm/drm_bridge.o] Error 1 make[6]: *** Waiting for unfinished jobs....
make[5]: *** [../scripts/Makefile.build:461: drivers/gpu/drm] Error 2 make[4]: *** [../scripts/Makefile.build:461: drivers/gpu] Error 2 make[3]: *** [../scripts/Makefile.build:461: drivers] Error 2 make[2]: *** [/kernel/Makefile:2003: .] Error 2
make[1]: *** [/kernel/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2

[17:10:57] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[17:11:01] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Reviewed-by on v1 1/2
#7 lore raw
In reply to Rodrigo Vivi
Quoted 8 lines · Rodrigo Vivi

The documentation was created with the creation of the component, however it has never been actually shown in the actual Documentation.

While doing this, fixes the identation style, to avoid new warnings while building htmldocs.

Fixes bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs")

Lucas De Marchi