]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: iris: switch to hardware mode after firmware boot
authorVikash Garodia <vikash.garodia@oss.qualcomm.com>
Fri, 13 Mar 2026 13:19:36 +0000 (18:49 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 27 Apr 2026 06:41:21 +0000 (08:41 +0200)
commit95a337f92f0a602d4f935315bfbc8bf07f475e65
tree9ada03a71c1e8abbc9b3d7f57199ab05d7281e29
parent4a49ae56b0e4268d48fd96babe0cc68596bc301a
media: iris: switch to hardware mode after firmware boot

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 occasional issues of
register corruption observed. Hence the vpu GDSC switch also involves
the reset.

Co-developed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: occassional => occasional]
Fixes: dde659d37036 ("media: iris: Introduce vpu ops for vpu4 with necessary hooks")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/iris/iris_core.c
drivers/media/platform/qcom/iris/iris_hfi_common.c
drivers/media/platform/qcom/iris/iris_vpu2.c
drivers/media/platform/qcom/iris/iris_vpu3x.c
drivers/media/platform/qcom/iris/iris_vpu4x.c
drivers/media/platform/qcom/iris/iris_vpu_common.c
drivers/media/platform/qcom/iris/iris_vpu_common.h