Skip to content

Commit 7dbcbce

Browse files
joabreuboddob
authored andcommitted
drm/bridge: analogix-anx78xx: Use bridge->mode_valid() callback
Now that we have a callback to check if bridge supports a given mode we can use it in Analogix bridge so that we restrict the number of probbed modes to the ones we can actually display. Also, there is no need to use mode_fixup() callback as mode_valid() will handle the mode validation. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1d0ed1858ae56c827bd09cc1fa6ff4a05d1530eb.1495720737.git.joabreu@synopsys.com
1 parent faf94a0 commit 7dbcbce

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎drivers/gpu/drm/bridge/analogix-anx78xx.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,18 +1061,18 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
10611061
return 0;
10621062
}
10631063

1064-
static bool anx78xx_bridge_mode_fixup(struct drm_bridge *bridge,
1065-
const struct drm_display_mode *mode,
1066-
struct drm_display_mode *adjusted_mode)
1064+
static enum drm_mode_status
1065+
anx78xx_bridge_mode_valid(struct drm_bridge *bridge,
1066+
const struct drm_display_mode *mode)
10671067
{
10681068
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
1069-
return false;
1069+
return MODE_NO_INTERLACE;
10701070

10711071
/* Max 1200p at 5.4 Ghz, one lane */
10721072
if (mode->clock > 154000)
1073-
return false;
1073+
return MODE_CLOCK_HIGH;
10741074

1075-
return true;
1075+
return MODE_OK;
10761076
}
10771077

10781078
static void anx78xx_bridge_disable(struct drm_bridge *bridge)
@@ -1129,7 +1129,7 @@ static void anx78xx_bridge_enable(struct drm_bridge *bridge)
11291129

11301130
static const struct drm_bridge_funcs anx78xx_bridge_funcs = {
11311131
.attach = anx78xx_bridge_attach,
1132-
.mode_fixup = anx78xx_bridge_mode_fixup,
1132+
.mode_valid = anx78xx_bridge_mode_valid,
11331133
.disable = anx78xx_bridge_disable,
11341134
.mode_set = anx78xx_bridge_mode_set,
11351135
.enable = anx78xx_bridge_enable,

0 commit comments

Comments
 (0)