From: Hao Yao <hao.yao@intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: <platform-driver-x86@vger.kernel.org>,
<johannes.goede@oss.qualcomm.com>, <dan.scally@ideasonboard.com>,
<sakari.ailus@linux.intel.com>, <bingbu.cao@intel.com>,
<linux-media@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] platform/x86: int3472: Use actual clock frequency for DSM method
Date: Thu, 2 Apr 2026 14:56:41 +0800 [thread overview]
Message-ID: <e84dd3fb-0758-432b-9068-81c7d106f21e@intel.com> (raw)
In-Reply-To: <e66e29a3-f534-64a8-67cb-79f93e9d1f10@linux.intel.com>
Hi,
Sorry for missing this mail,
On 12/29/25 20:06, Ilpo Järvinen wrote:
> On Mon, 8 Dec 2025, Hao Yao wrote:
>
>> The third argument (args[2]) to the _DSM method was hardcoded to 1,
>> which corresponds to 19.2MHz. However, this argument should reflect
>> the actual clock frequency from the sensor's ACPI data.
>>
>> According to the DSM specification:
>> - 1 = 19.2MHz
>> - 3 = 24MHz
>>
>> Read the frequency from clk->frequency and set the DSM argument
>> accordingly, with 19.2MHz as the default for unsupported frequencies.
>>
>> This ensures the sensor receives the correct clock frequency as
>> specified in its ACPI configuration.
>>
>> Signed-off-by: Hao Yao <hao.yao@intel.com>
>
> Should this have a Fixes tag?
>
Fixes: e4543de8b6ff ("platform/x86: int3472: Evaluate device's _DSM
method to control imaging clock")
> Could you please also mention what you discovered about values 0 and 2 in
> the changelog as it seems useful information (I requested this in v1).
>
When I send value 0 or 2, the clock doesn't change (checked by
oscilloscope). I guess that values other than 1 and 3 is ignored
currently, maybe reserved for future usage.
Best Regards,
Hao Yao
>> ---
>> .../x86/intel/int3472/clk_and_regulator.c | 21 ++++++++++++++++++-
>> 1 file changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
>> index 9e052b164a1a..c834fd59ec0c 100644
>> --- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
>> +++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
>> @@ -19,23 +19,42 @@ static const guid_t img_clk_guid =
>> GUID_INIT(0x82c0d13a, 0x78c5, 0x4244,
>> 0x9b, 0xb1, 0xeb, 0x8b, 0x53, 0x9a, 0x8d, 0x11);
>>
>> +/*
>> + * The PCH clock frequency argument to the _DSM method:
>> + * PCH_CLK_FREQ_19M2 = 19.2MHz (default)
>> + * PCH_CLK_FREQ_24M = 24MHz
>> + */
>> +#define PCH_CLK_FREQ_19M2 1
>> +#define PCH_CLK_FREQ_24M 3
>> +
>> static void skl_int3472_enable_clk(struct int3472_clock *clk, int enable)
>> {
>> struct int3472_discrete_device *int3472 = to_int3472_device(clk);
>> union acpi_object args[3];
>> union acpi_object argv4;
>> + u32 dsm_freq_arg;
>>
>> if (clk->ena_gpio) {
>> gpiod_set_value_cansleep(clk->ena_gpio, enable);
>> return;
>> }
>>
>> + switch (clk->frequency) {
>> + case 24000000:
>> + dsm_freq_arg = PCH_CLK_FREQ_24M;
>> + break;
>> + case 19200000:
>> + default:
>> + dsm_freq_arg = PCH_CLK_FREQ_19M2;
>> + break;
>> + }
>> +
>> args[0].integer.type = ACPI_TYPE_INTEGER;
>> args[0].integer.value = clk->imgclk_index;
>> args[1].integer.type = ACPI_TYPE_INTEGER;
>> args[1].integer.value = enable;
>> args[2].integer.type = ACPI_TYPE_INTEGER;
>> - args[2].integer.value = 1;
>> + args[2].integer.value = dsm_freq_arg;
>>
>> argv4.type = ACPI_TYPE_PACKAGE;
>> argv4.package.count = 3;
>>
>
>
prev parent reply other threads:[~2026-04-02 6:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 3:51 Hao Yao
2025-12-08 7:48 ` Dan Scally
2025-12-08 9:31 ` johannes.goede
2025-12-08 11:27 ` Sakari Ailus
2025-12-29 12:06 ` Ilpo Järvinen
2026-04-02 6:56 ` Hao Yao [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=e84dd3fb-0758-432b-9068-81c7d106f21e@intel.com \
--to=hao.yao@intel.com \
--cc=bingbu.cao@intel.com \
--cc=dan.scally@ideasonboard.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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
all inboxes | Powered by JetHome®