summaryrefslogtreecommitdiff
path: root/patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch')
-rw-r--r--patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch b/patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch
new file mode 100644
index 00000000000..58ec0c33a56
--- /dev/null
+++ b/patches.tizen/1227-drm-exynos-hdmi-add-support-for-pixel-clock-limitati.patch
@@ -0,0 +1,83 @@
+From b0e5279f26ee004363cc83edd012aa3036b06140 Mon Sep 17 00:00:00 2001
+From: Tomasz Stanislawski <t.stanislaws@samsung.com>
+Date: Thu, 19 Dec 2013 16:24:07 +0100
+Subject: [PATCH 1227/1302] drm: exynos: hdmi: add support for pixel clock
+ limitation
+
+Adds support for limitation of maximal pixel clock of HDMI
+signal. This feature is needed on boards that contains
+lines or bridges with frequency limitations.
+
+Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
+Change-Id: I4cc38e995feeaca77b73e9ea0197d67f99d57715
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ drivers/gpu/drm/exynos/exynos_hdmi.c | 11 +++++++++++
+ include/media/s5p_hdmi.h | 1 +
+ 2 files changed, 12 insertions(+)
+
+diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
+index 87c3f42..a48cf75 100644
+--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
++++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
+@@ -201,6 +201,7 @@ struct hdmi_context {
+ struct hdmi_resources res;
+
+ int hpd_gpio;
++ u32 max_pixel_clock;
+
+ enum hdmi_type type;
+ };
+@@ -801,6 +802,8 @@ static int hdmi_check_mode(void *ctx, struct drm_display_mode *mode)
+ (mode->flags & DRM_MODE_FLAG_INTERLACE) ? true :
+ false, mode->clock * 1000);
+
++ if (mode->clock * 1000 > hdata->max_pixel_clock)
++ return -E2BIG;
+ ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
+ if (ret < 0)
+ return ret;
+@@ -1868,6 +1871,8 @@ static struct s5p_hdmi_platform_data *drm_hdmi_dt_parse_pdata
+ return NULL;
+ }
+
++ of_property_read_u32(np, "max-pixel-clock", &pd->max_pixel_clock);
++
+ return pd;
+ }
+ #else
+@@ -1934,6 +1939,11 @@ static int hdmi_probe(struct platform_device *pdev)
+ return -EINVAL;
+ }
+
++ if (!pdata->max_pixel_clock) {
++ DRM_LOG("max-pixel-clock is zero, using INF\n");
++ pdata->max_pixel_clock = ULONG_MAX;
++ }
++
+ drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx),
+ GFP_KERNEL);
+ if (!drm_hdmi_ctx)
+@@ -1964,6 +1974,7 @@ static int hdmi_probe(struct platform_device *pdev)
+ }
+
+ hdata->hpd_gpio = pdata->hpd_gpio;
++ hdata->max_pixel_clock = pdata->max_pixel_clock;
+ hdata->dev = dev;
+
+ ret = hdmi_resources_init(hdata);
+diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
+index 181642b..7272d65 100644
+--- a/include/media/s5p_hdmi.h
++++ b/include/media/s5p_hdmi.h
+@@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
+ int mhl_bus;
+ struct i2c_board_info *mhl_info;
+ int hpd_gpio;
++ u32 max_pixel_clock;
+ };
+
+ #endif /* S5P_HDMI_H */
+--
+1.8.3.2
+