* [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better.
@ 2019-04-25 8:54 Maarten Lankhorst
2019-04-25 10:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2019-04-25 8:54 UTC (permalink / raw)
To: igt-dev
When running the stealing tests, we set the same mode on the eDP and
the other connector. If the eDP is 4k, we may try to set a mode that
is not supported on the other connector, which might be 1080p.
Fix this by selecting the smallest default mode, based on clock.
Hopefully this is more likely to be supported on all connectors,
instead always using the first connector's mode.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110391
---
tests/kms_setmode.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index c40c723d4c74..447da2beb5f6 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -210,11 +210,14 @@ static void get_mode_for_crtc(struct crtc_config *crtc,
}
/*
- * If none is found then just pick the default mode of the first
- * connector and hope the other connectors can support it by scaling
- * etc.
+ * If none is found then just pick the default mode from all connectors
+ * with the smallest clock, hope the other connectors can support it by
+ * scaling etc.
*/
mode = crtc->cconfs[0].default_mode;
+ for (i = 1; i < crtc->connector_count; i++)
+ if (crtc->cconfs[i].default_mode.clock < mode.clock)
+ mode = crtc->cconfs[i].default_mode;
found:
*mode_ret = mode;
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_setmode: Handle eDP with fixed mode better. 2019-04-25 8:54 [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better Maarten Lankhorst @ 2019-04-25 10:02 ` Patchwork 2019-04-25 16:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2019-05-09 14:47 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2019-04-25 10:02 UTC (permalink / raw) To: Maarten Lankhorst; +Cc: igt-dev == Series Details == Series: tests/kms_setmode: Handle eDP with fixed mode better. URL : https://patchwork.freedesktop.org/series/59930/ State : success == Summary == CI Bug Log - changes from CI_DRM_5997 -> IGTPW_2916 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/59930/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2916 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_module_load@reload: - fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/fi-blb-e6850/igt@i915_module_load@reload.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/fi-blb-e6850/igt@i915_module_load@reload.html #### Possible fixes #### * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: [DMESG-FAIL][3] ([fdo#110235 ]) -> [PASS][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html #### Warnings #### * igt@i915_pm_rpm@basic-pci-d3-state: - fi-kbl-guc: [SKIP][5] ([fdo#109271]) -> [INCOMPLETE][6] ([fdo#107807]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/fi-kbl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/fi-kbl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (42 -> 30) ------------------------------ Additional (2): fi-hsw-peppy fi-snb-2520m Missing (14): fi-kbl-soraka fi-ilk-m540 fi-bxt-dsi fi-byt-j1900 fi-bsw-cyan fi-ctg-p8600 fi-kbl-x1275 fi-bxt-j4205 fi-icl-u3 fi-pnv-d510 fi-icl-y fi-skl-lmem fi-byt-n2820 fi-byt-clapper Build changes ------------- * IGT: IGT_4963 -> IGTPW_2916 CI_DRM_5997: dd776f634b5b4ff498bd63104252a13fa15e7b89 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2916: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/ IGT_4963: 11e10bc575516c56978640fcc697c27f277c660a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_setmode: Handle eDP with fixed mode better. 2019-04-25 8:54 [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better Maarten Lankhorst 2019-04-25 10:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork @ 2019-04-25 16:52 ` Patchwork 2019-05-09 14:47 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2019-04-25 16:52 UTC (permalink / raw) To: Maarten Lankhorst; +Cc: igt-dev == Series Details == Series: tests/kms_setmode: Handle eDP with fixed mode better. URL : https://patchwork.freedesktop.org/series/59930/ State : success == Summary == CI Bug Log - changes from CI_DRM_5997_full -> IGTPW_2916_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/59930/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2916_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_tiled_swapping@non-threaded: - shard-iclb: [PASS][1] -> [FAIL][2] ([fdo#108686]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-iclb7/igt@gem_tiled_swapping@non-threaded.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-iclb7/igt@gem_tiled_swapping@non-threaded.html - shard-hsw: [PASS][3] -> [FAIL][4] ([fdo#108686]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-hsw7/igt@gem_tiled_swapping@non-threaded.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-hsw2/igt@gem_tiled_swapping@non-threaded.html * igt@gem_workarounds@suspend-resume-fd: - shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +2 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-kbl2/igt@gem_workarounds@suspend-resume-fd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-kbl6/igt@gem_workarounds@suspend-resume-fd.html * igt@i915_suspend@fence-restore-tiled2untiled: - shard-apl: [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +4 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-apl2/igt@i915_suspend@fence-restore-tiled2untiled.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-apl7/igt@i915_suspend@fence-restore-tiled2untiled.html * igt@kms_cursor_crc@cursor-128x128-dpms: - shard-kbl: [PASS][9] -> [FAIL][10] ([fdo#103232]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-kbl5/igt@kms_cursor_crc@cursor-128x128-dpms.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-kbl2/igt@kms_cursor_crc@cursor-128x128-dpms.html - shard-apl: [PASS][11] -> [FAIL][12] ([fdo#103232]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-apl4/igt@kms_cursor_crc@cursor-128x128-dpms.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-apl4/igt@kms_cursor_crc@cursor-128x128-dpms.html * igt@kms_flip@flip-vs-expired-vblank: - shard-glk: [PASS][13] -> [FAIL][14] ([fdo#102887] / [fdo#105363]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-glk5/igt@kms_flip@flip-vs-expired-vblank.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-glk1/igt@kms_flip@flip-vs-expired-vblank.html * igt@kms_frontbuffer_tracking@fbc-stridechange: - shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +5 similar issues [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-stridechange.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-stridechange.html * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping: - shard-glk: [PASS][17] -> [SKIP][18] ([fdo#109271]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-glk9/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-glk5/igt@kms_plane@pixel-format-pipe-b-planes-source-clamping.html * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format: - shard-glk: [PASS][19] -> [SKIP][20] ([fdo#109271] / [fdo#109278]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-glk9/igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-glk4/igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format.html * igt@kms_psr@psr2_cursor_blt: - shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html * igt@kms_setmode@basic: - shard-apl: [PASS][23] -> [FAIL][24] ([fdo#99912]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-apl5/igt@kms_setmode@basic.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-apl5/igt@kms_setmode@basic.html * igt@tools_test@tools_test: - shard-snb: [PASS][25] -> [SKIP][26] ([fdo#109271]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-snb5/igt@tools_test@tools_test.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-snb4/igt@tools_test@tools_test.html #### Possible fixes #### * igt@gem_eio@in-flight-suspend: - shard-kbl: [DMESG-WARN][27] ([fdo#108566]) -> [PASS][28] +4 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-kbl1/igt@gem_eio@in-flight-suspend.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-kbl5/igt@gem_eio@in-flight-suspend.html * igt@gem_eio@reset-stress: - shard-snb: [FAIL][29] ([fdo#109661]) -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-snb1/igt@gem_eio@reset-stress.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-snb1/igt@gem_eio@reset-stress.html * igt@gem_exec_schedule@out-order-render: - shard-apl: [INCOMPLETE][31] ([fdo#103927]) -> [PASS][32] [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-apl5/igt@gem_exec_schedule@out-order-render.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-apl2/igt@gem_exec_schedule@out-order-render.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw: - shard-iclb: [FAIL][33] ([fdo#103167]) -> [PASS][34] +2 similar issues [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping: - shard-glk: [SKIP][35] ([fdo#109271] / [fdo#109278]) -> [PASS][36] +2 similar issues [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-glk4/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-glk9/igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping.html * igt@kms_psr@psr2_dpms: - shard-iclb: [SKIP][37] ([fdo#109441]) -> [PASS][38] +1 similar issue [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-iclb1/igt@kms_psr@psr2_dpms.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-iclb2/igt@kms_psr@psr2_dpms.html * igt@kms_setmode@basic: - shard-kbl: [FAIL][39] ([fdo#99912]) -> [PASS][40] [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-kbl4/igt@kms_setmode@basic.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-kbl6/igt@kms_setmode@basic.html * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-apl: [DMESG-WARN][41] ([fdo#108566]) -> [PASS][42] +2 similar issues [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-apl1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-apl5/igt@kms_vblank@pipe-c-ts-continuation-suspend.html * igt@perf_pmu@rc6: - shard-kbl: [SKIP][43] ([fdo#109271]) -> [PASS][44] [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5997/shard-kbl1/igt@perf_pmu@rc6.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/shard-kbl1/igt@perf_pmu@rc6.html [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363 [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566 [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 Participating hosts (10 -> 6) ------------------------------ Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 Build changes ------------- * IGT: IGT_4963 -> IGTPW_2916 * Piglit: piglit_4509 -> None CI_DRM_5997: dd776f634b5b4ff498bd63104252a13fa15e7b89 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2916: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/ IGT_4963: 11e10bc575516c56978640fcc697c27f277c660a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2916/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better. 2019-04-25 8:54 [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better Maarten Lankhorst 2019-04-25 10:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-04-25 16:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork @ 2019-05-09 14:47 ` Ville Syrjälä 2019-06-03 16:05 ` Maarten Lankhorst 2 siblings, 1 reply; 5+ messages in thread From: Ville Syrjälä @ 2019-05-09 14:47 UTC (permalink / raw) To: Maarten Lankhorst; +Cc: igt-dev On Thu, Apr 25, 2019 at 10:54:28AM +0200, Maarten Lankhorst wrote: > When running the stealing tests, we set the same mode on the eDP and > the other connector. If the eDP is 4k, we may try to set a mode that > is not supported on the other connector, which might be 1080p. > > Fix this by selecting the smallest default mode, based on clock. > Hopefully this is more likely to be supported on all connectors, > instead always using the first connector's mode. A hardcoded small mode might work too, but this seem like a sane apporach as well. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110391 > --- > tests/kms_setmode.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c > index c40c723d4c74..447da2beb5f6 100644 > --- a/tests/kms_setmode.c > +++ b/tests/kms_setmode.c > @@ -210,11 +210,14 @@ static void get_mode_for_crtc(struct crtc_config *crtc, > } > > /* > - * If none is found then just pick the default mode of the first > - * connector and hope the other connectors can support it by scaling > - * etc. > + * If none is found then just pick the default mode from all connectors > + * with the smallest clock, hope the other connectors can support it by > + * scaling etc. > */ > mode = crtc->cconfs[0].default_mode; > + for (i = 1; i < crtc->connector_count; i++) > + if (crtc->cconfs[i].default_mode.clock < mode.clock) > + mode = crtc->cconfs[i].default_mode; I do wonder why we're making a copy of the mode here, and then another one when assigning mode_ret. Could change 'mode' to be a pointer perhaps. > found: > *mode_ret = mode; > } > -- > 2.20.1 > > _______________________________________________ > igt-dev mailing list > igt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/igt-dev -- Ville Syrjälä Intel _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better. 2019-05-09 14:47 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä @ 2019-06-03 16:05 ` Maarten Lankhorst 0 siblings, 0 replies; 5+ messages in thread From: Maarten Lankhorst @ 2019-06-03 16:05 UTC (permalink / raw) To: Ville Syrjälä; +Cc: igt-dev Op 09-05-2019 om 16:47 schreef Ville Syrjälä: > On Thu, Apr 25, 2019 at 10:54:28AM +0200, Maarten Lankhorst wrote: >> When running the stealing tests, we set the same mode on the eDP and >> the other connector. If the eDP is 4k, we may try to set a mode that >> is not supported on the other connector, which might be 1080p. >> >> Fix this by selecting the smallest default mode, based on clock. >> Hopefully this is more likely to be supported on all connectors, >> instead always using the first connector's mode. > A hardcoded small mode might work too, but this seem like a sane > apporach as well. > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110391 >> --- >> tests/kms_setmode.c | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c >> index c40c723d4c74..447da2beb5f6 100644 >> --- a/tests/kms_setmode.c >> +++ b/tests/kms_setmode.c >> @@ -210,11 +210,14 @@ static void get_mode_for_crtc(struct crtc_config *crtc, >> } >> >> /* >> - * If none is found then just pick the default mode of the first >> - * connector and hope the other connectors can support it by scaling >> - * etc. >> + * If none is found then just pick the default mode from all connectors >> + * with the smallest clock, hope the other connectors can support it by >> + * scaling etc. >> */ >> mode = crtc->cconfs[0].default_mode; >> + for (i = 1; i < crtc->connector_count; i++) >> + if (crtc->cconfs[i].default_mode.clock < mode.clock) >> + mode = crtc->cconfs[i].default_mode; > I do wonder why we're making a copy of the mode here, and then another > one when assigning mode_ret. Could change 'mode' to be a pointer > perhaps. Killed off and pushed, thanks for review. :) ~Maarten _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-03 16:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-04-25 8:54 [igt-dev] [PATCH i-g-t] tests/kms_setmode: Handle eDP with fixed mode better Maarten Lankhorst 2019-04-25 10:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-04-25 16:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2019-05-09 14:47 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä 2019-06-03 16:05 ` Maarten Lankhorst
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox