video: rockchip: mpp: stop vepu2 before reset

In some platform, can not do pmu_idle_request before cru reset.
Resetting without pmu_idle_request while the hw is running
will result in a bus err.

So stop hw first before cru reset to prevent the issue.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I62ace147a0d72adb774fed989b34c7bf22af48ac
This commit is contained in:
Yandong Lin 2023-04-26 21:02:42 +08:00 committed by Tao Huang
parent c6977c7aac
commit 8cc161a8e1

View File

@ -863,6 +863,8 @@ static int vepu_reset(struct mpp_dev *mpp)
struct vepu_dev *enc = to_vepu_dev(mpp);
struct vepu_ccu *ccu = enc->ccu;
mpp_write(mpp, VEPU2_REG_ENC_EN, 0);
udelay(5);
if (enc->rst_a && enc->rst_h) {
/* Don't skip this or iommu won't work after reset */
mpp_pmu_idle_request(mpp, true);