OSDN Git Service

drm/edid: Fix csync detailed mode parsing
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 Feb 2023 21:36:10 +0000 (23:36 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 1 Mar 2023 12:33:15 +0000 (14:33 +0200)
commitca62297b2085b5b3168bd891ca24862242c635a1
treebca90e7c7f9d02045010e8282999e03be67e0af9
parent5abaa6835f42db7a20ff57447d60303cd81495f8
drm/edid: Fix csync detailed mode parsing

Remove the bogus csync check and replace it with something that:
- triggers for all forms of csync, not just the basic analog variant
- actually populates the mode csync flags so that drivers can
  decide what to do with the mode

Originally the code tried to outright reject csync, but that
apparently broke some bogus LCD monitor that claimed to have
a detailed mode that uses analog csync, despite also claiming
the monitor only support separate sync:
https://bugzilla.redhat.com/show_bug.cgi?id=540024
Potentially that monitor should just be quirked or something.

Anyways, what we are dealing with now is some kind of funny i915
JSL machine with eDP where the panel claims to support a sensible
60Hz separate sync mode, and a 50Hz mode with bipolar analog
csync. The 50Hz mode does not work so we want to not use it.
Easiest way is to just correctly flag it as csync and the driver
will reject it.

TODO: or should we just reject any form of csync (or at least
the analog variants) for digital display interfaces?

v2: Grab digital csync polarity from hsync polarity bit (Jani)

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8146
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230228213610.26283-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/drm_edid.c
include/drm/drm_edid.h