diff options
| author | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2025-06-04 12:47:24 +0200 |
|---|---|---|
| committer | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2025-06-04 13:04:33 +0200 |
| commit | 7010271008cc2888e376bf50c94f0e99dbd61fef (patch) | |
| tree | bbe3ab76b1310b9ca0932284e537d8c1108ccce0 | |
| parent | 4a6c3438a151420c9ecd3957623c3ee4650e01c5 (diff) | |
Revert "drm/imx: imx8mp-ldb: Remove fixed pixel clock constraint"
The removal of the fixed pixel clock constraint caused the 10-inch panel
to stop working.
Revert downstream only commit 58717572b9420e79d2e2f5fa9a58454fa6d89ee9.
Upstream-Status: Inappropriate [other]
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
| -rw-r--r-- | drivers/gpu/drm/imx/imx8mp-ldb.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/imx8mp-ldb.c b/drivers/gpu/drm/imx/imx8mp-ldb.c index 55dbafa863cf..e3f5c5e6e842 100644 --- a/drivers/gpu/drm/imx/imx8mp-ldb.c +++ b/drivers/gpu/drm/imx/imx8mp-ldb.c @@ -186,6 +186,15 @@ imx8mp_ldb_encoder_atomic_check(struct drm_encoder *encoder, return -EINVAL; } + /* + * Due to limited video PLL frequency points on i.MX8mp, + * we do mode fixup here in case any mode is unsupported. + */ + if (ldb->dual) + mode->clock = mode->clock > 100000 ? 148500 : 74250; + else + mode->clock = 74250; + return 0; } @@ -203,6 +212,16 @@ imx8mp_ldb_encoder_mode_valid(struct drm_encoder *encoder, if (ldb_ch->panel) return MODE_OK; + /* + * Due to limited video PLL frequency points on i.MX8mp, + * we do mode valid check here. + */ + if (ldb->dual && mode->clock != 74250 && mode->clock != 148500) + return MODE_NOCLOCK; + + if (!ldb->dual && mode->clock != 74250) + return MODE_NOCLOCK; + return MODE_OK; } |
