Skip to content

Commit

Permalink
drm/mediatek: Drop chain_mode_fixup call in mode_valid()
Browse files Browse the repository at this point in the history
The mode_valid implementation had a call to
drm_bridge_chain_mode_fixup() which would be wrong as the mode_valid is
not allowed to change anything - only to validate the mode.

As the next bridge is often/always a connector the call had no effect
anyway. So drop it.

From the git history I could see this call was included in the original
version of the driver so there was no help there to find out why it was
added in the first place. But a lot has changed since the initial driver
were added and is seems safe to remove the call now.

v4:
  - Link to v3: https://lore.kernel.org/dri-devel/[email protected]/
  - Rebase, and added acks/rb
v3:
  - Link to v2: https://lore.kernel.org/dri-devel/[email protected]/
v2:
  - Link to v1: https://lore.kernel.org/dri-devel/[email protected]/

Signed-off-by: Sam Ravnborg <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Acked-by: Chun-Kuang Hu <[email protected]>
Cc: Chun-Kuang Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Dafna Hirschfeld <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
sravnborg authored and robertfoss committed Jun 10, 2024
1 parent 54034be commit ac4be1e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/gpu/drm/mediatek/mtk_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,22 +1208,11 @@ mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
const struct drm_display_mode *mode)
{
struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
struct drm_bridge *next_bridge;

dev_dbg(hdmi->dev, "xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n",
mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode),
!!(mode->flags & DRM_MODE_FLAG_INTERLACE), mode->clock * 1000);

next_bridge = drm_bridge_get_next_bridge(&hdmi->bridge);
if (next_bridge) {
struct drm_display_mode adjusted_mode;

drm_mode_init(&adjusted_mode, mode);
if (!drm_bridge_chain_mode_fixup(next_bridge, mode,
&adjusted_mode))
return MODE_BAD;
}

if (hdmi->conf) {
if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
return MODE_BAD;
Expand Down

0 comments on commit ac4be1e

Please sign in to comment.