Skip to contentSkip to conversation

drm/i915: use DEVICE_ATTR_RO macro

PATCH In review YueHaibing 3 participants 5 messages May 28, 2021 – Jun 2, 2021

Subsystems (2)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 drm/i915: use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read.

---
 drivers/gpu/drm/i915/i915_pmu.c   |  8 +++-----
 drivers/gpu/drm/i915/i915_sysfs.c | 30 +++++++++++++++---------------
 2 files changed, 18 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +3 -5
index 41651ac255fa..fb215929b05b 100644
@@ -834,15 +834,13 @@ static ssize_t i915_pmu_event_show(struct device *dev,
 	return sprintf(buf, "config=0x%lx\n", eattr->val);
 }
 
-static ssize_t
-i915_pmu_get_attr_cpumask(struct device *dev,
-			  struct device_attribute *attr,
-			  char *buf)
+static ssize_t cpumask_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
 {
 	return cpumap_print_to_pagebuf(true, buf, &i915_pmu_cpumask);
 }
 
-static DEVICE_ATTR(cpumask, 0444, i915_pmu_get_attr_cpumask, NULL);
+static DEVICE_ATTR_RO(cpumask);
 
 static struct attribute *i915_cpumask_attrs[] = {
 	&dev_attr_cpumask.attr,
drivers/gpu/drm/i915/i915_sysfs.c +15 -15
index 4c6b5d52b5ca..183517d1a73d 100644
@@ -58,8 +58,8 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
 	return DIV_ROUND_CLOSEST_ULL(res, 1000);
 }
 
-static ssize_t
-show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6_enable_show(struct device *kdev,
+			       struct device_attribute *attr, char *buf)
 {
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
 	unsigned int mask;
@@ -75,43 +75,43 @@ show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf)
 	return sysfs_emit(buf, "%x\n", mask);
 }
 
-static ssize_t
-show_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6_residency_ms_show(struct device *kdev,
+				     struct device_attribute *attr, char *buf)
 {
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
 	u32 rc6_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6);
 	return sysfs_emit(buf, "%u\n", rc6_residency);
 }
 
-static ssize_t
-show_rc6p_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6p_residency_ms_show(struct device *kdev,
+				      struct device_attribute *attr, char *buf)
 {
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
 	u32 rc6p_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6p);
 	return sysfs_emit(buf, "%u\n", rc6p_residency);
 }
 
-static ssize_t
-show_rc6pp_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6pp_residency_ms_show(struct device *kdev,
+				       struct device_attribute *attr, char *buf)
 {
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
 	u32 rc6pp_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6pp);
 	return sysfs_emit(buf, "%u\n", rc6pp_residency);
 }
 
-static ssize_t
-show_media_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t media_rc6_residency_ms_show(struct device *kdev,
+					   struct device_attribute *attr, char *buf)
 {
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
 	u32 rc6_residency = calc_residency(dev_priv, VLV_GT_MEDIA_RC6);
 	return sysfs_emit(buf, "%u\n", rc6_residency);
 }
 
-static DEVICE_ATTR(rc6_enable, S_IRUGO, show_rc6_mask, NULL);
-static DEVICE_ATTR(rc6_residency_ms, S_IRUGO, show_rc6_ms, NULL);
-static DEVICE_ATTR(rc6p_residency_ms, S_IRUGO, show_rc6p_ms, NULL);
-static DEVICE_ATTR(rc6pp_residency_ms, S_IRUGO, show_rc6pp_ms, NULL);
-static DEVICE_ATTR(media_rc6_residency_ms, S_IRUGO, show_media_rc6_ms, NULL);
+static DEVICE_ATTR_RO(rc6_enable);
+static DEVICE_ATTR_RO(rc6_residency_ms);
+static DEVICE_ATTR_RO(rc6p_residency_ms);
+static DEVICE_ATTR_RO(rc6pp_residency_ms);
+static DEVICE_ATTR_RO(media_rc6_residency_ms);
 
 static struct attribute *rc6_attrs[] = {
 	&dev_attr_rc6_enable.attr,
Signature · 1 line
2.17.1
#1 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: use DEVICE_ATTR_RO macro

== Series Details ==

== Series Details ==

Series: drm/i915: use DEVICE_ATTR_RO macro
URL : https://patchwork.freedesktop.org/series/90730/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10147 -> Patchwork_20231
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/index.html

Known issues
------------

Here are the changes found in Patchwork_20231 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [PASS][1] -> [FAIL][2] ([i915#49])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-icl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-icl-u2/igt@[email protected]

#### Warnings ####

* igt@i915_selftest@live@execlists:
- fi-bsw-nick: [DMESG-FAIL][3] ([i915#3462]) -> [INCOMPLETE][4] ([i915#2782] / [i915#2940] / [i915#3462])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-bsw-nick/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-bsw-nick/igt@i915_selftest@[email protected]
- fi-icl-u2: [DMESG-FAIL][5] ([i915#3462]) -> [INCOMPLETE][6] ([i915#2782] / [i915#3462])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-icl-u2/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-icl-u2/igt@i915_selftest@[email protected]
- fi-tgl-u2: [DMESG-FAIL][7] ([i915#3462]) -> [INCOMPLETE][8] ([i915#3462])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-tgl-u2/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-tgl-u2/igt@i915_selftest@[email protected]

* igt@runner@aborted:
- fi-skl-6600u: [FAIL][9] ([i915#1436] / [i915#2426] / [i915#3363]) -> [FAIL][10] ([i915#1436] / [i915#3363])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-skl-6600u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-skl-6600u/igt@[email protected]
- fi-icl-u2: [FAIL][11] ([i915#2426] / [i915#2782] / [i915#3363]) -> [FAIL][12] ([i915#2782] / [i915#3363])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-icl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-icl-u2/igt@[email protected]
- fi-kbl-soraka: [FAIL][13] ([i915#1436] / [i915#2426] / [i915#3363]) -> [FAIL][14] ([i915#1436] / [i915#3363])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-kbl-soraka/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-kbl-soraka/igt@[email protected]
- fi-kbl-guc: [FAIL][15] ([i915#1436] / [i915#3363]) -> [FAIL][16] ([i915#1436] / [i915#2426] / [i915#3363])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-kbl-guc/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-kbl-guc/igt@[email protected]
- fi-skl-6700k2: [FAIL][17] ([i915#1436] / [i915#3363]) -> [FAIL][18] ([i915#1436] / [i915#2426] / [i915#3363])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/fi-skl-6700k2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/fi-skl-6700k2/igt@[email protected]

[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2782]: https://gitlab.freedesktop.org/drm/intel/issues/2782
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3462]: https://gitlab.freedesktop.org/drm/intel/issues/3462
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49

Participating hosts (45 -> 39)
------------------------------

Missing (6): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-bsw-cyan bat-adlp-4 bat-jsl-1

Build changes
-------------

* Linux: CI_DRM_10147 -> Patchwork_20231

CI-20190529: 20190529
CI_DRM_10147: f1ae7d0cb0c45bfbb601e3729fffe3f6d738aa5d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6095: 5c7b7a8e441577a00cc4e71ec0ae57af640eb92a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_20231: 03b43ed52fc3d32ff4c2acc772daf29236126971 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

03b43ed52fc3 drm/i915: use DEVICE_ATTR_RO macro

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: use DEVICE_ATTR_RO macro

In reply to YueHaibing
== Series Details ==

== Series Details ==

Series: drm/i915: use DEVICE_ATTR_RO macro
URL : https://patchwork.freedesktop.org/series/90730/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10147_full -> Patchwork_20231_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_20231_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_20231_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_20231_full:

### IGT changes ###

#### Possible regressions ####

* igt@kms_plane_lowres@pipe-c-tiling-y:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb5/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_20231_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_create@create-clear:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#1888] / [i915#3160])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-glk6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk4/igt@[email protected]

* igt@gem_create@create-massive:
- shard-skl: NOTRUN -> [DMESG-WARN][5] ([i915#3002])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl1/igt@[email protected]

* igt@gem_ctx_persistence@clone:
- shard-snb: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#1099]) +5 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-snb7/igt@[email protected]

* igt@gem_ctx_persistence@smoketest:
- shard-tglb: [PASS][7] -> [FAIL][8] ([i915#2896])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb7/igt@[email protected]

* igt@gem_eio@in-flight-contexts-10ms:
- shard-tglb: [PASS][9] -> [TIMEOUT][10] ([i915#3063])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb5/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb2/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-apl: NOTRUN -> [FAIL][11] ([i915#2846])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl7/igt@[email protected]

* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][12] -> [FAIL][13] ([i915#2842]) +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb8/igt@gem_exec_fair@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@vcs0:
- shard-kbl: [PASS][14] -> [SKIP][15] ([fdo#109271])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl4/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_params@no-vebox:
- shard-iclb: NOTRUN -> [SKIP][16] ([fdo#109283])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@u-semaphore-user:
- shard-snb: NOTRUN -> [SKIP][17] ([fdo#109271]) +171 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-snb6/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-basic-small-copy:
- shard-skl: [PASS][18] -> [INCOMPLETE][19] ([i915#198] / [i915#3468])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl5/igt@[email protected]
- shard-kbl: [PASS][20] -> [INCOMPLETE][21] ([i915#3468])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl1/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl4/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-basic-small-copy-odd:
- shard-apl: NOTRUN -> [INCOMPLETE][22] ([i915#3468])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]
- shard-tglb: NOTRUN -> [INCOMPLETE][23] ([i915#2910] / [i915#3468])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-big-copy-xy:
- shard-glk: [PASS][24] -> [FAIL][25] ([i915#307])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-glk7/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk1/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-medium-copy-xy:
- shard-tglb: [PASS][26] -> [INCOMPLETE][27] ([i915#3468] / [i915#750])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb3/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb6/igt@[email protected]

* igt@gem_mmap_gtt@fault-concurrent:
- shard-kbl: NOTRUN -> [INCOMPLETE][28] ([i915#3468])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl1/igt@[email protected]

* igt@gem_mmap_gtt@medium-copy-xy:
- shard-glk: [PASS][29] -> [INCOMPLETE][30] ([i915#2055] / [i915#2502] / [i915#3468])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-glk4/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk3/igt@[email protected]

* igt@gem_pread@exhaustion:
- shard-apl: NOTRUN -> [WARN][31] ([i915#2658])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl8/igt@[email protected]
- shard-kbl: NOTRUN -> [WARN][32] ([i915#2658])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl1/igt@[email protected]

* igt@gem_pwrite@basic-exhaustion:
- shard-skl: NOTRUN -> [WARN][33] ([i915#2658])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl10/igt@[email protected]

* igt@gem_render_copy@yf-tiled-to-vebox-linear:
- shard-iclb: NOTRUN -> [SKIP][34] ([i915#768]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@gem_userptr_blits@dmabuf-sync:
- shard-apl: NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3323])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][36] ([i915#3002])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl7/igt@[email protected]

* igt@gen9_exec_parse@bb-oversize:
- shard-tglb: NOTRUN -> [SKIP][37] ([i915#2527])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: NOTRUN -> [SKIP][38] ([i915#658])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- shard-snb: NOTRUN -> [INCOMPLETE][39] ([i915#2782])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-snb7/igt@i915_selftest@[email protected]

* igt@kms_big_joiner@invalid-modeset:
- shard-apl: NOTRUN -> [SKIP][40] ([fdo#109271] / [i915#2705])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@[email protected]

* igt@kms_chamelium@dp-mode-timings:
- shard-snb: NOTRUN -> [SKIP][41] ([fdo#109271] / [fdo#111827]) +6 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-snb7/igt@[email protected]

* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][42] ([fdo#109271] / [fdo#111827]) +11 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl7/igt@[email protected]

* igt@kms_chamelium@vga-hpd-without-ddc:
- shard-iclb: NOTRUN -> [SKIP][43] ([fdo#109284] / [fdo#111827]) +2 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@kms_color_chamelium@pipe-c-ctm-0-5:
- shard-glk: NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk5/igt@[email protected]

* igt@kms_color_chamelium@pipe-d-ctm-0-5:
- shard-skl: NOTRUN -> [SKIP][45] ([fdo#109271] / [fdo#111827]) +2 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl2/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][46] ([fdo#109271] / [fdo#111827])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][47] ([fdo#109278] / [fdo#109284] / [fdo#111827])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb7/igt@[email protected]

* igt@kms_content_protection@dp-mst-lic-type-1:
- shard-iclb: NOTRUN -> [SKIP][48] ([i915#3116])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@kms_content_protection@lic:
- shard-apl: NOTRUN -> [TIMEOUT][49] ([i915#1319])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-32x10-rapid-movement:
- shard-tglb: NOTRUN -> [SKIP][50] ([i915#3359])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-128x42-random:
- shard-apl: NOTRUN -> [FAIL][51] ([i915#3444])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-512x512-sliding:
- shard-tglb: NOTRUN -> [SKIP][52] ([fdo#109279] / [i915#3359])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-32x32-offscreen:
- shard-tglb: NOTRUN -> [SKIP][53] ([i915#3319])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-32x32-rapid-movement:
- shard-iclb: NOTRUN -> [SKIP][54] ([fdo#109278]) +10 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-iclb: NOTRUN -> [SKIP][55] ([fdo#109274] / [fdo#109278])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipb-varying-size:
- shard-tglb: NOTRUN -> [SKIP][56] ([fdo#111825]) +2 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-skl: [PASS][57] -> [FAIL][58] ([i915#2346])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl3/igt@[email protected]

* igt@kms_flip@2x-flip-vs-dpms-off-vs-modeset-interruptible:
- shard-iclb: NOTRUN -> [SKIP][59] ([fdo#109274]) +1 similar issue
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb7/igt@[email protected]

* igt@kms_flip@flip-vs-suspend@c-dp1:
- shard-kbl: [PASS][60] -> [DMESG-WARN][61] ([i915#180]) +6 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl4/igt@kms_flip@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack-mmap-gtt:
- shard-skl: NOTRUN -> [SKIP][62] ([fdo#109271]) +42 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl10/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff:
- shard-iclb: NOTRUN -> [SKIP][63] ([fdo#109280]) +8 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-pri-indfb-multidraw:
- shard-glk: NOTRUN -> [SKIP][64] ([fdo#109271]) +11 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk5/igt@[email protected]

* igt@kms_panel_fitting@legacy:
- shard-kbl: NOTRUN -> [SKIP][65] ([fdo#109271]) +30 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- shard-apl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#533]) +2 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl8/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][67] ([fdo#109271] / [i915#533])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl1/igt@[email protected]

* igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
- shard-skl: NOTRUN -> [SKIP][68] ([fdo#109271] / [i915#533])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl10/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][69] ([i915#265])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
- shard-apl: NOTRUN -> [FAIL][70] ([fdo#108145] / [i915#265])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
- shard-apl: NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#658]) +4 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: NOTRUN -> [SKIP][72] ([fdo#109441])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@kms_psr@psr2_cursor_mmap_gtt.html

* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: NOTRUN -> [DMESG-WARN][73] ([i915#180] / [i915#295])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@[email protected]

* igt@kms_writeback@writeback-fb-id:
- shard-apl: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#2437])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl7/igt@[email protected]

* igt@nouveau_crc@pipe-d-source-rg:
- shard-tglb: NOTRUN -> [SKIP][75] ([i915#2530])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@perf@polling-small-buf:
- shard-skl: [PASS][76] -> [FAIL][77] ([i915#1722])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl7/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl3/igt@[email protected]

* igt@perf_pmu@event-wait@rcs0:
- shard-iclb: NOTRUN -> [SKIP][78] ([fdo#112283])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@perf_pmu@[email protected]

* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-apl: NOTRUN -> [SKIP][79] ([fdo#109271]) +177 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html

* igt@prime_nv_api@nv_self_import:
- shard-iclb: NOTRUN -> [SKIP][80] ([fdo#109291]) +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@prime_nv_api@nv_self_import.html

* igt@sysfs_clients@sema-10:
- shard-apl: NOTRUN -> [SKIP][81] ([fdo#109271] / [i915#2994]) +2 similar issues
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]

* igt@sysfs_clients@sema-50:
- shard-skl: NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#2994])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl10/igt@[email protected]

#### Possible fixes ####

* igt@drm_import_export@prime:
- shard-tglb: [INCOMPLETE][83] ([i915#750]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb2/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb1/igt@[email protected]

* igt@gem_exec_fair@basic-none@vcs1:
- shard-kbl: [FAIL][85] ([i915#2842]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl2/igt@gem_exec_fair@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [FAIL][87] ([i915#2849]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb6/igt@gem_exec_fair@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb4/igt@gem_exec_fair@[email protected]

* igt@gem_mmap_gtt@big-copy-xy:
- shard-skl: [FAIL][89] ([i915#307]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl2/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl1/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-basic-small-copy-odd:
- shard-glk: [INCOMPLETE][91] ([i915#2055] / [i915#3468]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-glk7/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk5/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-basic-small-copy-xy:
- shard-iclb: [INCOMPLETE][93] ([i915#3468]) -> [PASS][94]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb3/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb6/igt@[email protected]

* igt@gem_mmap_gtt@cpuset-big-copy-xy:
- shard-iclb: [FAIL][95] ([i915#2428]) -> [PASS][96]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb7/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb7/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@b-dp1:
- shard-apl: [DMESG-WARN][97] ([i915#180]) -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl3/igt@kms_flip@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@kms_flip@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][99] ([i915#1188]) -> [PASS][100] +1 similar issue
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl4/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl9/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][101] ([i915#180]) -> [PASS][102] +5 similar issues
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl7/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@[email protected]
- shard-skl: [INCOMPLETE][103] ([i915#198]) -> [PASS][104]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl10/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][105] ([fdo#108145] / [i915#265]) -> [PASS][106] +1 similar issue
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl1/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl7/igt@[email protected]

* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][107] ([fdo#109441]) -> [PASS][108]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-skl: [INCOMPLETE][109] ([i915#198] / [i915#2828]) -> [PASS][110]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl3/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl10/igt@[email protected]

* igt@perf@polling-parameterized:
- shard-skl: [FAIL][111] ([i915#1542]) -> [PASS][112]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl7/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl4/igt@[email protected]

#### Warnings ####

* igt@gem_exec_fair@basic-pace@vecs0:
- shard-kbl: [FAIL][113] ([i915#2842]) -> [SKIP][114] ([fdo#109271])
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-kbl4/igt@gem_exec_fair@[email protected]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-kbl3/igt@gem_exec_fair@[email protected]

* igt@gem_mmap_gtt@cpuset-basic-small-copy-odd:
- shard-skl: [INCOMPLETE][115] ([i915#198] / [i915#2910] / [i915#3468]) -> [INCOMPLETE][116] ([i915#198] / [i915#2910])
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-skl9/igt@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-skl3/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][117] ([i915#1804] / [i915#2684]) -> [WARN][118] ([i915#2684])
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb6/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb5/igt@[email protected]

* igt@i915_selftest@live@execlists:
- shard-tglb: [DMESG-FAIL][119] ([i915#3462]) -> [INCOMPLETE][120] ([i915#3462])
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb7/igt@i915_selftest@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb3/igt@i915_selftest@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][121] ([fdo#109349]) -> [CRASH][122] ([i915#3494])
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb7/igt@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb2/igt@[email protected]

* igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled:
- shard-glk: [FAIL][123] -> [DMESG-FAIL][124] ([i915#118] / [i915#95])
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-glk9/igt@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-glk9/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3:
- shard-iclb: [SKIP][125] ([i915#658]) -> [SKIP][126] ([i915#2920]) +1 similar issue
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb8/igt@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb2/igt@[email protected]

* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:
- shard-iclb: [SKIP][127] ([i915#2920]) -> [SKIP][128] ([i915#658])
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-iclb2/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-iclb7/igt@[email protected]

* igt@runner@aborted:
- shard-apl: ([FAIL][129], [FAIL][130], [FAIL][131], [FAIL][132], [FAIL][133], [FAIL][134], [FAIL][135]) ([fdo#109271] / [i915#180] / [i915#2722] / [i915#3002] / [i915#3363]) -> ([FAIL][136], [FAIL][137], [FAIL][138], [FAIL][139], [FAIL][140]) ([i915#2722] / [i915#3002] / [i915#3363])
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl3/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl1/igt@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl8/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl7/igt@[email protected]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl2/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl6/igt@[email protected]
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-apl2/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl8/igt@[email protected]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl6/igt@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl2/igt@[email protected]
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl3/igt@[email protected]
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-apl7/igt@[email protected]
- shard-tglb: ([FAIL][141], [FAIL][142], [FAIL][143], [FAIL][144], [FAIL][145], [FAIL][146], [FAIL][147]) ([i915#1436] / [i915#2426] / [i915#2722] / [i915#2966] / [i915#3002]) -> ([FAIL][148], [FAIL][149], [FAIL][150], [FAIL][151], [FAIL][152], [FAIL][153], [FAIL][154], [FAIL][155], [FAIL][156], [FAIL][157]) ([i915#1436] / [i915#1814] / [i915#2426] / [i915#2722] / [i915#2966] / [i915#3002])
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb1/igt@[email protected]
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb3/igt@[email protected]
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb6/igt@[email protected]
[144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb7/igt@[email protected]
[145]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb7/igt@[email protected]
[146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb8/igt@[email protected]
[147]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10147/shard-tglb8/igt@[email protected]
[148]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/shard-tglb6/igt@

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20231/index.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to YueHaibing
Quoted 95 lines · YueHaibing

Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read.

---
  drivers/gpu/drm/i915/i915_pmu.c   |  8 +++-----
  drivers/gpu/drm/i915/i915_sysfs.c | 30 +++++++++++++++---------------
  2 files changed, 18 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +3 -5
index 41651ac255fa..fb215929b05b 100644
@@ -834,15 +834,13 @@ static ssize_t i915_pmu_event_show(struct device *dev,
  	return sprintf(buf, "config=0x%lx\n", eattr->val);
  }
 
-static ssize_t
-i915_pmu_get_attr_cpumask(struct device *dev,
-			  struct device_attribute *attr,
-			  char *buf)
+static ssize_t cpumask_show(struct device *dev,
+			    struct device_attribute *attr, char *buf)
  {
  	return cpumap_print_to_pagebuf(true, buf, &i915_pmu_cpumask);
  }
 
-static DEVICE_ATTR(cpumask, 0444, i915_pmu_get_attr_cpumask, NULL);
+static DEVICE_ATTR_RO(cpumask);
 
  static struct attribute *i915_cpumask_attrs[] = {
  	&dev_attr_cpumask.attr,
drivers/gpu/drm/i915/i915_sysfs.c +10 -13
index 4c6b5d52b5ca..183517d1a73d 100644
@@ -58,8 +58,8 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
  	return DIV_ROUND_CLOSEST_ULL(res, 1000);
  }
 
-static ssize_t
-show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6_enable_show(struct device *kdev,
+			       struct device_attribute *attr, char *buf)
  {
  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
  	unsigned int mask;
@@ -75,43 +75,43 @@ show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf)
  	return sysfs_emit(buf, "%x\n", mask);
  }
 
-static ssize_t
-show_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6_residency_ms_show(struct device *kdev,
+				     struct device_attribute *attr, char *buf)
  {
  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
  	u32 rc6_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6);
  	return sysfs_emit(buf, "%u\n", rc6_residency);
  }
 
-static ssize_t
-show_rc6p_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6p_residency_ms_show(struct device *kdev,
+				      struct device_attribute *attr, char *buf)
  {
  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
  	u32 rc6p_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6p);
  	return sysfs_emit(buf, "%u\n", rc6p_residency);
  }
 
-static ssize_t
-show_rc6pp_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t rc6pp_residency_ms_show(struct device *kdev,
+				       struct device_attribute *attr, char *buf)
  {
  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
  	u32 rc6pp_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6pp);
  	return sysfs_emit(buf, "%u\n", rc6pp_residency);
  }
 
-static ssize_t
-show_media_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
+static ssize_t media_rc6_residency_ms_show(struct device *kdev,
+					   struct device_attribute *attr, char *buf)
  {
  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
  	u32 rc6_residency = calc_residency(dev_priv, VLV_GT_MEDIA_RC6);
  	return sysfs_emit(buf, "%u\n", rc6_residency);
  }
 
-static DEVICE_ATTR(rc6_enable, S_IRUGO, show_rc6_mask, NULL);
-static DEVICE_ATTR(rc6_residency_ms, S_IRUGO, show_rc6_ms, NULL);
-static DEVICE_ATTR(rc6p_residency_ms, S_IRUGO, show_rc6p_ms, NULL);

drivers/gpu/drm/i915/i915_sysfs.c show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf) · line 117

Quoted 10 lines
drivers/gpu/drm/i915/i915_sysfs.c +5 -2
-static DEVICE_ATTR(rc6pp_residency_ms, S_IRUGO, show_rc6pp_ms, NULL);
-static DEVICE_ATTR(media_rc6_residency_ms, S_IRUGO, show_media_rc6_ms, NULL);
+static DEVICE_ATTR_RO(rc6_enable);
+static DEVICE_ATTR_RO(rc6_residency_ms);
+static DEVICE_ATTR_RO(rc6p_residency_ms);
+static DEVICE_ATTR_RO(rc6pp_residency_ms);
+static DEVICE_ATTR_RO(media_rc6_residency_ms);
 
  static struct attribute *rc6_attrs[] = {
  	&dev_attr_rc6_enable.attr,

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 100 lines · Tvrtko Ursulin
Quoted 98 lines · YueHaibing

Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read.

---
  drivers/gpu/drm/i915/i915_pmu.c   |  8 +++----- drivers/gpu/drm/i915/i915_sysfs.c | 30 +++++++++++++++---------------

  2 files changed, 18 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +3 -5
index 41651ac255fa..fb215929b05b 100644
@@ -834,15 +834,13 @@ static ssize_t i915_pmu_event_show(struct device 
 *dev,
       return sprintf(buf, "config=0x%lx\n", eattr->val);
   }
-static ssize_t
-i915_pmu_get_attr_cpumask(struct device *dev,
-              struct device_attribute *attr,
-              char *buf)
+static ssize_t cpumask_show(struct device *dev,
+                struct device_attribute *attr, char *buf)
   {
       return cpumap_print_to_pagebuf(true, buf, &i915_pmu_cpumask);
   }
-static DEVICE_ATTR(cpumask, 0444, i915_pmu_get_attr_cpumask, NULL);
+static DEVICE_ATTR_RO(cpumask);
   static struct attribute *i915_cpumask_attrs[] = {
       &dev_attr_cpumask.attr,
drivers/gpu/drm/i915/i915_sysfs.c +2 -2
index 4c6b5d52b5ca..183517d1a73d 100644
@@ -58,8 +58,8 @@ static u32 calc_residency(struct drm_i915_private 
 *dev_priv,
       return DIV_ROUND_CLOSEST_ULL(res, 1000);
   }
-static ssize_t
-show_rc6_mask(struct device *kdev, struct device_attribute *attr, 
 char *buf)
+static ssize_t rc6_enable_show(struct device *kdev,
+                   struct device_attribute *attr, char *buf)
   {
       struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);

      unsigned int mask;

drivers/gpu/drm/i915/i915_sysfs.c +10 -13
@@ -75,43 +75,43 @@ show_rc6_mask(struct device *kdev, struct 
 device_attribute *attr, char *buf)
       return sysfs_emit(buf, "%x\n", mask);
   }
-static ssize_t
-show_rc6_ms(struct device *kdev, struct device_attribute *attr, char 
 *buf)
+static ssize_t rc6_residency_ms_show(struct device *kdev,
+                     struct device_attribute *attr, char *buf)
   {
       struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
       u32 rc6_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6);
       return sysfs_emit(buf, "%u\n", rc6_residency);
   }
-static ssize_t
-show_rc6p_ms(struct device *kdev, struct device_attribute *attr, char 
 *buf)
+static ssize_t rc6p_residency_ms_show(struct device *kdev,
+                      struct device_attribute *attr, char *buf)
   {
       struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
       u32 rc6p_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6p);
       return sysfs_emit(buf, "%u\n", rc6p_residency);
   }
-static ssize_t
-show_rc6pp_ms(struct device *kdev, struct device_attribute *attr, 
 char *buf)
+static ssize_t rc6pp_residency_ms_show(struct device *kdev,
+                       struct device_attribute *attr, char *buf)
   {
       struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
       u32 rc6pp_residency = calc_residency(dev_priv, GEN6_GT_GFX_RC6pp);
       return sysfs_emit(buf, "%u\n", rc6pp_residency);
   }
-static ssize_t
-show_media_rc6_ms(struct device *kdev, struct device_attribute *attr, 
 char *buf)
+static ssize_t media_rc6_residency_ms_show(struct device *kdev,
+                       struct device_attribute *attr, char *buf)
   {
       struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
       u32 rc6_residency = calc_residency(dev_priv, VLV_GT_MEDIA_RC6);
       return sysfs_emit(buf, "%u\n", rc6_residency);
   }
-static DEVICE_ATTR(rc6_enable, S_IRUGO, show_rc6_mask, NULL);
-static DEVICE_ATTR(rc6_residency_ms, S_IRUGO, show_rc6_ms, NULL);
-static DEVICE_ATTR(rc6p_residency_ms, S_IRUGO, show_rc6p_ms, NULL);
-static DEVICE_ATTR(rc6pp_residency_ms, S_IRUGO, show_rc6pp_ms, NULL);
-static DEVICE_ATTR(media_rc6_residency_ms, S_IRUGO, 
 show_media_rc6_ms, NULL);
+static DEVICE_ATTR_RO(rc6_enable);
+static DEVICE_ATTR_RO(rc6_residency_ms);
Quoted 8 lines

drivers/gpu/drm/i915/i915_sysfs.c show_rc6_mask(struct device *kdev, struct device_attribute *attr, char *buf) · line 117

Quoted 6 lines
drivers/gpu/drm/i915/i915_sysfs.c +3 -0
+static DEVICE_ATTR_RO(rc6p_residency_ms);
+static DEVICE_ATTR_RO(rc6pp_residency_ms);
+static DEVICE_ATTR_RO(media_rc6_residency_ms);
   static struct attribute *rc6_attrs[] = {
       &dev_attr_rc6_enable.attr,

Pushed thanks for the patch!

Regards,

Tvrtko