linux/drivers/gpu/drm/sun4i
Jagan Teki 51a0d1a90b
drm/sun4i: sun6i_mipi_dsi: Fix hsync_porch overflow
Loop N1 instruction delay for burst mode devices are computed
based on horizontal sync and porch timing values.

The current driver is using u16 type for computing this hsync_porch
value, which would failed to fit within the u16 type for large sync
and porch timings devices. This would result in hsync_porch overflow
and eventually computed wrong instruction delay value.

Example, timings, where it produces the overflow
{
	.hdisplay       = 1080,
	.hsync_start    = 1080 + 408,
        .hsync_end      = 1080 + 408 + 4,
        .htotal         = 1080 + 408 + 4 + 38,
}

It reproduces the desired delay value 65487 but the correct working
value should be 7.

So, Fix it by computing hsync_porch value separately with u32 type.

Fixes: 1c1a7aa366 ("drm/sun4i: dsi: Add burst support")
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190512184128.13720-2-jagan@amarulasolutions.com
2019-05-16 10:59:19 +02:00
..
Kconfig phy: Move Allwinner A31 D-PHY driver to drivers/phy/ 2019-02-07 09:34:49 +01:00
Makefile phy: Move Allwinner A31 D-PHY driver to drivers/phy/ 2019-02-07 09:34:49 +01:00
sun4i_backend.c drm/sun4i: Rely on dma interconnect for our RAM offset 2019-04-11 09:22:47 +02:00
sun4i_backend.h drm/sun4i: Pass modifier to backend and frontend format support helpers 2018-11-27 10:12:56 +01:00
sun4i_crtc.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
sun4i_crtc.h
sun4i_dotclock.c drm/sun4i: Fix an ulong overflow in the dotclock driver 2018-10-19 11:50:25 +02:00
sun4i_dotclock.h
sun4i_drv.c drm/sun4i: Add support for A23 display pipeline 2019-01-25 10:42:07 +01:00
sun4i_drv.h
sun4i_framebuffer.c drm/sun4i: Use drm_fbdev_generic_setup() 2018-11-01 15:25:11 +01:00
sun4i_framebuffer.h drm/sun4i: Use drm_fbdev_generic_setup() 2018-11-01 15:25:11 +01:00
sun4i_frontend.c drm/sun4i: Add support for A23 display pipeline 2019-01-25 10:42:07 +01:00
sun4i_frontend.h drm/sun4i: frontend: Move the FIR filter phases to our quirks 2019-01-18 21:12:26 +01:00
sun4i_hdmi_ddc_clk.c
sun4i_hdmi_enc.c drm/sun4i: hdmi: add support for ddc-i2c-bus property 2019-04-01 11:06:41 +02:00
sun4i_hdmi_i2c.c
sun4i_hdmi_tmds_clk.c drm/sun4i: hdmi: Fix double flag assignation 2018-10-29 14:19:51 +01:00
sun4i_hdmi.h drm/sun4i: hdmi: add support for ddc-i2c-bus property 2019-04-01 11:06:41 +02:00
sun4i_layer.c drm/sun4i: layer: support just backend formats when frontend is unavailable 2019-01-25 10:41:58 +01:00
sun4i_layer.h
sun4i_lvds.c drm/sun4i: Move the panel pointer from the TCON to the encoders 2019-03-07 14:46:08 +01:00
sun4i_lvds.h
sun4i_rgb.c drm/sun4i: rgb: Change the pixel clock validation check 2019-03-07 14:46:46 +01:00
sun4i_rgb.h
sun4i_tcon.c drm/sun4i: Make some symbols static 2019-04-17 18:55:08 +02:00
sun4i_tcon.h drm/sun4i: Move the panel pointer from the TCON to the encoders 2019-03-07 14:46:08 +01:00
sun4i_tv.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
sun6i_drc.c drm/sun4i: Add support for A23 display pipeline 2019-01-25 10:42:07 +01:00
sun6i_mipi_dsi.c drm/sun4i: sun6i_mipi_dsi: Fix hsync_porch overflow 2019-05-16 10:59:19 +02:00
sun6i_mipi_dsi.h drm/sun4i: dsi: Restrict DSI tcon clock divider 2019-02-19 11:08:17 +01:00
sun8i_csc.c drm/sun4i: Add basic support for DE3 2018-11-05 11:48:23 +01:00
sun8i_csc.h
sun8i_dw_hdmi.c drm/sun4i: DW HDMI: Lower max. supported rate for H6 2019-04-05 10:44:10 +02:00
sun8i_dw_hdmi.h drm/sun4i: Add support for Synopsys HDMI PHY 2018-11-05 11:49:05 +01:00
sun8i_hdmi_phy_clk.c drm/sun4i: Add support for second clock parent to DW HDMI PHY clk driver 2018-06-27 21:44:02 +02:00
sun8i_hdmi_phy.c drm/sun4i: Fix sun8i HDMI PHY configuration for > 148.5 MHz 2019-05-16 10:44:52 +02:00
sun8i_mixer.c drm/sun4i: mixer: Simplify the get_id logic 2019-03-15 09:37:02 +01:00
sun8i_mixer.h drm/sun4i: Add VI scaler line size quirk for DE2/DE3 2019-03-01 15:30:09 +01:00
sun8i_tcon_top.c drm-misc-next for v5.2: 2019-04-24 10:12:50 +10:00
sun8i_tcon_top.h drm/sun4i: tcon-top: Add helpers for mux switching 2018-07-11 09:54:54 +02:00
sun8i_ui_layer.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
sun8i_ui_layer.h drm/sun4i: Rework DE2 register defines 2018-11-05 10:34:43 +01:00
sun8i_ui_scaler.c drm/sun4i: Add basic support for DE3 2018-11-05 11:48:23 +01:00
sun8i_ui_scaler.h drm/sun4i: Add basic support for DE3 2018-11-05 11:48:23 +01:00
sun8i_vi_layer.c drm/sun4i: Improve VI scaling for DE2/DE3 2019-03-01 15:30:22 +01:00
sun8i_vi_layer.h drm/sun4i: Improve VI scaling for DE2/DE3 2019-03-01 15:30:22 +01:00
sun8i_vi_scaler.c drm/sun4i: Add basic support for DE3 2018-11-05 11:48:23 +01:00
sun8i_vi_scaler.h drm/sun4i: Add basic support for DE3 2018-11-05 11:48:23 +01:00
sunxi_engine.h