Skip to contentSkip to conversation

drm/meson: vclk: use the correct G12A frac max value

PATCH RESEND In review Neil Armstrong 2 participants 4 messages Aug 28, 2019 – Sep 30, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 drm/meson: vclk: use the correct G12A frac max value

When calculating the HDMI PLL settings for a DMT mode PHY frequency, use the correct max fractional PLL value for G12A VPU.

With this fix, we can finally setup the 1024x768-60 mode.

Fixes 202b9808f8ed ("drm/meson: Add G12A Video Clock setup")

---
Fixed typo in commit log, 1024x76 => 1024x768

 drivers/gpu/drm/meson/meson_vclk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/meson/meson_vclk.c +7 -2
index ac491a781952..f690793ae2d5 100644
@@ -638,13 +638,18 @@ static bool meson_hdmi_pll_validate_params(struct meson_drm *priv,
 		if (frac >= HDMI_FRAC_MAX_GXBB)
 			return false;
 	} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXM) ||
-		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) ||
-		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
+		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL)) {
 		/* Empiric supported min/max dividers */
 		if (m < 106 || m > 247)
 			return false;
 		if (frac >= HDMI_FRAC_MAX_GXL)
 			return false;
+	} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
+		/* Empiric supported min/max dividers */
+		if (m < 106 || m > 247)
+			return false;
+		if (frac >= HDMI_FRAC_MAX_G12A)
+			return false;
 	}
 
 	return true;
Signature · 1 line
2.22.0
#1 lore raw

Ping, could someone review this patch ?

Neil

Quoted 29 lines · Neil Armstrong

When calculating the HDMI PLL settings for a DMT mode PHY frequency, use the correct max fractional PLL value for G12A VPU.

With this fix, we can finally setup the 1024x768-60 mode.

Fixes 202b9808f8ed ("drm/meson: Add G12A Video Clock setup")

---
Fixed typo in commit log, 1024x76 => 1024x768

 drivers/gpu/drm/meson/meson_vclk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/meson/meson_vclk.c +1 -2
index ac491a781952..f690793ae2d5 100644
@@ -638,13 +638,18 @@ static bool meson_hdmi_pll_validate_params(struct meson_drm *priv,
 		if (frac >= HDMI_FRAC_MAX_GXBB)
 			return false;
 	} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXM) ||
-		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) ||
-		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
+		   meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL)) {
 		/* Empiric supported min/max dividers */
 		if (m < 106 || m > 247)
 			return false;
 		if (frac >= HDMI_FRAC_MAX_GXL)

drivers/gpu/drm/meson/meson_vclk.c static bool meson_hdmi_pll_validate_params(struct meson_drm *priv, · line 655

Quoted 10 lines
drivers/gpu/drm/meson/meson_vclk.c +6 -0
 			return false;
+	} else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
+		/* Empiric supported min/max dividers */
+		if (m < 106 || m > 247)
+			return false;
+		if (frac >= HDMI_FRAC_MAX_G12A)
+			return false;
 	}
 
 	return true;

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Applied
#3 lore raw
Quoted 5 lines · Kevin Hilman
Quoted 3 lines · Neil Armstrong

When calculating the HDMI PLL settings for a DMT mode PHY frequency, use the correct max fractional PLL value for G12A VPU.

Quoted 7 lines
Quoted 4 lines

With this fix, we can finally setup the 1024x768-60 mode.

Fixes 202b9808f8ed ("drm/meson: Add G12A Video Clock setup")

Applied to drm-misc-next for v5.5