video: rockchip: mpp: fix rk3328 h265d timeout issue

Power save optimization may cause rkvdec timeout when decoding some HEVC
bitstream.

Change-Id: I60c9e578e53a37dbe610b03912fc0007a782f960
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
Johnson Ding
2021-03-24 20:43:16 +08:00
committed by Tao Huang
parent 4fdf7186d9
commit 06e9fae8a6

View File

@ -944,11 +944,11 @@ static int rkvdec_3328_run(struct mpp_dev *mpp,
task = to_rkvdec_task(mpp_task);
/*
* HW defeat workaround: VP9 power save optimization cause decoding
* HW defeat workaround: VP9 and H.265 power save optimization cause decoding
* corruption, disable optimization here.
*/
fmt = RKVDEC_GET_FORMAT(task->reg[RKVDEC_REG_SYS_CTRL_INDEX]);
if (fmt == RKVDEC_FMT_VP9D) {
if (fmt == RKVDEC_FMT_VP9D || fmt == RKVDEC_FMT_H265D) {
cfg = task->reg[RKVDEC_POWER_CTL_INDEX] | 0xFFFF;
task->reg[RKVDEC_POWER_CTL_INDEX] = cfg & (~(1 << 12));
mpp_write_relaxed(mpp, RKVDEC_POWER_CTL_BASE,