* [PATCH i-g-t 0/2] add support for choosing big joiner mode
@ 2024-01-12 8:55 Kunal Joshi
2024-01-12 8:55 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Kunal Joshi @ 2024-01-12 8:55 UTC (permalink / raw)
To: igt-dev; +Cc: Kunal Joshi
add support to choose big joiner mode with environment
variable, use mode with highest clock if no mode with big joiner
found.
Kunal Joshi (2):
lib/igt_kms: move bigjoiner_mode_found to lib.
lib/igt_kms: add support for choosing big joiner mode
lib/igt_kms.c | 25 ++++++++++++++++++++++++-
lib/igt_kms.h | 3 +++
tests/intel/kms_big_joiner.c | 14 ++------------
3 files changed, 29 insertions(+), 13 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib. 2024-01-12 8:55 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi @ 2024-01-12 8:55 ` Kunal Joshi 2024-01-18 9:28 ` Modem, Bhanuprakash 2024-01-12 8:55 ` [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode Kunal Joshi 2024-01-12 9:32 ` ✗ Fi.CI.BAT: failure for " Patchwork 2 siblings, 1 reply; 9+ messages in thread From: Kunal Joshi @ 2024-01-12 8:55 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi move bigjoiner_mode_found to lib/igt_kms with some modification Cc: Karthik B S <karthik.b.s@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_kms.c | 19 +++++++++++++++++++ lib/igt_kms.h | 3 +++ tests/intel/kms_big_joiner.c | 14 ++------------ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index e4dea1a60..2c55af05f 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6142,6 +6142,25 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) mode->clock > max_dotclock); } +/** + * bigjoiner_mode_found: + * @connector: libdrm connector + * @sort_method: comparator method + * @mode: libdrm mode + * + * Returns: True if big joiner found in connector modes + */ +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int (*sort_method)(const void *, const void*), + drmModeModeInfo *mode) +{ + igt_sort_connector_modes(connector, sort_method); + *mode = connector->modes[0]; + + return igt_bigjoiner_possible(mode, + igt_get_max_dotclock(drm_fd)); +} + /** * igt_check_bigjoiner_support: * @display: a pointer to an #igt_display_t structure diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b3882808b..9f5676d35 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -1212,6 +1212,9 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, igt_output_t *output, int bpc); int igt_get_max_dotclock(int fd); bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int (*sort_method)(const void *, const void*), + drmModeModeInfo *mode); bool igt_check_bigjoiner_support(igt_display_t *display); bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); bool intel_pipe_output_combo_valid(igt_display_t *display); diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c index aba2adfbe..1858c6362 100644 --- a/tests/intel/kms_big_joiner.c +++ b/tests/intel/kms_big_joiner.c @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) igt_display_commit2(display, COMMIT_ATOMIC); } -static bool bigjoiner_mode_found(drmModeConnector *connector, - int (*sort_method)(const void *, const void*), - drmModeModeInfo *mode) -{ - igt_sort_connector_modes(connector, sort_method); - *mode = connector->modes[0]; - - return igt_bigjoiner_possible(mode, max_dotclock); -} - igt_main { data_t data; @@ -235,8 +225,8 @@ igt_main * Bigjoiner will come in to the picture when the * resolution > 5K or clock > max-dot-clock. */ - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? + found = (bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_res_dsc, &mode) || + bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_clk_dsc, &mode)) ? true : false; if (found) { -- 2.25.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib. 2024-01-12 8:55 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi @ 2024-01-18 9:28 ` Modem, Bhanuprakash 0 siblings, 0 replies; 9+ messages in thread From: Modem, Bhanuprakash @ 2024-01-18 9:28 UTC (permalink / raw) To: Kunal Joshi, igt-dev Hi Kunal, On 12-01-2024 02:25 pm, Kunal Joshi wrote: > move bigjoiner_mode_found to lib/igt_kms with some modification > > Cc: Karthik B S <karthik.b.s@intel.com> > Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> > Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> > --- > lib/igt_kms.c | 19 +++++++++++++++++++ > lib/igt_kms.h | 3 +++ > tests/intel/kms_big_joiner.c | 14 ++------------ > 3 files changed, 24 insertions(+), 12 deletions(-) > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c > index e4dea1a60..2c55af05f 100644 > --- a/lib/igt_kms.c > +++ b/lib/igt_kms.c > @@ -6142,6 +6142,25 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) > mode->clock > max_dotclock); > } > > +/** > + * bigjoiner_mode_found: > + * @connector: libdrm connector > + * @sort_method: comparator method > + * @mode: libdrm mode > + * > + * Returns: True if big joiner found in connector modes > + */ > +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, > + int (*sort_method)(const void *, const void*), > + drmModeModeInfo *mode) > +{ > + igt_sort_connector_modes(connector, sort_method); > + *mode = connector->modes[0]; IMHO, Instead of calling this helper multiple times with different sort methods, let's consolidate here only. Example below: bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, int max_dotclock) { igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc); if (igt_bigjoiner_possible(&connector->modes[0], max_dotclock)) return true; igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc); return igt_bigjoiner_possible(&connector->modes[0], max_dotclock); } > + > + return igt_bigjoiner_possible(mode, > + igt_get_max_dotclock(drm_fd)); > +} > + > /** > * igt_check_bigjoiner_support: > * @display: a pointer to an #igt_display_t structure > diff --git a/lib/igt_kms.h b/lib/igt_kms.h > index b3882808b..9f5676d35 100644 > --- a/lib/igt_kms.h > +++ b/lib/igt_kms.h > @@ -1212,6 +1212,9 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, > igt_output_t *output, int bpc); > int igt_get_max_dotclock(int fd); > bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); > +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, > + int (*sort_method)(const void *, const void*), > + drmModeModeInfo *mode); > bool igt_check_bigjoiner_support(igt_display_t *display); > bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); > bool intel_pipe_output_combo_valid(igt_display_t *display); > diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c > index aba2adfbe..1858c6362 100644 > --- a/tests/intel/kms_big_joiner.c > +++ b/tests/intel/kms_big_joiner.c > @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) > igt_display_commit2(display, COMMIT_ATOMIC); > } > > -static bool bigjoiner_mode_found(drmModeConnector *connector, > - int (*sort_method)(const void *, const void*), > - drmModeModeInfo *mode) > -{ > - igt_sort_connector_modes(connector, sort_method); > - *mode = connector->modes[0]; > - > - return igt_bigjoiner_possible(mode, max_dotclock); > -} > - > igt_main > { > data_t data; > @@ -235,8 +225,8 @@ igt_main > * Bigjoiner will come in to the picture when the > * resolution > 5K or clock > max-dot-clock. > */ > - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || > - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? > + found = (bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_res_dsc, &mode) || > + bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_clk_dsc, &mode)) ? > true : false; > > if (found) { ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode 2024-01-12 8:55 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi 2024-01-12 8:55 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi @ 2024-01-12 8:55 ` Kunal Joshi 2024-01-12 9:32 ` ✗ Fi.CI.BAT: failure for " Patchwork 2 siblings, 0 replies; 9+ messages in thread From: Kunal Joshi @ 2024-01-12 8:55 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi 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@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* ✗ Fi.CI.BAT: failure for add support for choosing big joiner mode 2024-01-12 8:55 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi 2024-01-12 8:55 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 2024-01-12 8:55 ` [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode Kunal Joshi @ 2024-01-12 9:32 ` Patchwork 2 siblings, 0 replies; 9+ messages in thread From: Patchwork @ 2024-01-12 9:32 UTC (permalink / raw) To: Kunal Joshi; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 2627 bytes --] == Series Details == Series: add support for choosing big joiner mode URL : https://patchwork.freedesktop.org/series/128706/ State : failure == Summary == CI Bug Log - changes from IGT_7671 -> IGTPW_10522 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_10522 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_10522, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10522/index.html Participating hosts (39 -> 14) ------------------------------ ERROR: It appears as if the changes made in IGTPW_10522 prevented too many machines from booting. Missing (25): fi-rkl-11600 fi-snb-2520m bat-rpls-3 fi-pnv-d510 fi-blb-e6850 fi-skl-6600u fi-bsw-n3050 bat-adlm-1 fi-ilk-650 fi-ivb-3770 fi-elk-e7500 fi-bsw-nick fi-kbl-7567u bat-dg1-7 bat-kbl-2 bat-adlp-9 fi-cfl-8700k bat-mtlp-8 bat-jsl-1 fi-tgl-1115g4 fi-cfl-guc fi-kbl-guc fi-cfl-8109u bat-dg2-14 bat-dg2-13 Known issues ------------ Here are the changes found in IGTPW_10522 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_selftest@live@reset: - fi-apl-guc: [PASS][1] -> [DMESG-WARN][2] ([i915#9730]) +31 other tests dmesg-warn [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7671/fi-apl-guc/igt@i915_selftest@live@reset.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10522/fi-apl-guc/igt@i915_selftest@live@reset.html * igt@i915_suspend@basic-s2idle-without-i915: - fi-apl-guc: [PASS][3] -> [DMESG-WARN][4] ([i915#180] / [i915#1982]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7671/fi-apl-guc/igt@i915_suspend@basic-s2idle-without-i915.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10522/fi-apl-guc/igt@i915_suspend@basic-s2idle-without-i915.html [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180 [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982 [i915#9730]: https://gitlab.freedesktop.org/drm/intel/issues/9730 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7671 -> IGTPW_10522 CI-20190529: 20190529 CI_DRM_14116: 3b92a66f4bc89f4fa6e9e9369ac8243e23670030 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_10522: 10522 IGT_7671: 7671 == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10522/index.html [-- Attachment #2: Type: text/html, Size: 3274 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 0/2] add support for choosing big joiner mode @ 2024-01-15 10:58 Kunal Joshi 2024-01-15 10:58 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 0 siblings, 1 reply; 9+ messages in thread From: Kunal Joshi @ 2024-01-15 10:58 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi add support to choose big joiner mode with environment variable, use mode with highest clock if no mode with big joiner found. Kunal Joshi (2): lib/igt_kms: move bigjoiner_mode_found to lib. lib/igt_kms: add support for choosing big joiner mode lib/igt_kms.c | 42 +++++++++++++++++++++++++++++++----- lib/igt_kms.h | 3 +++ tests/intel/kms_big_joiner.c | 14 ++---------- 3 files changed, 42 insertions(+), 17 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib. 2024-01-15 10:58 [PATCH i-g-t 0/2] " Kunal Joshi @ 2024-01-15 10:58 ` Kunal Joshi 0 siblings, 0 replies; 9+ messages in thread From: Kunal Joshi @ 2024-01-15 10:58 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi move bigjoiner_mode_found to lib/igt_kms with some modification Cc: Karthik B S <karthik.b.s@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_kms.c | 18 ++++++++++++++++++ lib/igt_kms.h | 3 +++ tests/intel/kms_big_joiner.c | 14 ++------------ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index e4dea1a60..cb6d57c2d 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6142,6 +6142,24 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) mode->clock > max_dotclock); } +/** + * bigjoiner_mode_found: + * @connector: libdrm connector + * @sort_method: comparator method + * @mode: libdrm mode + * + * Returns: True if big joiner found in connector modes + */ +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int (*sort_method)(const void *, const void*), + drmModeModeInfo *mode, int max_dotclock) +{ + igt_sort_connector_modes(connector, sort_method); + *mode = connector->modes[0]; + + return igt_bigjoiner_possible(mode, max_dotclock); +} + /** * igt_check_bigjoiner_support: * @display: a pointer to an #igt_display_t structure diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b3882808b..d4464c51a 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -1212,6 +1212,9 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, igt_output_t *output, int bpc); int igt_get_max_dotclock(int fd); bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int (*sort_method)(const void *, const void*), + drmModeModeInfo *mode, int max_dotclock); bool igt_check_bigjoiner_support(igt_display_t *display); bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); bool intel_pipe_output_combo_valid(igt_display_t *display); diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c index aba2adfbe..80344d411 100644 --- a/tests/intel/kms_big_joiner.c +++ b/tests/intel/kms_big_joiner.c @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) igt_display_commit2(display, COMMIT_ATOMIC); } -static bool bigjoiner_mode_found(drmModeConnector *connector, - int (*sort_method)(const void *, const void*), - drmModeModeInfo *mode) -{ - igt_sort_connector_modes(connector, sort_method); - *mode = connector->modes[0]; - - return igt_bigjoiner_possible(mode, max_dotclock); -} - igt_main { data_t data; @@ -235,8 +225,8 @@ igt_main * Bigjoiner will come in to the picture when the * resolution > 5K or clock > max-dot-clock. */ - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? + found = (bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_res_dsc, &mode, max_dotclock) || + bigjoiner_mode_found(data.drm_fd, connector, sort_drm_modes_by_clk_dsc, &mode, max_dotclock)) ? true : false; if (found) { -- 2.25.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH i-g-t 0/2] add support for choosing big joiner mode @ 2024-01-18 10:46 Kunal Joshi 2024-01-18 10:46 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 0 siblings, 1 reply; 9+ messages in thread From: Kunal Joshi @ 2024-01-18 10:46 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi add support to choose big joiner mode with environment variable, use default mode if no mode with big joiner found. Kunal Joshi (2): lib/igt_kms: move bigjoiner_mode_found to lib. lib/igt_kms: add support for choosing big joiner mode lib/igt_kms.c | 38 +++++++++++++++++++++++++++++++++--- lib/igt_kms.h | 2 ++ tests/intel/kms_big_joiner.c | 14 +------------ 3 files changed, 38 insertions(+), 16 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib. 2024-01-18 10:46 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi @ 2024-01-18 10:46 ` Kunal Joshi 0 siblings, 0 replies; 9+ messages in thread From: Kunal Joshi @ 2024-01-18 10:46 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi move bigjoiner_mode_found to lib/igt_kms with some modification v2: combine both big joiner checks (Bhanu) Cc: Swati Sharma <swati2.sharma@intel.com> Cc: Karthik B S <karthik.b.s@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_kms.c | 22 ++++++++++++++++++++++ lib/igt_kms.h | 2 ++ tests/intel/kms_big_joiner.c | 14 +------------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 1b4d0d761..7a07e62f8 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6142,6 +6142,28 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) mode->clock > max_dotclock); } +/** + * bigjoiner_mode_found: + * @connector: libdrm connector + * @sort_method: comparator method + * @mode: libdrm mode + * + * Returns: True if big joiner found in connector modes + */ +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock) +{ + bool found = false; + + igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + if (!found) { + igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + } + return found; +} + /** * igt_check_bigjoiner_support: * @display: a pointer to an #igt_display_t structure diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b3882808b..488637d4b 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -1212,6 +1212,8 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, igt_output_t *output, int bpc); int igt_get_max_dotclock(int fd); bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock); bool igt_check_bigjoiner_support(igt_display_t *display); bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); bool intel_pipe_output_combo_valid(igt_display_t *display); diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c index aba2adfbe..28678b958 100644 --- a/tests/intel/kms_big_joiner.c +++ b/tests/intel/kms_big_joiner.c @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) igt_display_commit2(display, COMMIT_ATOMIC); } -static bool bigjoiner_mode_found(drmModeConnector *connector, - int (*sort_method)(const void *, const void*), - drmModeModeInfo *mode) -{ - igt_sort_connector_modes(connector, sort_method); - *mode = connector->modes[0]; - - return igt_bigjoiner_possible(mode, max_dotclock); -} - igt_main { data_t data; @@ -235,9 +225,7 @@ igt_main * Bigjoiner will come in to the picture when the * resolution > 5K or clock > max-dot-clock. */ - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? - true : false; + found = bigjoiner_mode_found(data.drm_fd, connector, max_dotclock); if (found) { data.output[count].output_id = output->id; -- 2.25.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH i-g-t 0/2] revamp big joiner test @ 2024-03-05 16:36 Kunal Joshi 2024-03-05 16:36 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 0 siblings, 1 reply; 9+ messages in thread From: Kunal Joshi @ 2024-03-05 16:36 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi big joiner outputs are statically assigned to pipe, rewrite to assign dynamically Kunal Joshi (2): lib/igt_kms: move bigjoiner_mode_found to lib tests/intel/kms_big_joiner: revamp kms_big_joiner lib/igt_kms.c | 25 +++ lib/igt_kms.h | 2 + tests/intel/kms_big_joiner.c | 402 ++++++++++++++++------------------- 3 files changed, 213 insertions(+), 216 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib 2024-03-05 16:36 [PATCH i-g-t 0/2] revamp big joiner test Kunal Joshi @ 2024-03-05 16:36 ` Kunal Joshi 0 siblings, 0 replies; 9+ messages in thread From: Kunal Joshi @ 2024-03-05 16:36 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Karthik B S, Bhanuprakash Modem move bigjoiner_mode_found to lib Cc: Karthik B S <karthik.b.s@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_kms.c | 25 +++++++++++++++++++++++++ lib/igt_kms.h | 2 ++ tests/intel/kms_big_joiner.c | 14 +------------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index e18f6fe59..63c8045c7 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6143,6 +6143,31 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) mode->clock > max_dotclock); } +/** + * bigjoiner_mode_found: + * @connector: libdrm connector + * @sort_method: comparator method + * @mode: libdrm mode + * + * Bigjoiner will come in to the picture when the + * resolution > 5K or clock > max-dot-clock. + * + * Returns: True if big joiner found in connector modes + */ +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock) +{ + bool found = false; + + igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + if (!found) { + igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + } + return found; +} + /** * igt_check_bigjoiner_support: * @display: a pointer to an #igt_display_t structure diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b3882808b..bab8487d3 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -1212,6 +1212,8 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, igt_output_t *output, int bpc); int igt_get_max_dotclock(int fd); bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock); bool igt_check_bigjoiner_support(igt_display_t *display); bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); bool intel_pipe_output_combo_valid(igt_display_t *display); diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c index aba2adfbe..28678b958 100644 --- a/tests/intel/kms_big_joiner.c +++ b/tests/intel/kms_big_joiner.c @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) igt_display_commit2(display, COMMIT_ATOMIC); } -static bool bigjoiner_mode_found(drmModeConnector *connector, - int (*sort_method)(const void *, const void*), - drmModeModeInfo *mode) -{ - igt_sort_connector_modes(connector, sort_method); - *mode = connector->modes[0]; - - return igt_bigjoiner_possible(mode, max_dotclock); -} - igt_main { data_t data; @@ -235,9 +225,7 @@ igt_main * Bigjoiner will come in to the picture when the * resolution > 5K or clock > max-dot-clock. */ - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? - true : false; + found = bigjoiner_mode_found(data.drm_fd, connector, max_dotclock); if (found) { data.output[count].output_id = output->id; -- 2.25.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH i-g-t 0/2] revamp big joiner test @ 2024-03-06 5:25 Kunal Joshi 2024-03-06 5:25 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 0 siblings, 1 reply; 9+ messages in thread From: Kunal Joshi @ 2024-03-06 5:25 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi big joiner outputs are statically assigned to pipe, rewrite to assign dynamically Kunal Joshi (2): lib/igt_kms: move bigjoiner_mode_found to lib tests/intel/kms_big_joiner: revamp kms_big_joiner lib/igt_kms.c | 25 +++ lib/igt_kms.h | 2 + tests/intel/kms_big_joiner.c | 401 ++++++++++++++++------------------- 3 files changed, 213 insertions(+), 215 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib 2024-03-06 5:25 [PATCH i-g-t 0/2] revamp big joiner test Kunal Joshi @ 2024-03-06 5:25 ` Kunal Joshi 0 siblings, 0 replies; 9+ messages in thread From: Kunal Joshi @ 2024-03-06 5:25 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Karthik B S, Bhanuprakash Modem move bigjoiner_mode_found to lib Cc: Karthik B S <karthik.b.s@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_kms.c | 25 +++++++++++++++++++++++++ lib/igt_kms.h | 2 ++ tests/intel/kms_big_joiner.c | 14 +------------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index e18f6fe59..63c8045c7 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6143,6 +6143,31 @@ bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock) mode->clock > max_dotclock); } +/** + * bigjoiner_mode_found: + * @connector: libdrm connector + * @sort_method: comparator method + * @mode: libdrm mode + * + * Bigjoiner will come in to the picture when the + * resolution > 5K or clock > max-dot-clock. + * + * Returns: True if big joiner found in connector modes + */ +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock) +{ + bool found = false; + + igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + if (!found) { + igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc); + found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock); + } + return found; +} + /** * igt_check_bigjoiner_support: * @display: a pointer to an #igt_display_t structure diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b3882808b..bab8487d3 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -1212,6 +1212,8 @@ bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe, igt_output_t *output, int bpc); int igt_get_max_dotclock(int fd); bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock); +bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector, + int max_dotclock); bool igt_check_bigjoiner_support(igt_display_t *display); bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode); bool intel_pipe_output_combo_valid(igt_display_t *display); diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c index aba2adfbe..28678b958 100644 --- a/tests/intel/kms_big_joiner.c +++ b/tests/intel/kms_big_joiner.c @@ -199,16 +199,6 @@ static void test_dual_display(data_t *data) igt_display_commit2(display, COMMIT_ATOMIC); } -static bool bigjoiner_mode_found(drmModeConnector *connector, - int (*sort_method)(const void *, const void*), - drmModeModeInfo *mode) -{ - igt_sort_connector_modes(connector, sort_method); - *mode = connector->modes[0]; - - return igt_bigjoiner_possible(mode, max_dotclock); -} - igt_main { data_t data; @@ -235,9 +225,7 @@ igt_main * Bigjoiner will come in to the picture when the * resolution > 5K or clock > max-dot-clock. */ - found = (bigjoiner_mode_found(connector, sort_drm_modes_by_res_dsc, &mode) || - bigjoiner_mode_found(connector, sort_drm_modes_by_clk_dsc, &mode)) ? - true : false; + found = bigjoiner_mode_found(data.drm_fd, connector, max_dotclock); if (found) { data.output[count].output_id = output->id; -- 2.25.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-03-06 5:14 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-12 8:55 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi 2024-01-12 8:55 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 2024-01-18 9:28 ` Modem, Bhanuprakash 2024-01-12 8:55 ` [PATCH i-g-t 2/2] lib/igt_kms: add support for choosing big joiner mode Kunal Joshi 2024-01-12 9:32 ` ✗ Fi.CI.BAT: failure for " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2024-01-15 10:58 [PATCH i-g-t 0/2] " Kunal Joshi 2024-01-15 10:58 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 2024-01-18 10:46 [PATCH i-g-t 0/2] add support for choosing big joiner mode Kunal Joshi 2024-01-18 10:46 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 2024-03-05 16:36 [PATCH i-g-t 0/2] revamp big joiner test Kunal Joshi 2024-03-05 16:36 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi 2024-03-06 5:25 [PATCH i-g-t 0/2] revamp big joiner test Kunal Joshi 2024-03-06 5:25 ` [PATCH i-g-t 1/2] lib/igt_kms: move bigjoiner_mode_found to lib Kunal Joshi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox