aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2015-06-16 17:09:16 +0530
committerArchit Taneja <architt@codeaurora.org>2015-06-16 17:46:16 +0530
commitc8fa5ee9e52f00032523de5a0b86be112c7125c0 (patch)
tree55fc267e9390e8585fe137e2b423b6c9aec7f457
parent175f85e44653fe8cd78a7fd3dbf6f76473b1d9f8 (diff)
drm: i2c: adv7511: Restrict high pixel clock modes
Newer monitors have resolutions beyond 1080p which don't work with the adv7511. Add a 'mode_valid' connector helper func which check if we can support the given pixel clock or not. Use the same freq as already done for the encoder's mode_valid() helper when the chip is set up as a slave encoder. Signed-off-by: Archit Taneja <architt@codeaurora.org>
-rw-r--r--drivers/gpu/drm/i2c/adv7511.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c
index 8e5e5d41dc029..f3bea6752a450 100644
--- a/drivers/gpu/drm/i2c/adv7511.c
+++ b/drivers/gpu/drm/i2c/adv7511.c
@@ -909,9 +909,20 @@ static struct drm_encoder *adv7511_connector_best_encoder(struct drm_connector *
return adv7511->bridge.encoder;
}
+static enum drm_mode_status
+adv7511_connector_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+{
+ if (mode->clock > 165000)
+ return MODE_CLOCK_HIGH;
+
+ return MODE_OK;
+}
+
static struct drm_connector_helper_funcs adv7511_connector_helper_funcs = {
.get_modes = adv7511_connector_get_modes,
.best_encoder = adv7511_connector_best_encoder,
+ .mode_valid = adv7511_connector_mode_valid,
};
static enum drm_connector_status