diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2021-04-29 00:29:50 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2021-05-10 16:39:54 +0200 |
commit | 94dfec48fca756cef90263a03e81f24dae24a5c6 (patch) | |
tree | 5caa755bfb7e6323a8e86c4d3ac767d74bddf996 /drivers/gpu/drm/imx/imx-ldb.c | |
parent | f4b34faa08428d813fc3629f882c503487f94a12 (diff) | |
download | linux-stable-94dfec48fca756cef90263a03e81f24dae24a5c6.tar.gz linux-stable-94dfec48fca756cef90263a03e81f24dae24a5c6.tar.bz2 linux-stable-94dfec48fca756cef90263a03e81f24dae24a5c6.zip |
drm/imx: Add 8 pixel alignment fix
Some standard resolutions like 1366x768 do not work properly with
i.MX6 SoCs, since the horizontal resolution needs to be aligned
to 8 pixels (so 1360x768 or 1368x768 would work).
This patch allocates framebuffers allocated to 8 pixels. The extra
time required to send the extra pixels are removed from the blank
time. In order to expose the correct display size to userspace,
the stride is increased without increasing the width.
Without this patch systems with this display resolution hang
indefinitely during boot up.
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20210428222953.235280-3-sebastian.reichel@collabora.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-ldb.c')
-rw-r--r-- | drivers/gpu/drm/imx/imx-ldb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index ffdc492c5bc5..53132ddf9587 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -274,6 +274,11 @@ imx_ldb_encoder_atomic_mode_set(struct drm_encoder *encoder, "%s: mode exceeds 85 MHz pixel clock\n", __func__); } + if (!IS_ALIGNED(mode->hdisplay, 8)) { + dev_warn(ldb->dev, + "%s: hdisplay does not align to 8 byte\n", __func__); + } + if (dual) { serial_clk = 3500UL * mode->clock; imx_ldb_set_clock(ldb, mux, 0, serial_clk, di_clk); |