drm/i915/gt: move remaining debugfs interfaces into gt
Subsystems (2)
PATCH v5 1/1 drm/i915/gt: move remaining debugfs interfaces into gt
From: Andi Shyti <[email protected]>
The following interfaces:
i915_wedged
i915_forcewake_user
i915_gem_interrupt
i915_rcs_topology
i915_sseu_status
are dependent on gt values. Put them inside gt/ and drop the "i915_" prefix name. This would be the new structure:
gt
|
+-- forcewake_user | +-- interrupt_info | +-- reset | +-- rcs_topology | +-- sseu_status
---
Hi,
this patch is the first of a series that aims to refactor the debugfs structure in the i915. Some changes will affect the debugfs framework as well.
It has gone through a series of offline reviews mainly from Tvrtko. Even though it hasn't been done publicly, I took the freedom to add Tvrtko's review.
Thanks Tvrtko and Chris for the review,
Andi
Changelog
=========
v5:
- renamed from debugfs_gt_sseu.[ch] to debugfs_sseu.[ch]
- moved i915_rcs_topology from i915_debugfs.c to gt/debugfs_sseu.c
- added Tvrtko's and Chris r-b.
v4:
- interrupt and sseu debugfs interface are moved to their own "debugfs_gt_irq" and "debugfs_gt_sseu" files
- reset functions are renamed to reset_show/store
v3:
- better arrangement of what should stay in i915_debugfs and what needs to be moved under gt/
- more use of the local "uncore" and "i915" variables to improve readability
v2:
- dropped changes on "drop_caches", they were indeed irrelevant
- improved interrupt info function
drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gt/debugfs_gt.c | 50 ++- drivers/gpu/drm/i915/gt/debugfs_gt_irq.c | 162 ++++++++++ drivers/gpu/drm/i915/gt/debugfs_gt_irq.h | 15 + drivers/gpu/drm/i915/gt/debugfs_gt_pm.c | 32 ++ drivers/gpu/drm/i915/gt/debugfs_sseu.c | 294 +++++++++++++++++ drivers/gpu/drm/i915/gt/debugfs_sseu.h | 16 + drivers/gpu/drm/i915/i915_debugfs.c | 384 +---------------------- 8 files changed, 571 insertions(+), 384 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/debugfs_gt_irq.c create mode 100644 drivers/gpu/drm/i915/gt/debugfs_gt_irq.h create mode 100644 drivers/gpu/drm/i915/gt/debugfs_sseu.c create mode 100644 drivers/gpu/drm/i915/gt/debugfs_sseu.h
drivers/gpu/drm/i915/Makefile +2 -0
@@ -79,6 +79,8 @@ gt-y += \ gt/debugfs_engines.o \ gt/debugfs_gt.o \ gt/debugfs_gt_pm.o \ + gt/debugfs_gt_irq.o \ + gt/debugfs_sseu.o \ gt/gen6_ppgtt.o \ gt/gen7_renderclear.o \ gt/gen8_ppgtt.o \
drivers/gpu/drm/i915/gt/debugfs_gt.c +49 -1
66 lines not on this page · raw message
drivers/gpu/drm/i915/gt/debugfs_gt_irq.c new file +162 -0
162 lines not on this page · raw message
drivers/gpu/drm/i915/gt/debugfs_gt_irq.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ + +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GT_IRQ_H +#define DEBUGFS_GT_IRQ_H + +struct intel_gt ; +struct dentry ; + +void debugfs_gt_register_irq (struct intel_gt *gt,struct dentry *root); + +#endif /* DEBUGFS_GT_IRQ_H */
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c +32 -0
@@ -10,6 +10,7 @@#include "debugfs_gt_pm.h" #include "i915_drv.h" #include "intel_gt.h" +#include "intel_gt_pm.h" #include "intel_llc.h" #include "intel_rc6.h" #include "intel_rps.h"
@@ -17,6 +18,36 @@#include "intel_sideband.h" #include "intel_uncore.h" +static int forcewake_user_open (struct inode *inode,struct file *file) +{ +struct intel_gt *gt = inode->i_private; + +atomic_inc (>->user_wakeref); +intel_gt_pm_get (gt); +if (INTEL_GEN (gt->i915) >=6 ) +intel_uncore_forcewake_user_get (gt->uncore); + +return 0 ; +} + +static int forcewake_user_release (struct inode *inode,struct file *file) +{ +struct intel_gt *gt = inode->i_private; + +if (INTEL_GEN (gt->i915) >=6 ) +intel_uncore_forcewake_user_put (gt->uncore); +intel_gt_pm_put (gt); +atomic_dec (>->user_wakeref); + +return 0 ; +} + +static const struct file_operations forcewake_user_fops = { + .owner =THIS_MODULE , + .open = forcewake_user_open, + .release = forcewake_user_release, +}; +static int fw_domains_show (struct seq_file *m,void *data) {struct intel_gt *gt = m->private;
@@ -597,6 +628,7 @@ void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root) { "drpc", &drpc_fops, NULL }, { "frequency", &frequency_fops, NULL }, { "forcewake", &fw_domains_fops, NULL }, + { "forcewake_user", &forcewake_user_fops, NULL}, { "llc", &llc_fops, llc_eval }, { "rps_boost", &rps_boost_fops, rps_eval }, };
drivers/gpu/drm/i915/gt/debugfs_sseu.c new file +294 -0
294 lines not on this page · raw message
drivers/gpu/drm/i915/gt/debugfs_sseu.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT */ + +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_SSEU_H +#define DEBUGFS_SSEU_H + +struct intel_gt ; +struct dentry ; +struct sseu_dev_info ; + +void debugfs_gt_register_sseu (struct intel_gt *gt,struct dentry *root); + +#endif /* DEBUGFS_SSEU_H */
drivers/gpu/drm/i915/i915_debugfs.c +1 -383
451 lines not on this page · raw message
Signature · 6 lines
2.25.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gt: move remaining debugfs interfaces into gt (rev4)
== Series Details ==
== Series Details ==
Series: drm/i915/gt: move remaining debugfs interfaces into gt (rev4)
URL : https://patchwork.freedesktop.org/series/75333/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 88806913668d drm/i915/gt: move remaining debugfs interfaces into gt -:119: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #119: new file mode 100644
-:443: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #443: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:74:
+ eu_reg[2 * s + 1] = intel_uncore_read(uncore,
+ GEN10_SS23_EU_PGCTL_ACK(s));
-:493: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #493: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:124:
+ eu_reg[2*s] = intel_uncore_read(uncore,
^
-:495: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #495: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:126:
+ eu_reg[2*s + 1] = intel_uncore_read(uncore,
^
-:533: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #533: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:164:
+ eu_cnt = 2 * hweight32(eu_reg[2*s + ss/2] &
^
-:533: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #533: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:164:
+ eu_cnt = 2 * hweight32(eu_reg[2*s + ss/2] &
^
-:534: CHECK:SPACING: spaces preferred around that '%' (ctx:VxV) #534: FILE: drivers/gpu/drm/i915/gt/debugfs_sseu.c:165:
+ eu_mask[ss%2]);
^
total: 0 errors, 1 warnings, 6 checks, 1062 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: move remaining debugfs interfaces into gt (rev4)
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: drm/i915/gt: move remaining debugfs interfaces into gt (rev4)
URL : https://patchwork.freedesktop.org/series/75333/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8251 -> Patchwork_17205
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_17205 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_17205, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17205:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@execlists:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8251/fi-apl-guc/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/fi-apl-guc/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_17205 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload:
- fi-skl-6770hq: [PASS][3] -> [DMESG-WARN][4] ([i915#203]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8251/fi-skl-6770hq/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/fi-skl-6770hq/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-skl-6770hq: [PASS][5] -> [SKIP][6] ([fdo#109271]) +5 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8251/fi-skl-6770hq/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/fi-skl-6770hq/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-skl-6770hq: [PASS][7] -> [DMESG-WARN][8] ([i915#106])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8251/fi-skl-6770hq/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/fi-skl-6770hq/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- fi-bxt-dsi: [INCOMPLETE][9] ([i915#656]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8251/fi-bxt-dsi/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/fi-bxt-dsi/igt@i915_selftest@[email protected]
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#106]: https://gitlab.freedesktop.org/drm/intel/issues/106
[i915#203]: https://gitlab.freedesktop.org/drm/intel/issues/203
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
Participating hosts (50 -> 44)
------------------------------
Additional (1): fi-kbl-7560u
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8251 -> Patchwork_17205
CI-20190529: 20190529
CI_DRM_8251: 06ddf8dd059d59bc27c24b09a6e500809e619982 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5563: 7ab7807727262b7ed7e12197b78e867287a17ef6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17205: 88806913668da4525869dff6f099152bf63b0178 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
88806913668d drm/i915/gt: move remaining debugfs interfaces into gt
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17205/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx