aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-hdmi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 3bc856cc6daa..4e1f54a675d8 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -1947,6 +1947,20 @@ static int dw_hdmi_bridge_attach(struct drm_bridge *bridge)
1947 return 0; 1947 return 0;
1948} 1948}
1949 1949
1950static bool dw_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,
1951 const struct drm_display_mode *orig_mode,
1952 struct drm_display_mode *mode)
1953{
1954 struct dw_hdmi *hdmi = bridge->driver_private;
1955 struct drm_connector *connector = &hdmi->connector;
1956 enum drm_mode_status status;
1957
1958 status = dw_hdmi_connector_mode_valid(connector, mode);
1959 if (status != MODE_OK)
1960 return false;
1961 return true;
1962}
1963
1950static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge, 1964static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
1951 struct drm_display_mode *orig_mode, 1965 struct drm_display_mode *orig_mode,
1952 struct drm_display_mode *mode) 1966 struct drm_display_mode *mode)
@@ -1988,6 +2002,7 @@ static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
1988 .enable = dw_hdmi_bridge_enable, 2002 .enable = dw_hdmi_bridge_enable,
1989 .disable = dw_hdmi_bridge_disable, 2003 .disable = dw_hdmi_bridge_disable,
1990 .mode_set = dw_hdmi_bridge_mode_set, 2004 .mode_set = dw_hdmi_bridge_mode_set,
2005 .mode_fixup = dw_hdmi_bridge_mode_fixup,
1991}; 2006};
1992 2007
1993static irqreturn_t dw_hdmi_i2c_irq(struct dw_hdmi *hdmi) 2008static irqreturn_t dw_hdmi_i2c_irq(struct dw_hdmi *hdmi)