Skip to content

Commit 37f163f

Browse files
committed
HACK: framebuffer scaling for several devices
Add fake panel node for simple-framebuffer to calculate DPI from. It only needs width & height specified. We can't just reference "real" panel node which is under mdss/mdp/dsi, because it will cause simplefb to probe second, after mdss and it will cause multiple issues. This fake node allows us to break device link from simplefb to mdss (implicitly via panel->mdp->mdss) to fix drm device probe ordering. Without this, simpledrm would probe second after msm-drm, and confuse userspace with 2 GPUs in /dev/dri. Alternative workaround is to boot with kernel parameter `fw_devlink=permissive`, which allows simpledrm to probe first, but it is worse, because it can hide other issues with device dependencies.
1 parent 31880b2 commit 37f163f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender-common.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@
3838
height = <2340>;
3939
stride = <(1080 * 4)>;
4040
format = "a8r8g8b8";
41+
42+
/* HACK:
43+
* Fake panel node for simple-framebuffer to calculate DPI from. Only
44+
* needs width & height specified. This allows us to break device link
45+
* from simplefb to mdss (implicitly via panel->mdp->mdss) to fix drm
46+
* device probe ordering. Without this, simpledrm would probe second
47+
* after msm-drm, and confuse userspace with 2 GPUs in /dev/dri.
48+
* Alternative workaround is to boot with kernel parameter
49+
* `fw_devlink=permissive`, which is worse, because it can hide other
50+
* issues with device dependencies.
51+
*/
52+
panel = <&fb_panel>;
53+
54+
fb_panel: fb-panel {
55+
width-mm = <67>;
56+
height-mm = <145>;
57+
};
4158
};
4259
};
4360

0 commit comments

Comments
 (0)