diff options
author | Andy Yan <andy.yan@rock-chips.com> | 2014-12-05 06:30:21 (GMT) |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2015-01-07 17:31:58 (GMT) |
commit | 632d035bace26f57cd22cfc5e2a384989f8a9f50 (patch) | |
tree | 85230b1514e10e79efa462a90f292e64ff6f55e4 /drivers | |
parent | 0cd9d1428322ecf379d7c2e457fbb35105f1e4a2 (diff) | |
download | linux-632d035bace26f57cd22cfc5e2a384989f8a9f50.tar.xz |
drm: bridge/dw_hdmi: add mode_valid support
some platform may not support all the display mode,
add mode_valid interface check it
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/bridge/dw_hdmi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 61f8c1f..8ef21da 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1405,6 +1405,20 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return 0; } +static enum drm_mode_status +dw_hdmi_connector_mode_valid(struct drm_connector *connector, + struct drm_display_mode *mode) +{ + struct dw_hdmi *hdmi = container_of(connector, + struct dw_hdmi, connector); + enum drm_mode_status mode_status = MODE_OK; + + if (hdmi->plat_data->mode_valid) + mode_status = hdmi->plat_data->mode_valid(connector, mode); + + return mode_status; +} + static struct drm_encoder *dw_hdmi_connector_best_encoder(struct drm_connector *connector) { @@ -1429,6 +1443,7 @@ static struct drm_connector_funcs dw_hdmi_connector_funcs = { static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, + .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; |