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: <73ae539a-96e3-bec3-f02c-e74660297b38@linux.intel.com>
Date: Tue, 22 Jul 2025 16:31:39 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Antheas Kapenekakis <lkml@...heas.dev>
cc: platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, 
    Derek John Clark <derekjohn.clark@...il.com>, 
    Joaquín Ignacio Aramendía <samsagax@...il.com>, 
    Hans de Goede <hdegoede@...hat.com>, Eileen <eileen@...-netbook.com>
Subject: Re: [PATCH v1 1/2] platform/x86: oxpec: Fix turbo register for G1
 AMD

On Tue, 22 Jul 2025, Antheas Kapenekakis wrote:

> On Tue, 22 Jul 2025 at 15:22, Ilpo Järvinen
> <ilpo.jarvinen@...ux.intel.com> wrote:
> >
> > On Fri, 18 Jul 2025, Antheas Kapenekakis wrote:
> >
> > > Turns out that the AMD variant of the G1 uses different turbo registers
> > > than the Intel variant. Differentiate them and apply the correct ones
> > > to the AMD variant.
> > >
> > > Fixes: b369395c895b ("platform/x86: oxpec: Add support for the OneXPlayer G1")
> > > Signed-off-by: Antheas Kapenekakis <lkml@...heas.dev>
> > > ---
> > >  drivers/platform/x86/oxpec.c | 37 +++++++++++++++++++++++-------------
> > >  1 file changed, 24 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c
> > > index 06759036945d..9839e8cb82ce 100644
> > > --- a/drivers/platform/x86/oxpec.c
> > > +++ b/drivers/platform/x86/oxpec.c
> > > @@ -58,7 +58,8 @@ enum oxp_board {
> > >       oxp_mini_amd_a07,
> > >       oxp_mini_amd_pro,
> > >       oxp_x1,
> > > -     oxp_g1,
> > > +     oxp_g1_i,
> > > +     oxp_g1_a,
> > >  };
> > >
> > >  static enum oxp_board board;
> > > @@ -247,14 +248,14 @@ static const struct dmi_system_id dmi_table[] = {
> > >                       DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> > >                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER G1 A"),
> > >               },
> > > -             .driver_data = (void *)oxp_g1,
> > > +             .driver_data = (void *)oxp_g1_a,
> > >       },
> > >       {
> > >               .matches = {
> > >                       DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> > >                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER G1 i"),
> > >               },
> > > -             .driver_data = (void *)oxp_g1,
> > > +             .driver_data = (void *)oxp_g1_i,
> > >       },
> > >       {
> > >               .matches = {
> >
> >
> > > -     case oxp_g1:
> > > +     case oxp_g1_i:
> > >               return read_from_ec(OXP_2_SENSOR_FAN_REG, 2, val);
> > > @@ -757,6 +765,7 @@ static int oxp_pwm_fan_speed(long *val)
> > > +     case oxp_g1_a:
> > >               return read_from_ec(OXP_SENSOR_FAN_REG, 2, val);
> >
> > > -     case oxp_g1:
> > > +     case oxp_g1_i:
> > >               /* scale to range [0-184] */
> > >               val = (val * 184) / 255;
> > >               return write_to_ec(OXP_SENSOR_PWM_REG, val);
> > > @@ -796,6 +805,7 @@ static int oxp_pwm_input_write(long val)
> > > +     case oxp_g1_a:
> > >               return write_to_ec(OXP_SENSOR_PWM_REG, val);
> > > @@ -816,7 +826,7 @@ static int oxp_pwm_input_read(long *val)
> > > -     case oxp_g1:
> > > +     case oxp_g1_i:
> > >               ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
> > > @@ -842,6 +852,7 @@ static int oxp_pwm_input_read(long *val)
> > > +     case oxp_g1_a:
> > >       default:
> > >               ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
> >
> > Do these FAN and PWM registers fall under what is described in the
> > changelog as "turbo registers"? Or did you extend the scope of this patch
> > and forgot to update the changelog?
> 
> Yes. Perhaps its not the best wording and it should have said EC registers.

Indeed, it is not the best wording as there is a register which has 
"TURBO" in its name so it's a bit confusing. I'll reword the changelog 
while applying.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ