All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_psr: Added ENOENT error check to psr_set for older kernels
@ 2018-09-29  0:01 Casey Bowman
  2018-10-01 13:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2018-10-02 17:50 ` [igt-dev] [PATCH i-g-t] " Dhinakaran Pandiyan
  0 siblings, 2 replies; 3+ messages in thread
From: Casey Bowman @ 2018-09-29  0:01 UTC (permalink / raw)
  To: igt-dev; +Cc: 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.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 0ddfb64f..8cb41a55 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -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");
-- 
2.19.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-02 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-29  0:01 [igt-dev] [PATCH i-g-t] lib/igt_psr: Added ENOENT error check to psr_set for older kernels Casey Bowman
2018-10-01 13:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-02 17:50 ` [igt-dev] [PATCH i-g-t] " Dhinakaran Pandiyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.