diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-09-07 10:09:29 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-09-08 09:08:40 +0900 |
commit | 2e32ed78c9beb5264bdaee347aa11e927f275237 (patch) | |
tree | ffc216a2d156e6d1e571410684331bc385e42f1e | |
parent | 54c938cd86acf725c576216177d2145439cc9051 (diff) | |
download | linux-exynos-submit/tizen/20160912.021917.tar.gz linux-exynos-submit/tizen/20160912.021917.tar.bz2 linux-exynos-submit/tizen/20160912.021917.zip |
drm/exynos/hdmi: workaround to check invalid modes with attached drm bridgesubmit/tizen/20160912.021917accepted/tizen/wearable/20160912.093442accepted/tizen/tv/20160912.093425accepted/tizen/mobile/20160912.093411accepted/tizen/ivi/20160912.093458accepted/tizen/common/20160912.181039
Currently, there is no way to check valid modes for bridge from
user and if the attached drm bridge, mhl adapter, does not support
a mode with fixup, then it is not possible to be set on exynos-hdmi.
So this patch adds workaround to check invalid modes with attached
drm bridge during mode_valid from exynos-hdmi.
Change-Id: I4dcd7edaa1261c1c3ed349c2dcddec226efcc6ec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 7e4f3217d0a5..9f099a078d40 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1269,6 +1269,7 @@ static int hdmi_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { struct hdmi_context *hdata = ctx_from_connector(connector); + struct drm_display_mode adjusted_mode; int ret; DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n", @@ -1280,6 +1281,14 @@ static int hdmi_mode_valid(struct drm_connector *connector, if (ret < 0) return MODE_BAD; + /* + * If attached bridge does not support a mode with fixup, then + * it cannot be set, so not valid. + */ + drm_mode_copy(&adjusted_mode, mode); + if (!drm_bridge_mode_fixup(hdata->bridge, mode, &adjusted_mode)) + return MODE_BAD; + return MODE_OK; } |