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: <9d834444-8dab-4e3f-987b-e1d6d615f61d@linaro.org>
Date: Wed, 2 Jul 2025 16:06:24 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
 Vikash Garodia <quic_vgarodia@...cinc.com>,
 Dikshita Agarwal <quic_dikshita@...cinc.com>,
 Abhinav Kumar <abhinav.kumar@...ux.dev>,
 Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, linux-media@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: iris: Be explicit in naming of VPU2 power off
 handlers

On 02/07/2025 16:02, Konrad Dybcio wrote:
> On 7/2/25 3:42 PM, Krzysztof Kozlowski wrote:
>> Driver implements different callbacks for power off hardware
>> (.power_off_hw) and power off controller (.power_off_controller):
>>
>>  - iris_vpu_power_off_hw + iris_vpu_power_off_controller,
>>  - iris_vpu3_power_off_hardware,
>>  - iris_vpu33_power_off_hardware + iris_vpu33_power_off_controller,
>>
>> The first group (iris_vpu_power_off_hw() and
>> iris_vpu_power_off_controller()) is used on older VPU2 designs but also
>> called from newer ones: iris_vpu3_power_off_hardware() calls
>> iris_vpu_power_off_controller().
>>
>> In the same time there is wrapper iris_vpu_power_off() which calls
>> respective callbacks (the VPU2, VPU3 etc).
>>
>> Let's make it more obvious which function is a generic wrapper over
>> specific VPU/platform callbacks (iris_vpu_power_off()) and which one is
>> the callback by adding "2" to callbacks used on VPU2.  No functional
>> changes.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>> ---
> 
> [...]
> 
>> diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c
>> index 9b7c9a1495ee..a2c8a1650153 100644
>> --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c
>> +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c
>> @@ -104,7 +104,7 @@ static void iris_vpu3_power_off_hardware(struct iris_core *core)
>>  	writel(0x0, core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET);
>>  
>>  disable_power:
>> -	iris_vpu_power_off_hw(core);
>> +	iris_vpu2_power_off_hw(core);
>>  }
>>  
>>  static void iris_vpu33_power_off_hardware(struct iris_core *core)
>> @@ -142,7 +142,7 @@ static void iris_vpu33_power_off_hardware(struct iris_core *core)
>>  	writel(0x0, core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET);
>>  
>>  disable_power:
>> -	iris_vpu_power_off_hw(core);
>> +	iris_vpu2_power_off_hw(core);
>>  }
> 
> I don't really like how v3 calls v2 ops internally.. and there's
> nothing really vpu2-specific about what the function does.
> Maybe something along the lines of "iris_disable_resources"?

Context: sm8750 comes with more resources, so it will come with vpu35
doing this differently.

That's why any generic name (non platform specific) is misleading IMO.
This is really disabling/power off for the VPU2, 3 and 3.3. Not newer,
at least after initial look at SM8750.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ