[PATCH i-g-t 5/6] lib/igt_kms: Handle EINVAL error as well

Kunal Joshi kunal1.joshi at intel.com
Fri Sep 27 14:02:21 UTC 2024


Previously, only -ENOSPC was handled, but -EINVAL
can also occur under certain conditions when the
mode can't be set.

Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
Suggested-by: Imre Deak <imre.deak at intel.com>
Reviewed-by: Imre Deak <imre.deak at intel.com>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9e15d25e6..dbd0e6262 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4927,7 +4927,7 @@ bool __override_all_active_output_modes_to_fit_bw(igt_display_t *display,
 
 		if (!ret)
 			return true;
-		else if (ret != -ENOSPC)
+		else if (ret != -ENOSPC && ret != -EINVAL)
 			return false;
 	}
 
-- 
2.40.1



More information about the igt-dev mailing list