Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Intel-SIG] MTL tools updates sync with upstream (6.9) #244

Merged

Conversation

quanxianwang
Copy link
Contributor

91a91d3,tools/power/turbostat: Add support for Xe sysfs knobs,2024-04-10 09:02:58 -0400,Zhang Rui [email protected],v6.9
dc02dc9,tools/power/turbostat: Add support for new i915 sysfs knobs,2024-04-10 09:02:58 -0400,Zhang Rui [email protected],v6.9
3bbb331,tools/power/turbostat: Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz,2024-04-10 09:02:44 -0400,Zhang Rui [email protected],v6.9
de39d38,tools/power/turbostat: Unify graphics sysfs snapshots,2024-04-09 14:04:23 -0400,Zhang Rui [email protected],v6.9
4e2bbbf,tools/power/turbostat: Cache graphics sysfs path,2024-04-09 14:04:23 -0400,Zhang Rui [email protected],v6.9

quanxianwang and others added 5 commits May 30, 2024 12:55
mainline:4e2bbbf78cf7144204214fd0bd7cca309acd8f89
severity: Moderate

upstream commit 4e2bbbf ("tools/power/turbostat: Cache graphics sysfs path")

Graphics drivers (i915/Xe) have different sysfs knobs on different
platforms, and it is possible that different sysfs knobs fit into the
same turbostat columns.

Instead of specifying different sysfs knobs every time, detect them
once and cache the path for future use.

No functional change.

Intel-SIG: commit 4e2bbbf ("tools/power/turbostat: Cache graphics sysfs path")

Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
[ Quanxian Wang: amend commit log ]
Signed-off-by: Quanxian Wang <[email protected]>
mainline:de39d38c06eb047954c5ad20a3f9acb6d3c78498
severity: Moderate

upstream commit de39d38 ("tools/power/turbostat: Unify graphics sysfs snapshots")

Graphics sysfs snapshots share similar logic.
Combine them into one function to avoid code duplication.

No functional change.

Intel-SIG: commit de39d38 ("tools/power/turbostat: Unify graphics sysfs snapshots")

Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>
[ Quanxian Wang: amend commit log ]
Signed-off-by: Quanxian Wang <[email protected]>
mainline:3bbb331c1d34fdd5520a050fce35f71579430485
severity: Moderate

upstream commit 3bbb331 ("tools/power/turbostat: Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz")

Graphics driver (i915/Xe) on mordern platforms splits GFX and SA Media
information via different sysfs knobs.

Existing BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz columns can be reused for
GFX.

Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz columns for SA Media.

Intel-SIG: commit 3bbb331 ("tools/power/turbostat: Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz")

Signed-off-by: Zhang Rui <[email protected]>
[ Quanxian Wang: amend commit log ]
Signed-off-by: Quanxian Wang <[email protected]>
mainline:dc02dc937a3ef819c5da10e97084af6977be26bf
severity: Moderate

upstream commit dc02dc9 ("tools/power/turbostat: Add support for new i915 sysfs knobs")

On Meteorlake platform, i915 driver supports the traditional graphics
sysfs knobs including
   /sys/class/drm/card0/power/rc6_residency_ms
   /sys/class/drm/card0/gt_cur_freq_mhz
   /sys/class/drm/card0/gt_act_freq_mhz

At the same time, it also supports
   /sys/class/drm/card0/gt/gt0/rc6_residency_ms
   /sys/class/drm/card0/gt/gt0/rps_cur_freq_mhz
   /sys/class/drm/card0/gt/gt0/rps_act_freq_mhz
   /sys/class/drm/card0/gt/gt1/rc6_residency_ms
   /sys/class/drm/card0/gt/gt1/rps_cur_freq_mhz
   /sys/class/drm/card0/gt/gt1/rps_act_freq_mhz
gt0 is for GFX and gt1 is for SA Media.

Enhance turbostat to prefer the i915 new sysfs knobs.
Export gt0 via BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz.
Export gt1 via BIC_SMA_mc6/BIC_SMAMHz/BIC_SMAACTMHz.

Intel-SIG: commit dc02dc9 ("tools/power/turbostat: Add support for new i915 sysfs knobs")

Signed-off-by: Zhang Rui <[email protected]>
[ Quanxian Wang: amend commit log ]
Signed-off-by: Quanxian Wang <[email protected]>
mainline:91a91d389543a86963beec148d98d37875154bd4
severity: Moderate

upstream commit 91a91d3 ("tools/power/turbostat: Add support for Xe sysfs knobs")

Xe graphics driver uses different graphics sysfs knobs including
   /sys/class/drm/card0/device/tile0/gt0/gtidle/idle_residency_ms
   /sys/class/drm/card0/device/tile0/gt0/freq0/cur_freq
   /sys/class/drm/card0/device/tile0/gt0/freq0/act_freq
   /sys/class/drm/card0/device/tile0/gt1/gtidle/idle_residency_ms
   /sys/class/drm/card0/device/tile0/gt1/freq0/cur_freq
   /sys/class/drm/card0/device/tile0/gt1/freq0/act_freq

Plus that,
   /sys/class/drm/card0/device/tile0/gt<n>/gtidle/name
returns either gt<n>-rc or gt<n>-mc. rc is for GFX and mc is SA Media.

Enhance turbostat to prefer the Xe sysfs knobs when they are available.
Export gt<n>-rc via BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz.
Export gt<n>-mc via BIC_SMA_mc6/BIC_SMAMHz/BIC_SMAACTMHz.

Intel-SIG: commit 91a91d3 ("tools/power/turbostat: Add support for Xe sysfs knobs")

Signed-off-by: Zhang Rui <[email protected]>
[ Quanxian Wang: amend commit log ]
Signed-off-by: Quanxian Wang <[email protected]>
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xzl01 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

deepin pr auto review

Intel: Fix sysfs path for graphics sysfs knobs

Signed-off-by: Sven Olsen [email protected]

@matrix-wsk matrix-wsk merged commit 439d101 into deepin-community:linux-6.6.y Jun 14, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants