[igt-dev] [PATCH i-g-t 07/12] chamelium: Use preferred mode when testing a single mode
Maxime Ripard
maxime.ripard at bootlin.com
Thu May 24 09:48:35 UTC 2018
On Mon, May 14, 2018 at 04:00:53PM +0200, Paul Kocialkowski wrote:
> Hi,
>
> On Tue, 2018-04-24 at 09:46 +0200, Maxime Ripard wrote:
> > The current code is testing the first mode in the connector list when it's
> > testing a single mode. While this is arbitrarily chosen, it makes more
> > sense to use the preferred mode reported by the display.
>
> The rationale behind this decision was to use the highest resolution,
> that is usually reported first, but I think your approach makes more
> sense.
>
> What happens when no mode is marked as preferred though? You put-in an
> assert here, but does the DRM API ensure that at least one is marked as
> preferred?
As far as I understood it from the EDID spec, a preferred mode is
mandatory in EDID 1.3, which is the version used by HDMI, so we don't
really need to worry about this.
> If not, we should probably fallback to selecting the first
> mode as before. This would also make things safer in case of a
> descructive interaction with the mode pruning code, where the
> recommended mode might get pruned (although that would be very
> unfortunate).
That part would be more troublesome, but I guess the current code is
just as vulnerable to this. If we prune all the modes, even the logic
to take the first one will fail.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20180524/8e2fe71d/attachment-0001.sig>
More information about the igt-dev
mailing list