From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
krzk+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v1 9/9 RESEND] ARM: tegra: tf600t: Invert accelerometer calibration matrix
Date: Tue, 12 May 2026 03:39:56 +0000 [thread overview]
Message-ID: <20260512033957.3C988C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260511074859.24930-10-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The new `mount-matrix` for the IMU has a determinant of -1, representing an impossible physical mounting (a reflection) that converts the right-handed IMU coordinate system into a left-handed one, breaking 3D sensor fusion.
--
commit 932efe31306f429e067a9046fd4c2c18e88b38ee
Author: Svyatoslav Ryhel <clamor95@gmail.com>
ARM: tegra: tf600t: Invert accelerometer calibration matrix
IMU calibration matrix used in the device tree is inverted when testing on
the device which results in wrong screen orientation. Invert it to match
the matrix dumped from the device.
> diff --git a/arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts b/arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts
> index 0bebea0cb8c48..5c634b0f3f46a 100644
> --- a/arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts
> +++ b/arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts
> @@ -1091,9 +1091,9 @@ imu@69 {
> vdd-supply = <&vdd_3v3_sys>;
> vddio-supply = <&vdd_1v8_vio>;
>
> - mount-matrix = "0", "-1", "0",
> - "-1", "0", "0",
> - "0", "0", "-1";
> + mount-matrix = "0", "1", "0",
> + "1", "0", "0",
> + "0", "0", "1";
Does this new matrix create an impossible physical mounting by introducing a
reflection?
A physical IMU mount-matrix must represent a pure 3D rotation, which
mathematically requires an orthogonal matrix with a determinant of exactly +1
to preserve the right-hand rule. The previous matrix had a determinant of +1.
The new matrix negates all elements from the original, resulting in a matrix
with a determinant of -1. This applies a spatial point reflection,
transforming the IMU's right-handed coordinate system into a left-handed one.
While this may superficially fix 2D screen auto-rotation (which only relies
on the accelerometer's linear projection of gravity), will this break the
mathematical parity between the accelerometer (a polar vector) and the
gyroscope (a pseudovector)? 3D sensor fusion algorithms (e.g., Android's Game
Rotation Vector, VR/AR tracking, compasses) may receive contradictory data
and fail or behave erratically.
To properly swap the X and Y axes to fix the screen orientation while
maintaining a right-handed coordinate system, should the Z axis be inverted
relative to the swap, resulting in a matrix of "0", "1", "0"; "1", "0", "0";
"0", "0", "-1"?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260511074859.24930-1-clamor95@gmail.com?part=9
prev parent reply other threads:[~2026-05-12 3:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 7:48 [PATCH v1 0/9 RESEND] ARM: tegra: complete a few Tegra30 device trees Svyatoslav Ryhel
2026-05-11 7:48 ` [PATCH v1 1/9 RESEND] ARM: tegra: lg-x3: Complete video device graph Svyatoslav Ryhel
2026-05-12 0:47 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 2/9 RESEND] ARM: tegra: lg-x3: Set PMIC's RTC address Svyatoslav Ryhel
2026-05-12 1:11 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 3/9 RESEND] ARM: tegra: p880: Lower CPU thermal limit Svyatoslav Ryhel
2026-05-11 7:48 ` [PATCH v1 4/9 RESEND] ARM: tegra: grouper: Add support for front camera Svyatoslav Ryhel
2026-05-12 1:58 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 5/9 RESEND] ARM: tegra: transformer: " Svyatoslav Ryhel
2026-05-12 2:23 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 6/9 RESEND] ARM: tegra: transformers: Add connector node for common trees Svyatoslav Ryhel
2026-05-12 2:40 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 7/9 RESEND] ARM: tegra: tf600t: Configure panel Svyatoslav Ryhel
2026-05-12 3:27 ` sashiko-bot
2026-05-11 7:48 ` [PATCH v1 8/9 RESEND] ARM: tegra: tf600t: Drop backlight regulator Svyatoslav Ryhel
2026-05-11 7:48 ` [PATCH v1 9/9 RESEND] ARM: tegra: tf600t: Invert accelerometer calibration matrix Svyatoslav Ryhel
2026-05-12 3:39 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512033957.3C988C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox