SC7180: dsi bridge powered on too late causing panel initialization failure
I have a Duet 3 chromebook (wormdingler-sku1024
) and the internal display has stopped working since kernel v6.5. Backlight is still functional and everything else works fine, but there is no image on the display. Bisected the kernel source and 9e15123e is the problematic commit. I don't know much about linux drm so my ability to debug the driver is very limited. Added some printk statements in dsi_manager.c
, and found out dsi_mgr_bridge_mode_set()
is called before dsi_mgr_bridge_pre_enable()
, so the bridge was never even powered on at modesetting, causing panel init to fail.
Given the changes in the problematic commit, I came up with a hack that seems to fix it reliably: moving the function call for dsi_mgr_bridge_power_on()
from dsi_mgr_bridge_pre_enable()
to dsi_mgr_bridge_mode_set()
. The hack works on both v6.5 and v6.6. The proper way to fix it would probably be calling dsi_mgr_bridge_pre_enable()
before dsi_mgr_bridge_mode_set()
, but I was unable to find out where these functions are called in the drm drivers.
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 28b8012a21f2..e6482b4fb21e 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -312,12 +312,6 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
return;
- ret = dsi_mgr_bridge_power_on(bridge);
- if (ret) {
- dev_err(&msm_dsi->pdev->dev, "Power on failed: %d\n", ret);
- return;
- }
-
ret = msm_dsi_host_enable(host);
if (ret) {
pr_err("%s: enable host %d failed, %d\n", __func__, id, ret);
@@ -425,6 +419,8 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge,
msm_dsi_host_set_display_mode(host, adjusted_mode);
if (is_bonded_dsi && other_dsi)
msm_dsi_host_set_display_mode(other_dsi->host, adjusted_mode);
+
+ dsi_mgr_bridge_power_on(bridge);
}
static enum drm_mode_status dsi_mgr_bridge_mode_valid(struct drm_bridge *bridge,
Kernel v6.6 without the hack, just some printk statements after the function calls, display is completely blank:
[ 4.505554] msm_dsi ae94000.dsi: supply refgen not found, using dummy regulator
[ 4.525961] mipi-dsi ae94000.dsi.0: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000/ports/port@1/endpoint
[ 4.539286] msm_dpu ae01000.display-controller: bound ae94000.dsi (ops dsi_ops)
[ 4.546903] input: cros_ec_buttons as /devices/platform/soc@0/ac0000.geniqup/a80000.spi/spi_master/spi6/spi6.0/a80000.spi:ec@0:keyboard-controller/input/input4
[ 4.547660] msm_dpu ae01000.display-controller: bound ae90000.displayport-controller (ops dp_display_comp_ops)
[ 4.570648] cros-ec-spi spi6.0: Chrome EC device registered
[ 4.572263] adreno 5000000.gpu: supply vdd not found, using dummy regulator
[ 4.584714] adreno 5000000.gpu: supply vddcx not found, using dummy regulator
[ 4.593457] platform 506a000.gmu: Adding to iommu group 13
[ 4.599654] msm_dpu ae01000.display-controller: bound 5000000.gpu (ops a3xx_ops)
[ 4.608614] [drm:dpu_kms_hw_init:1112] dpu hardware revision:0x60020000
[ 4.617124] [drm] Initialized msm 1.10.0 20130625 for ae01000.display-controller on minor 0
[ 4.626040] msm_dpu ae01000.display-controller: Direct firmware load for qcom/a630_sqe.fw failed with error -2
[ 4.636314] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] *ERROR* failed to load a630_sqe.fw
[ 4.680477] panel-boe-tv101wum-nl6 ae94000.dsi.0: failed to write command 0
[ 4.680481] panel-boe-tv101wum-nl6 ae94000.dsi.0: failed to init panel: -22
[ 4.687534] dsi_mgr_bridge_pre_enable
[ 4.687537] msm_dsi_device_connected
[ 4.716550] dsi_mgr_bridge_power_on
[ 4.716555] msm_dsi_host_enable
[ 4.716557] enabled host1
[ 4.737002] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 4.887036] Console: switching to colour frame buffer device 250x75
[ 4.956881] msm_dpu ae01000.display-controller: [drm] fb0: msmdrmfb frame buffer device
Kernel v6.6 with the hack applied, display works as expected:
[ 4.557061] msm_dsi ae94000.dsi: supply refgen not found, using dummy regulator
[ 4.564842] mipi-dsi ae94000.dsi.0: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000/ports/port@1/endpoint
[ 4.577979] msm_dpu ae01000.display-controller: bound ae94000.dsi (ops dsi_ops)
[ 4.586985] msm_dpu ae01000.display-controller: bound ae90000.displayport-controller (ops dp_display_comp_ops)
[ 4.597992] adreno 5000000.gpu: supply vdd not found, using dummy regulator
[ 4.605199] adreno 5000000.gpu: supply vddcx not found, using dummy regulator
[ 4.614168] platform 506a000.gmu: Adding to iommu group 13
[ 4.620387] msm_dpu ae01000.display-controller: bound 5000000.gpu (ops a3xx_ops)
[ 4.629708] [drm:dpu_kms_hw_init:1112] dpu hardware revision:0x60020000
[ 4.638909] [drm] Initialized msm 1.10.0 20130625 for ae01000.display-controller on minor 0
[ 4.647725] msm_dpu ae01000.display-controller: Direct firmware load for qcom/a630_sqe.fw failed with error -2
[ 4.657994] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] *ERROR* failed to load a630_sqe.fw
[ 4.700466] dsi_mgr_bridge_power_on
[ 4.784567] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 5.001859] hub 1-1:1.0: USB hub found
[ 5.003570] hub 1-1:1.0: 4 ports detected
[ 5.069218] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 5.252427] dsi_mgr_bridge_pre_enable
[ 5.252438] msm_dsi_device_connected
[ 5.252445] msm_dsi_host_enable
[ 5.252448] enabled host1
[ 5.440427] Console: switching to colour frame buffer device 250x75
[ 5.508700] msm_dpu ae01000.display-controller: [drm] fb0: msmdrmfb frame buffer device