Message ID | 20240105-fp4-panel-v1-3-1afbabc55276@fairphone.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add display support for Fairphone 4 | expand |
On 1/5/24 15:29, Luca Weiss wrote: > Add the description for the display panel found on this phone and remove > the simple-framebuffer that was in place until now Why? They should be able to coexist with a smooth-ish handoff [...] > > +&gmu { > + status = "okay"; Please kick the disablement from the SoC dtsi instead, it won't probe without the GPU being enabled Konrad
On Wed Jan 10, 2024 at 11:58 AM CET, Konrad Dybcio wrote: > > > On 1/5/24 15:29, Luca Weiss wrote: > > Add the description for the display panel found on this phone and remove > > the simple-framebuffer that was in place until now > > Why? They should be able to coexist with a smooth-ish handoff Does that work upstream? I'm aware that downstream can do this but thought this was still missing upstream. Didn't check what happens when you have both enabled. > > [...] > > > > > +&gmu { > > + status = "okay"; > > Please kick the disablement from the SoC dtsi instead, it won't > probe without the GPU being enabled Ack, will include a patch in v2 for that. > > Konrad
On Wed, Jan 10, 2024 at 12:00:23PM +0100, Luca Weiss wrote: > On Wed Jan 10, 2024 at 11:58 AM CET, Konrad Dybcio wrote: > > > > > > On 1/5/24 15:29, Luca Weiss wrote: > > > Add the description for the display panel found on this phone and remove > > > the simple-framebuffer that was in place until now > > > > Why? They should be able to coexist with a smooth-ish handoff > > Does that work upstream? I'm aware that downstream can do this but > thought this was still missing upstream. It depends what you call smooth-ish I guess, but KMS handles the handover just fine. You're likely to get a flicker during the transition though. Either way, the DT isn't the right place to choose, you should enable both, and the distro will choose its policy through configuration. Maxime
On 1/10/24 12:23, Maxime Ripard wrote: > On Wed, Jan 10, 2024 at 12:00:23PM +0100, Luca Weiss wrote: >> On Wed Jan 10, 2024 at 11:58 AM CET, Konrad Dybcio wrote: >>> >>> >>> On 1/5/24 15:29, Luca Weiss wrote: >>>> Add the description for the display panel found on this phone and remove >>>> the simple-framebuffer that was in place until now >>> >>> Why? They should be able to coexist with a smooth-ish handoff >> >> Does that work upstream? I'm aware that downstream can do this but >> thought this was still missing upstream. > > It depends what you call smooth-ish I guess, but KMS handles the > handover just fine. You're likely to get a flicker during the transition > though. Yes, the panel driver will assert the reset pin to get the hw into a predictable state, so there will likely be a split second of black or black+garbage. Konrad
On Wed Jan 10, 2024 at 12:23 PM CET, Maxime Ripard wrote: > On Wed, Jan 10, 2024 at 12:00:23PM +0100, Luca Weiss wrote: > > On Wed Jan 10, 2024 at 11:58 AM CET, Konrad Dybcio wrote: > > > > > > > > > On 1/5/24 15:29, Luca Weiss wrote: > > > > Add the description for the display panel found on this phone and remove > > > > the simple-framebuffer that was in place until now > > > > > > Why? They should be able to coexist with a smooth-ish handoff > > > > Does that work upstream? I'm aware that downstream can do this but > > thought this was still missing upstream. > > It depends what you call smooth-ish I guess, but KMS handles the > handover just fine. You're likely to get a flicker during the transition > though. Right, seems to work. Also visually looks okay. fairphone-fp4:~$ dmesg | grep "frame buffer device" [ 0.250511] Console: switching to colour frame buffer device 135x146 [ 0.284146] simple-framebuffer a0000000.framebuffer: [drm] fb0: simpledrmdrmfb frame buffer device [ 2.576712] Console: switching to colour frame buffer device 135x146 [ 2.604907] msm_dpu ae01000.display-controller: [drm] fb0: msmdrmfb frame buffer device I thought before that having two outputs like this would cause two different framebuffers/display devices to appear, but yeah as I said seems okay. Will change in v2. Regards Luca > > Either way, the DT isn't the right place to choose, you should enable > both, and the distro will choose its policy through configuration. > > Maxime
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index ade619805519..8eb376f2db46 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -45,15 +45,6 @@ chosen { ranges; stdout-path = "serial0:115200n8"; - - framebuffer0: framebuffer@a000000 { - compatible = "simple-framebuffer"; - reg = <0 0xa0000000 0 (2340 * 1080 * 4)>; - width = <1080>; - height = <2340>; - stride = <(1080 * 4)>; - format = "a8r8g8b8"; - }; }; gpio-keys { @@ -68,6 +59,14 @@ key-volume-up { }; }; + /* Dummy regulator until PM6150L has LCDB VSP/VSN support */ + lcdb_dummy: regulator-lcdb-dummy { + compatible = "regulator-fixed"; + regulator-name = "lcdb_dummy"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + }; + reserved-memory { /* * The rmtfs memory region in downstream is 'dynamically allocated' @@ -365,6 +364,10 @@ &cdsp { status = "okay"; }; +&gmu { + status = "okay"; +}; + &gpi_dma0 { status = "okay"; }; @@ -373,6 +376,10 @@ &gpi_dma1 { status = "okay"; }; +&gpu { + status = "okay"; +}; + &i2c0 { clock-frequency = <400000>; status = "okay"; @@ -404,6 +411,43 @@ &ipa { status = "okay"; }; +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vreg_l22a>; + status = "okay"; + + panel@0 { + compatible = "fairphone,fp4-hx83112a-djn", "himax,hx83112a"; + reg = <0>; + + backlight = <&pm6150l_wled>; + reset-gpios = <&pm6150l_gpios 9 GPIO_ACTIVE_LOW>; + + vdd1-supply = <&vreg_l1e>; + vsn-supply = <&lcdb_dummy>; + vsp-supply = <&lcdb_dummy>; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in>; +}; + +&mdss_dsi0_phy { + vdds-supply = <&vreg_l18a>; + status = "okay"; +}; + &mpss { firmware-name = "qcom/sm7225/fairphone4/modem.mdt"; status = "okay";
Add the description for the display panel found on this phone and remove the simple-framebuffer that was in place until now. Unfortunately the LCDB module on PM6150L isn't yet supported upstream so we need to use a dummy regulator-fixed in the meantime. And with this done we can also enable the GPU. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> --- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 62 +++++++++++++++++++---- 1 file changed, 53 insertions(+), 9 deletions(-)