Re: [PATCH v3] platform/x86: int3472: Use actual clock frequency for DSM method

From: Sakari Ailus

Date: Wed Nov 25 2026 - 07:10:06 EST


Hi Hans, Sergey,

On Wed, Nov 25, 2026 at 12:16:08PM +0100, Hans de Goede wrote:
> Hi,
>
> On 25-Nov-26 10:09, Sergey Lebedev wrote:
> > From: Hao Yao <hao.yao@xxxxxxxxx>
> >
> > The third argument (args[2]) to the _DSM method was hardcoded to 1,
> > which selects 19.2MHz. A sensor whose SSDB asks for 24MHz therefore
> > runs from 19.2MHz, and everything it derives from its clock runs at
> > four fifths of the expected rate.
> >
> > Pass the frequency from the SSDB instead, with 19.2MHz as the default.
> > 1 selects 19.2MHz everywhere, but the value for 24MHz depends on the
> > platform. Where the frequency field is one bit wide (Tiger Lake, Jasper
> > Lake, Alder Lake, Raptor Lake) it is 0, and 3 would also set the clock's
> > enable bit again when the clock is turned off. From Meteor Lake on the
> > field is two bits wide and it is 3; 0 and 2 leave the clock unchanged
> > there, as measured with an oscilloscope.
> >
> > Fixes: e4543de8b6ff ("platform/x86: int3472: Evaluate device's _DSM method to control imaging clock")
> > Signed-off-by: Hao Yao <hao.yao@xxxxxxxxx>
> > [Sergey: pick the 24MHz value per platform]
> > Signed-off-by: Sergey Lebedev <lsa.uz@xxxxx>
>
> Thanks, patch looks good to me:
>
> Reviewed-by: Hans de Goede <johannes.goede@xxxxxxxxxxxxxxxx>

Thanks. I'll add Cc: stable when applying this, too.

--
Regards,

Sakari Ailus