* [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors
@ 2019-03-20 8:11 Neil Armstrong
2019-03-20 9:04 ` Maxime Jourdan
2019-03-25 10:20 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2019-03-20 8:11 UTC (permalink / raw)
To: daniel
Cc: dri-devel, linux-amlogic, linux-arm-kernel, linux-kernel,
Neil Armstrong, Maxime Jourdan
DMT monitors does not necessarely report a maximum TMDS clock
in a VSDB EDID extension.
In this case, all modes are wrongly rejected, including
the DRM fallback EDID.
This patch only rejects modes whith clock > max_tmds_clock if
the max_tmds_clock is specified. This will only reject
4:2:0 HDMI2.0 modes, who reports a clock > max_tmds_clock.
Reported-by: Maxime Jourdan <mjourdan@baylibre.com>
Fixes: d7d8fb7046b6 ("drm/meson: add HDMI div40 TMDS mode")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_dw_hdmi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
index e28814f4ea6c..563953ec6ad0 100644
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
@@ -569,7 +569,8 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
/* If sink max TMDS clock, we reject the mode */
- if (mode->clock > connector->display_info.max_tmds_clock)
+ if (connector->display_info.max_tmds_clock &&
+ mode->clock > connector->display_info.max_tmds_clock)
return MODE_BAD;
/* Check against non-VIC supported modes */
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors
2019-03-20 8:11 [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors Neil Armstrong
@ 2019-03-20 9:04 ` Maxime Jourdan
2019-03-25 10:20 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Jourdan @ 2019-03-20 9:04 UTC (permalink / raw)
To: Neil Armstrong
Cc: Daniel Vetter, dri-devel, linux-amlogic, linux-arm-kernel, linux-kernel
Hi Neil,
On Wed, Mar 20, 2019 at 9:11 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> DMT monitors does not necessarely report a maximum TMDS clock
> in a VSDB EDID extension.
>
> In this case, all modes are wrongly rejected, including
> the DRM fallback EDID.
>
> This patch only rejects modes whith clock > max_tmds_clock if
> the max_tmds_clock is specified. This will only reject
> 4:2:0 HDMI2.0 modes, who reports a clock > max_tmds_clock.
>
> Reported-by: Maxime Jourdan <mjourdan@baylibre.com>
> Fixes: d7d8fb7046b6 ("drm/meson: add HDMI div40 TMDS mode")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_dw_hdmi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index e28814f4ea6c..563953ec6ad0 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -569,7 +569,8 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
> DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
>
> /* If sink max TMDS clock, we reject the mode */
> - if (mode->clock > connector->display_info.max_tmds_clock)
> + if (connector->display_info.max_tmds_clock &&
> + mode->clock > connector->display_info.max_tmds_clock)
> return MODE_BAD;
>
> /* Check against non-VIC supported modes */
> --
> 2.21.0
>
Thanks, this patch restores HDMI output with my old 1080p TV which
does not specify a max tmds clock in its EDID. (all modes were
considered BAD before).
Tested-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Maxime Jourdan <mjourdan@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors
2019-03-20 8:11 [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors Neil Armstrong
2019-03-20 9:04 ` Maxime Jourdan
@ 2019-03-25 10:20 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2019-03-25 10:20 UTC (permalink / raw)
To: daniel
Cc: dri-devel, linux-amlogic, linux-arm-kernel, linux-kernel, Maxime Jourdan
On 20/03/2019 09:11, Neil Armstrong wrote:
> DMT monitors does not necessarely report a maximum TMDS clock
> in a VSDB EDID extension.
>
> In this case, all modes are wrongly rejected, including
> the DRM fallback EDID.
>
> This patch only rejects modes whith clock > max_tmds_clock if
> the max_tmds_clock is specified. This will only reject
> 4:2:0 HDMI2.0 modes, who reports a clock > max_tmds_clock.
>
> Reported-by: Maxime Jourdan <mjourdan@baylibre.com>
> Fixes: d7d8fb7046b6 ("drm/meson: add HDMI div40 TMDS mode")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_dw_hdmi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index e28814f4ea6c..563953ec6ad0 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -569,7 +569,8 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
> DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
>
> /* If sink max TMDS clock, we reject the mode */
> - if (mode->clock > connector->display_info.max_tmds_clock)
> + if (connector->display_info.max_tmds_clock &&
> + mode->clock > connector->display_info.max_tmds_clock)
> return MODE_BAD;
>
> /* Check against non-VIC supported modes */
>
Applied to drm-misc-fixes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-25 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 8:11 [PATCH] drm/meson: fix TMDS clock filtering for DMT monitors Neil Armstrong
2019-03-20 9:04 ` Maxime Jourdan
2019-03-25 10:20 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).