Skip to contentSkip to conversation

lib/igt_psr: Added ENOENT error check to psr_set for older kernels

PATCH In review Casey Bowman 3 participants 3 messages Sep 29, 2018 – Oct 2, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/igt_psr: Added ENOENT error check to psr_set for older kernels

Only EINVAL was being used to account for older kernels, but on legacy kernels that don't use i915_edp_psr_debug, the ENOENT error will be thrown. This changes the logic to also account for ENOENT errors.

---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_psr.c +1 -1
index 0ddfb64f..8cb41a55 100644
@@ -103,7 +103,7 @@ static bool psr_set(int debugfs_fd, bool enable)
 		return false;
 	}
 
-	if (ret == -EINVAL) {
+	if (ret == -EINVAL || ret == -ENOENT) {
 		ret = psr_modparam_set(enable);
 	} else {
 		ret = psr_write(debugfs_fd, enable ? "0x3" : "0x1");
Signature · 6 lines
2.19.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for lib/igt_psr: Added ENOENT error check to psr_set for older kernels

== Series Details ==

== Series Details ==

Series: lib/igt_psr: Added ENOENT error check to psr_set for older kernels
URL : https://patchwork.freedesktop.org/series/50352/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4905 -> IGTPW_1884 =

== Summary - FAILURE ==

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

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

External URL: https://patchwork.freedesktop.org/api/1.0/series/50352/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@pm_rpm@module-reload:
      fi-hsw-peppy:       NOTRUN -> DMESG-WARN

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-kbl-soraka:      NOTRUN -> INCOMPLETE (fdo#107556, fdo#107774)

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_chamelium@common-hpd-after-suspend:
      fi-kbl-7500u:       NOTRUN -> DMESG-WARN (fdo#102505, fdo#105602, fdo#105079)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       NOTRUN -> DMESG-WARN (fdo#102614)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload:
      fi-glk-j4005:       DMESG-WARN (fdo#106248, fdo#106725) -> PASS

    igt@gem_exec_suspend@basic-s3:
      fi-cfl-8109u:       DMESG-WARN (fdo#107345) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cfl-8109u:       INCOMPLETE (fdo#106070) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-icl-u:           FAIL (fdo#107336) -> PASS

    igt@pm_rpm@module-reload:
      fi-glk-j4005:       DMESG-WARN (fdo#107726) -> PASS

fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105079 https://bugs.freedesktop.org/show_bug.cgi?id=105079
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107345 https://bugs.freedesktop.org/show_bug.cgi?id=107345
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107726 https://bugs.freedesktop.org/show_bug.cgi?id=107726
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774

== Participating hosts (40 -> 45) ==

Additional (12): fi-kbl-soraka fi-bdw-5557u fi-hsw-peppy fi-bdw-gvtdvm fi-skl-6260u fi-ilk-650 fi-kbl-7500u fi-kbl-guc fi-kbl-x1275 fi-gdg-551 fi-elk-e7500 fi-ivb-3520m
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 fi-ivb-3770 fi-pnv-d510

== Build changes ==

* IGT: IGT_4657 -> IGTPW_1884

CI_DRM_4905: 4d5d563418cb731acc0e628c936e77c1172ccbdb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1884: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1884/
IGT_4657: bdc8989328f57ec2e63a88c89a45440567c69eeb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1884/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw
In reply to Casey Bowman
Quoted 15 lines · PDT Casey Bowman

Only EINVAL was being used to account for older kernels, but on legacy kernels that don't use i915_edp_psr_debug, the ENOENT error will be thrown. This changes the logic to also account for ENOENT errors.

---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_psr.c +0 -0
index 0ddfb64f..8cb41a55 100644

lib/igt_psr.c static bool psr_set(int debugfs_fd, bool enable) · line 106

Quoted 5 lines
lib/igt_psr.c +1 -1
@@ -103,7 +103,7 @@ static bool psr_set(int debugfs_fd, bool enable)
 		return false;
 	}
 
-	if (ret == -EINVAL) {
+	if (ret == -EINVAL || ret == -ENOENT) {

Please move this logic to has_psr_debugfs() and expand the existing documentation about return values from the kernel.

-DK

lib/igt_psr.c static bool psr_set(int debugfs_fd, bool enable) · line 109

Quoted 3 lines
lib/igt_psr.c +0 -0
 		ret = psr_modparam_set(enable);
 	} else {
 		ret = psr_write(debugfs_fd, enable ? "0x3" : "0x1");

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev