Skip to content

drm/apple: Use preferred display mode from dcp - #597

Open
nohenry wants to merge 1 commit into
AsahiLinux:asahifrom
nohenry:preferred-dispay-mode
Open

nohenry wants to merge 1 commit into
AsahiLinux:asahifrom
nohenry:preferred-dispay-mode

Conversation

@nohenry

@nohenry nohenry commented Sep 4, 2026

Copy link
Copy Markdown

The DCP display properties contains a preferred mode flag. This patch takes that into account when picking which mode to assign DRM_MODE_TYPE_PREFERRED

Comment thread drivers/gpu/drm/apple/parser.c Outdated
@jannau

jannau commented Sep 8, 2026

Copy link
Copy Markdown
Member

Please mention explicitly in the commit message that the mode with the best score isn't necessary a preferred mode and that using one of the preferred modes is a better match for some displays. Example with a few modes from your display would be nice.

Implementation wise I wonder whether it would make sense to just add 1 << 32 to the score for preferred mode. That would avoid making the preferred mode selection more complex.

@nohenry
nohenry force-pushed the preferred-dispay-mode branch 2 times, most recently from a0eca00 to 2346dd8 Compare September 16, 2026 22:23
The DCP display properties contains a preferred mode flag. This patch takes that into account when picking which mode to assign DRM_MODE_TYPE_PREFERRED
Note: the mode with the highest DCP score isn't necessarily the best
mode, the IsPreferred flag in DCP needs to be taken into account as
well. We add (1 << 32) to the score when the preferred flag is set for
simplicity.

Signed-off-by: Oliver Clarke <oliverhenryc@gmail.com>
@nohenry
nohenry force-pushed the preferred-dispay-mode branch from 2346dd8 to 7299d2a Compare September 16, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants