lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEc3jaDLE1_+cCdL0nwUq-TPzBhoPmukGs527TokNN=iwqO5Hw@mail.gmail.com>
Date:   Wed, 5 Oct 2022 21:00:54 -0700
From:   Roderick Colenbrander <thunderbird2k@...il.com>
To:     Henry Castro <hcvcastro@...il.com>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] drivers: hid: adjust gyro calibration data

Hm, I'm not the biggest fan. Is this an official DS4 or a clone
device? It sounds like it is some type of clone (some look real).

On Sun, Oct 2, 2022 at 3:03 PM Henry Castro <hcvcastro@...il.com> wrote:
>
> For some reason my DualShock 4 get the calibration
> data values equal:
>
>         gyro_pitch_plus == gyro_pitch_minus
>
> Probably due to some defect in the DS4 hardware, and cause
> a CPU division exception to crash the linux kernel.
>
> At least with the patch, I can continue play Retroarch
> without using the Gyroscope :)
>
> Signed-off-by: Henry Castro <hcvcastro@...il.com>
> ---
>  drivers/hid/hid-sony.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index 87b538656f64..656caa07b25f 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -1823,6 +1823,15 @@ static int dualshock4_get_calibration_data(struct sony_sc *sc)
>         acc_z_plus       = get_unaligned_le16(&buf[31]);
>         acc_z_minus      = get_unaligned_le16(&buf[33]);
>
> +       if (gyro_pitch_plus == gyro_pitch_minus)
> +               gyro_pitch_minus *= -1;
> +
> +       if (gyro_yaw_plus == gyro_yaw_minus)
> +               gyro_yaw_minus *= -1;
> +
> +       if (gyro_roll_plus == gyro_roll_minus)
> +               gyro_roll_minus *= -1;
> +
>         /* Set gyroscope calibration and normalization parameters.
>          * Data values will be normalized to 1/DS4_GYRO_RES_PER_DEG_S degree/s.
>          */
> --
> 2.20.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ