On 6/10/22 20:39, Lucas Stach wrote:
It doesn't always work, as there is just a single adjusted mode, so if
parts of the display pipeline disagree on the required sync polarity
it's possible to end up with a invalid config. However it also isn't
necessary for this bridge chip, as the DPI interface has a configurable
sync polarity, so we can just set it up to match the mode.

The commit message could use a rewrite, it's not easy to figure out what you're fixing here from the commit message.

[...]

-static bool tc_bridge_mode_fixup(struct drm_bridge *bridge,
-                                const struct drm_display_mode *mode,
-                                struct drm_display_mode *adj)
-{
-       /* Fixup sync polarities, both hsync and vsync are active low */
-       adj->flags = mode->flags;
-       adj->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
-       adj->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
-
-       return true;
-}

This is also called from tc_common_atomic_check() , remove it there too.

Reply via email to