Re: [PATCH v2 1/5] media: iris: fail firmware boot on invalid uc_region

Konrad Dybcio <[email protected]>
Newsgroups org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media
Message-ID <[email protected]>
On 7/31/26 2:31 AM, Dmitry Baryshkov wrote:
> iris_vpu_boot_firmware() polls CTRL_STATUS while the firmware boots. When
> the hardware reports an invalid uc_region setting, the poll loop breaks
> early with count still below max_tries. The following timeout check
> (count >= max_tries) is therefore false, so the function skips the error
> return and falls through to return 0, reporting a successful boot. The
> caller then enables host interrupts and proceeds to use firmware that
> never came up, which can lead to unhandled timeouts or hardware hangs.
> 
> Return an error directly from the uc_region error path instead of breaking
> out of the loop and reporting success.
> 
> Fixes: abf5bac63f68 ("media: iris: implement the boot sequence of the firmware")
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Dmitry Baryshkov <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.