RE: [PATCH v8 10/11] media: chips-media: wave6: Add Wave6 thermal cooling device

From: Nas Chung

Date: Thu Nov 19 2026 - 23:34:48 EST


Hi, Frank.

>-----Original Message-----
>From: Frank Li <Frank.li@xxxxxxxxxxx>
>Sent: Friday, November 20, 2026 6:04 AM
>To: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
>Cc: mchehab@xxxxxxxxxx; hverkuil@xxxxxxxxxx; robh@xxxxxxxxxx;
>krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx; Frank.Li@xxxxxxx;
>s.hauer@xxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx;
>devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>imx@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
>festevam@xxxxxxxxx; kernel@xxxxxxxxxxxxxx; nicolas.dufresne@xxxxxxxxxxxxx;
>ming.qian@xxxxxxxxxxx; marek.vasut@xxxxxxxxxxx; jackson.lee
><jackson.lee@xxxxxxxxxxxxxxx>; lafley.kim <lafley.kim@xxxxxxxxxxxxxxx>
>Subject: Re: [PATCH v8 10/11] media: chips-media: wave6: Add Wave6 thermal
>cooling device
>
>On Thu, Nov 19, 2026 at 06:00:04PM +0900, Nas Chung wrote:
>> Add a thermal cooling device for the Wave6 VPU, so the thermal
>> framework can lower the VPU performance state when the SoC gets hot.
>>
>> The control driver registers the cooling device on its device tree
>> node. The cooling states are built from the OPP table of the "perf"
>> power domain.
>>
>> Tested-by: Ming Qian <ming.qian@xxxxxxxxxxx>
>> Tested-by: Marek Vasut <marek.vasut@xxxxxxxxxxx>
>> Signed-off-by: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
>> ---
>> .../media/platform/chips-media/wave6/Makefile | 1 +
>> .../chips-media/wave6/wave6-vpu-thermal.c | 141 ++++++++++++++++++
>> .../chips-media/wave6/wave6-vpu-thermal.h | 24 +++
>> .../platform/chips-media/wave6/wave6-vpu.c | 22 +++
>> .../platform/chips-media/wave6/wave6-vpu.h | 3 +
>> 5 files changed, 191 insertions(+)
>> create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-
>thermal.c
>> create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-
>thermal.h
>...
>> +
>> + if (!thermal->thermal_max)
>> + goto error;
>
>nothing clean up at error label, just return ret

Agreed.

>
>> +
>> + thermal->thermal_event = 0;
>> + thermal->cooling = devm_thermal_of_child_cooling_device_register(dev,
>> + dev->of_node,
>> +
>dev_name(thermal->dev),
>> + thermal,
>> +
>&wave6_cooling_ops);
>> + if (IS_ERR(thermal->cooling)) {
>> + dev_err(thermal->dev, "register cooling device failed\n");
>> + ret = PTR_ERR(thermal->cooling);
>> + goto error;
>
>return dev_err_probe()

I'll address this in v9.

Thanks.
Nas.

>
>Frank