Skip to content

Commit

Permalink
HACK: framebuffer scaling for several devices
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
minlexx committed Oct 6, 2024
1 parent f5b0f88 commit 18f27ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@
height = <2340>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";

/* HACK:
* Fake panel node for simple-framebuffer to calculate DPI from. Only
* needs width & height specified. This 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 is worse, because it can hide other
* issues with device dependencies.
*/
panel = <&fb_panel>;

fb_panel: fb-panel {
width-mm = <67>;
height-mm = <145>;
};
};
};

Expand Down

0 comments on commit 18f27ed

Please sign in to comment.