Re: [PATCH v3 2/7] media: iris: switch to hardware mode after firmware boot
From: Dikshita Agarwal
Date: Tue Mar 24 2026 - 01:16:54 EST
On 3/13/2026 6:49 PM, Vikash Garodia wrote:
> Currently the driver switches the vcodec GDSC to hardware (HW) mode
> before firmware load and boot sequence. GDSC can be powered off, keeping
> in hw mode, thereby the vcodec registers programmed in TrustZone (TZ)
> carry default (reset) values.
> Move the transition to HW mode after firmware load and boot sequence.
>
> The bug was exposed with driver configuring different stream ids to
> different devices via iommu-map. With registers carrying reset values,
> VPU would not generate desired stream-id, thereby leading to SMMU fault.
>
> For vpu4, when GDSC is switched to HW mode, there is a need to perform
> the reset operation. Without reset, there are occassional issues of
> register corruption observed. Hence the vpu GDSC switch also involves
> the reset.
>
> Fixes: dde659d37036 ("media: iris: Introduce vpu ops for vpu4 with necessary hooks")
> Co-developed-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_core.c | 4 ++++
> drivers/media/platform/qcom/iris/iris_hfi_common.c | 4 ++++
> drivers/media/platform/qcom/iris/iris_vpu2.c | 1 +
> drivers/media/platform/qcom/iris/iris_vpu3x.c | 9 +++-----
> drivers/media/platform/qcom/iris/iris_vpu4x.c | 24 ++++++++++++----------
> drivers/media/platform/qcom/iris/iris_vpu_common.c | 16 +++++++++------
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 3 +++
> 7 files changed, 38 insertions(+), 23 deletions(-)
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@xxxxxxxxxxxxxxxx>
Thanks,
Dikshita