Re: [PATCH v2 1/3] remoteproc: qcom_q6v5_pas: propagate dev_pm_genpd_set_performance_state() errors
From: Konrad Dybcio
Date: Thu Sep 03 2026 - 05:37:59 EST
On 9/3/26 9:45 AM, Dmitry Baryshkov wrote:
> On Thu, Sep 03, 2026 at 02:13:32AM +0530, Mukesh Ojha wrote:
>> The proxy power domain enable path discards the return value of
>> dev_pm_genpd_set_performance_state(), masking failures silently.
>> When the call fails the performance state is not applied, yet
>> firmware load proceeds without any indication of the problem.
>>
>> Capture the return value and emit a warning on failure. Firmware
>> load continues regardless a performance state failure is non-fatal
>> but the warning provides a visible signal for debugging.
>>
>> Signed-off-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/remoteproc/qcom_q6v5_pas.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
>> index a005546c265d..01dc0194e130 100644
>> --- a/drivers/remoteproc/qcom_q6v5_pas.c
>> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
>> @@ -167,7 +167,11 @@ static int qcom_pas_pds_enable(struct qcom_pas *pas, struct device **pds,
>> int i;
>>
>> for (i = 0; i < pd_count; i++) {
>> - dev_pm_genpd_set_performance_state(pds[i], INT_MAX);
>> + ret = dev_pm_genpd_set_performance_state(pds[i], INT_MAX);
>> + if (ret)
>> + dev_warn(pas->dev,
>> + "failed to set proxy PD %d state %u: %d\n",
>> + i, INT_MAX, ret);
>
> Should it be turned into an error?
Yes
Konrad