linux-stable/drivers/gpu/drm/rockchip
Thomas Hebb 43c2de1002 drm/rockchip: dsi: move all lane config except LCDC mux to bind()
When we first enable the DSI encoder, we currently program some per-chip
configuration that we look up in rk3399_chip_data based on the device
tree compatible we match. This data configures various parameters of the
MIPI lanes, including on RK3399 whether DSI1 is slaved to DSI0 in a
dual-mode configuration. It also selects which LCDC (i.e. VOP) to scan
out from.

This causes a problem in RK3399 dual-mode configurations, though: panel
prepare() callbacks run before the encoder gets enabled and expect to be
able to write commands to the DSI bus, but the bus isn't fully
functional until the lane and master/slave configuration have been
programmed. As a result, dual-mode panels (and possibly others too) fail
to turn on when the rockchipdrm driver is initially loaded.

Because the LCDC mux is the only thing we don't know until enable time
(and is the only thing that can ever change), we can actually move most
of the initialization to bind() and get it out of the way early. That's
what this change does. (Rockchip's 4.4 BSP kernel does it in mode_set(),
which also avoids the issue, but bind() seems like the more correct
place to me.)

Tested on a Google Scarlet board (Acer Chromebook Tab 10), which has a
Kingdisplay KD097D04 dual-mode panel. Prior to this change, the panel's
backlight would turn on but no image would appear when initially loading
rockchipdrm. If I kept rockchipdrm loaded and reloaded the panel driver,
it would come on. With this change, the panel successfully turns on
during initial rockchipdrm load as expected.

Fixes: 2d4f7bdafd ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver")
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/55fe7f3454d8c91dc3837ba5aa741d4a0e67378f.1618797813.git.tommyhebb@gmail.com
2021-05-28 19:50:05 +02:00
..
analogix_dp-rockchip.c
cdn-dp-core.c drm/rockchip: cdn-dp-core: add MODULE_FIRMWARE macro 2021-05-28 19:46:24 +02:00
cdn-dp-core.h
cdn-dp-reg.c
cdn-dp-reg.h
dw-mipi-dsi-rockchip.c drm/rockchip: dsi: move all lane config except LCDC mux to bind() 2021-05-28 19:50:05 +02:00
dw_hdmi-rockchip.c drm/rockchip: dw_hdmi: fix incorrect clock in vpll clock error message 2020-11-29 17:39:21 +01:00
inno_hdmi.c
inno_hdmi.h
Kconfig drm/rockchip: fix typo in Kconfig 's/HDMI/dsi/' 2020-11-29 17:39:44 +01:00
Makefile
rk3066_hdmi.c
rk3066_hdmi.h
rockchip_drm_drv.c drm/rockchip: remove existing generic drivers to take over the device 2021-05-28 15:57:19 +02:00
rockchip_drm_drv.h
rockchip_drm_fb.c
rockchip_drm_fb.h
rockchip_drm_fbdev.c
rockchip_drm_fbdev.h
rockchip_drm_gem.c drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends 2020-11-09 09:19:24 +01:00
rockchip_drm_gem.h drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends 2020-11-09 09:19:24 +01:00
rockchip_drm_vop.c drm: rockchip: set alpha_en to 0 if it is not used 2021-05-28 19:28:40 +02:00
rockchip_drm_vop.h drm/rockchip: Require the YTR modifier for AFBC 2021-02-25 10:18:45 +01:00
rockchip_lvds.c drm: use getter/setter functions 2021-02-10 14:10:59 +01:00
rockchip_lvds.h
rockchip_rgb.c drm/rockchip/rockchip_rgb: Consume our own header 2020-11-17 20:04:17 +01:00
rockchip_rgb.h
rockchip_vop_reg.c drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 2021-05-28 19:28:00 +02:00
rockchip_vop_reg.h drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 2021-05-28 19:28:00 +02:00