Re: [PATCH v3 10/29] media: iris: implement power management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 9/5/2024 7:16 PM, Krzysztof Kozlowski wrote:
> On 05/09/2024 15:23, Bryan O'Donoghue wrote:
>> On 27/08/2024 11:05, Dikshita Agarwal via B4 Relay wrote:
>>> From: Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>
>>>
>>> Implement runtime power management for iris including
>>> platform specific power on/off sequence.
>>>
>>> Signed-off-by: Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>
>>
>>> +int iris_hfi_pm_suspend(struct iris_core *core)
>>> +{
>>> +	int ret;
>>> +
>>> +	if (!mutex_is_locked(&core->lock))
>>> +		return -EINVAL;
>>> +
>>> +	if (core->state != IRIS_CORE_INIT)
>>> +		return -EINVAL;
>>
>> Reiterating a previous point
>>
>> Are these checks realistic or defensive coding ?
> 
> Well, this one:
> 
> if (!mutex_is_locked(&core->lock))
> 
> is clear bug or someone is reinventing lockdep.
> 
Sure, will remove this check.
>>> +
>>> +	if (!core->power_enabled) {
>>> +		dev_err(core->dev, "power not enabled\n");
>>> +		return 0;
>>> +	}
>>
>> Similarly is this a real check an error that can happen and if so how ?
> 
> And here re-inventing runtime PM.
> 
I understand the concern, will remove this check as well.
> Best regards,
> Krzysztof
> 
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux