aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2015-10-15 09:42:17 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2015-10-30 12:13:54 -0400
commita5f4185c4b8c131c0ccafa6b1b00cd4e5413e47e (patch)
tree85ecd3c4f129bbf25fa8a4c0033b08713ce536d8 /drivers/gpu
parent9b6d0d33c848661c859ccee331b9d2c2ba74489b (diff)
drm/imx: hdmi: fix HDMI setup to allow modes larger than FullHD
This worked before the dw-hdmi bridge code was changed to validate the setup data more strictly. Add back support for modes with a pixel clock up to 216MHz. Even higher clocks should work, but we are missing the required setup data for now. Also change the mode validate callbacks to disallow modes with higher pixelclocks, so we don't end up failing the modeset later on. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/imx/dw_hdmi-imx.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index 644edf65dbe0..98605ea2ad9d 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -48,11 +48,17 @@ static const struct dw_hdmi_mpll_config imx_mpll_cfg[] = {
48 { 0x40a2, 0x000a }, 48 { 0x40a2, 0x000a },
49 }, 49 },
50 }, { 50 }, {
51 ~0UL, { 51 216000000, {
52 { 0x00a0, 0x000a }, 52 { 0x00a0, 0x000a },
53 { 0x2001, 0x000f }, 53 { 0x2001, 0x000f },
54 { 0x4002, 0x000f }, 54 { 0x4002, 0x000f },
55 }, 55 },
56 }, {
57 ~0UL, {
58 { 0x0000, 0x0000 },
59 { 0x0000, 0x0000 },
60 { 0x0000, 0x0000 },
61 },
56 } 62 }
57}; 63};
58 64
@@ -82,7 +88,7 @@ static const struct dw_hdmi_curr_ctrl imx_cur_ctr[] = {
82 */ 88 */
83static const struct dw_hdmi_phy_config imx_phy_config[] = { 89static const struct dw_hdmi_phy_config imx_phy_config[] = {
84 /*pixelclk symbol term vlev */ 90 /*pixelclk symbol term vlev */
85 { 148500000, 0x800d, 0x0005, 0x01ad}, 91 { 216000000, 0x800d, 0x0005, 0x01ad},
86 { ~0UL, 0x0000, 0x0000, 0x0000} 92 { ~0UL, 0x0000, 0x0000, 0x0000}
87}; 93};
88 94
@@ -148,7 +154,8 @@ static enum drm_mode_status imx6q_hdmi_mode_valid(struct drm_connector *con,
148{ 154{
149 if (mode->clock < 13500) 155 if (mode->clock < 13500)
150 return MODE_CLOCK_LOW; 156 return MODE_CLOCK_LOW;
151 if (mode->clock > 266000) 157 /* FIXME: Hardware is capable of 266MHz, but setup data is missing. */
158 if (mode->clock > 216000)
152 return MODE_CLOCK_HIGH; 159 return MODE_CLOCK_HIGH;
153 160
154 return MODE_OK; 161 return MODE_OK;
@@ -159,7 +166,8 @@ static enum drm_mode_status imx6dl_hdmi_mode_valid(struct drm_connector *con,
159{ 166{
160 if (mode->clock < 13500) 167 if (mode->clock < 13500)
161 return MODE_CLOCK_LOW; 168 return MODE_CLOCK_LOW;
162 if (mode->clock > 270000) 169 /* FIXME: Hardware is capable of 270MHz, but setup data is missing. */
170 if (mode->clock > 216000)
163 return MODE_CLOCK_HIGH; 171 return MODE_CLOCK_HIGH;
164 172
165 return MODE_OK; 173 return MODE_OK;