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
parent 5b9630b146
commit eaed5000bc

View File

@ -736,6 +736,8 @@ static int vepu_reset(struct mpp_dev *mpp)
{
struct vepu_dev *enc = to_vepu_dev(mpp);
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);