[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6joes3gufls2bx37gf2uoywyahlqprn73qfz6gfico5jxkua7z@irixdgkqp66p>
Date: Tue, 7 Oct 2025 11:05:11 +0200
From: Ondřej Jirman <megi@....cz>
To: Rudraksha Gupta <guptarud@...il.com>
Cc: Dragan Simic <dsimic@...jaro.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Heiko Stuebner <heiko@...ech.de>, devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
"Leonardo G. Trombetta" <lgtrombetta@....com>
Subject: Re: [PATCH v3 0/5] Upstreaming Pinephone Pro Patches
On Sat, Oct 04, 2025 at 09:55:19PM -0700, Rudraksha Gupta wrote:
> Awesome! I was hoping that others would comment on the testing I've done
> (especially for the accelerometer and magnetometer patches) as I can't tell
> if userspace is wrong or if my testing/conclusion is wrong. Mobile Linux is
> very early stages at the moment, and I suspect the Pinephone and Pinephone
> Pro were used as reference devices with Megi's downstream kernel. Wrong
> mount matrices in the downstream kernel might be affecting userspace. This
> means that with the corrected mount matrices in this patch series, userspace
> is slightly broken (eg. since I fixed the accelerometer, the screen in Phosh
> and KDE Plasma are upside down. I suspect KDE's Kompass and Leonardo's
> compass app might be the same if I'm changing the mount matrix for the
> magnetometer). This is why I decided to showcase the raw values in my
> testing. If my testing is incorrect, please feel free to let me know.
>
KDE Kompass uses this as an algorithm:
https://invent.kde.org/smigaud/kompass/-/blob/master/src/compass.cpp?ref_type=heads
which is largely inadequate and doesn't take mount matrix (in_mount_matrix) into
account at all. So that's not a good reference app. Also it doesn't even
claim to support "af8133j" sensor.
Leonardo's compass app has its own mount matrices, when kernel doesn't contain
one:
https://gitlab.com/lgtrombetta/compass/-/blob/main/src/compass.py?ref_type=heads
which we can also use for comaprison/confusion and is different from what your
patches are trying to upstream. :)
regards,
o.
Powered by blists - more mailing lists