video: rockchip: mpp: add iommu flush tlb before hw run for px30

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I20ae76b0890a8f6bee158a5a5c4dddd4d660e74a
This commit is contained in:
Yandong Lin
2022-11-10 10:48:45 +08:00
committed by Tao Huang
parent 886953b713
commit 3b67ff56d6
3 changed files with 58 additions and 3 deletions
+18 -1
View File
@@ -976,6 +976,13 @@ static int rkvdec_1126_run(struct mpp_dev *mpp, struct mpp_task *mpp_task)
return rkvdec_run(mpp, mpp_task);
}
static int rkvdec_px30_run(struct mpp_dev *mpp,
struct mpp_task *mpp_task)
{
mpp_iommu_flush_tlb(mpp->iommu_info);
return rkvdec_run(mpp, mpp_task);
}
static int rkvdec_irq(struct mpp_dev *mpp)
{
mpp->irq_status = mpp_read(mpp, RKVDEC_REG_INT_EN);
@@ -1728,6 +1735,16 @@ static struct mpp_dev_ops rkvdec_v1_dev_ops = {
.free_task = rkvdec_free_task,
};
static struct mpp_dev_ops rkvdec_px30_dev_ops = {
.alloc_task = rkvdec_alloc_task,
.run = rkvdec_px30_run,
.irq = rkvdec_irq,
.isr = rkvdec_isr,
.finish = rkvdec_finish,
.result = rkvdec_result,
.free_task = rkvdec_free_task,
};
static struct mpp_hw_ops rkvdec_3328_hw_ops = {
.init = rkvdec_3328_init,
.exit = rkvdec_3328_exit,
@@ -1790,7 +1807,7 @@ static const struct mpp_dev_var rk_hevcdec_px30_data = {
.hw_info = &rk_hevcdec_hw_info,
.trans_info = rk_hevcdec_trans,
.hw_ops = &rkvdec_px30_hw_ops,
.dev_ops = &rkvdec_v1_dev_ops,
.dev_ops = &rkvdec_px30_dev_ops,
};
static const struct mpp_dev_var rkvdec_v1_data = {
+18 -1
View File
@@ -375,6 +375,13 @@ static int vdpu_run(struct mpp_dev *mpp,
return 0;
}
static int vdpu_px30_run(struct mpp_dev *mpp,
struct mpp_task *mpp_task)
{
mpp_iommu_flush_tlb(mpp->iommu_info);
return vdpu_run(mpp, mpp_task);
}
static int vdpu_finish(struct mpp_dev *mpp,
struct mpp_task *mpp_task)
{
@@ -658,6 +665,16 @@ static struct mpp_dev_ops vdpu_v2_dev_ops = {
.free_task = vdpu_free_task,
};
static struct mpp_dev_ops vdpu_px30_dev_ops = {
.alloc_task = vdpu_alloc_task,
.run = vdpu_px30_run,
.irq = vdpu_irq,
.isr = vdpu_isr,
.finish = vdpu_finish,
.result = vdpu_result,
.free_task = vdpu_free_task,
};
static const struct mpp_dev_var vdpu_v2_data = {
.device_type = MPP_DEVICE_VDPU2,
.hw_info = &vdpu_v2_hw_info,
@@ -671,7 +688,7 @@ static const struct mpp_dev_var vdpu_px30_data = {
.hw_info = &vdpu_v2_hw_info,
.trans_info = vdpu_v2_trans,
.hw_ops = &vdpu_px30_hw_ops,
.dev_ops = &vdpu_v2_dev_ops,
.dev_ops = &vdpu_px30_dev_ops,
};
static const struct of_device_id mpp_vdpu2_dt_match[] = {
+22 -1
View File
@@ -388,6 +388,13 @@ static int vepu_run(struct mpp_dev *mpp,
return 0;
}
static int vepu_px30_run(struct mpp_dev *mpp,
struct mpp_task *mpp_task)
{
mpp_iommu_flush_tlb(mpp->iommu_info);
return vepu_run(mpp, mpp_task);
}
static int vepu_irq(struct mpp_dev *mpp)
{
mpp->irq_status = mpp_read(mpp, VEPU2_REG_INT);
@@ -902,6 +909,20 @@ static struct mpp_dev_ops vepu_v2_dev_ops = {
.dump_session = vepu_dump_session,
};
static struct mpp_dev_ops vepu_px30_dev_ops = {
.alloc_task = vepu_alloc_task,
.run = vepu_px30_run,
.irq = vepu_irq,
.isr = vepu_isr,
.finish = vepu_finish,
.result = vepu_result,
.free_task = vepu_free_task,
.ioctl = vepu_control,
.init_session = vepu_init_session,
.free_session = vepu_free_session,
.dump_session = vepu_dump_session,
};
static struct mpp_dev_ops vepu_ccu_dev_ops = {
.alloc_task = vepu_alloc_task,
.prepare = vepu_prepare,
@@ -931,7 +952,7 @@ static const struct mpp_dev_var vepu_px30_data = {
.hw_info = &vepu_v2_hw_info,
.trans_info = trans_rk_vepu2,
.hw_ops = &vepu_px30_hw_ops,
.dev_ops = &vepu_v2_dev_ops,
.dev_ops = &vepu_px30_dev_ops,
};
static const struct mpp_dev_var vepu_ccu_data = {