Commit 81fafb94 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Maxime Ripard

drm/sun4i: dsi: fix the overhead of the horizontal front porch

The formula in the BSP kernel indicates that a 16-byte overhead is used
when sending the HFP. However, this value is currently set to 6 in the
sun6i_mipi_dsi driver, which makes some panels flashing.

Fix this overhead value.
Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-3-icenowy@aosc.io
parent 10d8f308
...@@ -569,11 +569,12 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, ...@@ -569,11 +569,12 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
(mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
/* /*
* The frontporch is set using a blanking packet (4 * The frontporch is set using a sync event (4 bytes)
* bytes + payload + 2 bytes). Its minimal size is * and two blanking packets (each one is 4 bytes +
* therefore 6 bytes * payload + 2 bytes). Its minimal size is therefore
* 16 bytes
*/ */
#define HFP_PACKET_OVERHEAD 6 #define HFP_PACKET_OVERHEAD 16
hfp = max((unsigned int)HFP_PACKET_OVERHEAD, hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
(mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD); (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment