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

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

 



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.

>> +
>> +	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.

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux