summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Eichenberger <stefan.eichenberger@toradex.com>2023-01-27 15:06:14 +0100
committerStefan Eichenberger <eichest@gmail.com>2023-01-28 13:16:48 +0100
commitc0ee0193808bd52d4a518e47434c390f7904aa7f (patch)
tree96898b4d20a8c01cc758b318c8a667d8a78b2bb0 /drivers
parent268a9b96225ebd3bbf9352ee750ca45f7db8c99d (diff)
drm/imx: lcdif: crtc increase pixel clock tolerance to 10%
Set a pixel clock tolerance of 10% for the DSI interface of the i.MX 8MM SoCs. There are some resolutions e.g. 1280x1024@60 Hz that do not work without this commit. Upstream-Status: Pending This driver is not upstream and probably never will. It looks like the function will become part of mxsfb. They don't verify the pixel clock frequency there. Related-to: ELB-4728 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/imx/lcdif/lcdif-crtc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c b/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
index 195555343158..ee53652f68ef 100644
--- a/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
+++ b/drivers/gpu/drm/imx/lcdif/lcdif-crtc.c
@@ -255,7 +255,9 @@ static enum drm_mode_status lcdif_crtc_mode_valid(struct drm_crtc *crtc,
check_pix_clk:
rate = lcdif_pix_clk_round_rate(lcdif, mode->clock * 1000);
- if (rate <= 0 || rate != mode->clock * 1000)
+ /* allow +/-10% pixel clock rate shift */
+ if (rate < mode->clock * 900 ||
+ rate > mode->clock * 1100)
return MODE_BAD;
return MODE_OK;