[PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode
Kunal Joshi
kunal1.joshi at intel.com
Fri Jan 12 08:55:47 UTC 2024
add support to choose big joiner mode with environment
variable, use mode with highest clock if no mode with big joiner
found.
v2: reuse bigjoiner_mode_found (Bhanu)
Cc: Karthik B S <karthik.b.s at intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
lib/igt_kms.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 2c55af05f..c4ecb0907 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1788,7 +1788,11 @@ bool kmstest_get_connector_default_mode(int drm_fd, drmModeConnector *connector,
* 0/lowest: Choose connector mode with lowest possible resolution.
* 1/highest: Choose connector mode with highest possible resolution.
*/
- if (!strcmp(env, "highest") || !strcmp(env, "1"))
+ if (!strcmp(env, "joiner") || !strcmp(env, "2"))
+ return bigjoiner_mode_found(drm_fd, connector, sort_drm_modes_by_clk_dsc, mode) ||
+ bigjoiner_mode_found(drm_fd, connector, sort_drm_modes_by_res_dsc, mode) ||
+ bigjoiner_mode_found(drm_fd, connector, sort_drm_modes_by_clk_dsc, mode);
+ else if (!strcmp(env, "highest") || !strcmp(env, "1"))
igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
else if (!strcmp(env, "lowest") || !strcmp(env, "0"))
igt_sort_connector_modes(connector, sort_drm_modes_by_res_asc);
--
2.25.1
More information about the igt-dev
mailing list