Commit 2bd0db4b authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Allow panel fixed modes to have differing sync polarities

Apparently some panels declare multiple modes with random
sync polarities. Seems a bit weird, but looks like Windows/GOP
doesn't care, so let follow suit and accept alternate fixed
modes regardless of their sync polarities.

v2: Don't pollute the DRM_ namespace with a define (Jani)

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6968Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221020093938.27200-1-ville.syrjala@linux.intel.com
parent 5988a0ac
...@@ -85,9 +85,10 @@ static bool is_alt_drrs_mode(const struct drm_display_mode *mode, ...@@ -85,9 +85,10 @@ static bool is_alt_drrs_mode(const struct drm_display_mode *mode,
static bool is_alt_fixed_mode(const struct drm_display_mode *mode, static bool is_alt_fixed_mode(const struct drm_display_mode *mode,
const struct drm_display_mode *preferred_mode) const struct drm_display_mode *preferred_mode)
{ {
return drm_mode_match(mode, preferred_mode, u32 sync_flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC |
DRM_MODE_MATCH_FLAGS | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC;
DRM_MODE_MATCH_3D_FLAGS) &&
return (mode->flags & ~sync_flags) == (preferred_mode->flags & ~sync_flags) &&
mode->hdisplay == preferred_mode->hdisplay && mode->hdisplay == preferred_mode->hdisplay &&
mode->vdisplay == preferred_mode->vdisplay; mode->vdisplay == preferred_mode->vdisplay;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment