aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov2021-04-01 16:43:28 +0200
committerMauro Carvalho Chehab2021-05-19 09:51:39 +0200
commit09f4310c6bfbc0002ce1cf8fc90db50777d75916 (patch)
tree0584e65e11e216e8a103f517a9d5e14dd900e7d1
parentf8194e5e63fdcb349e8da9eef9e574d5b1d687cb (diff)
media: hantro: use G1_REG_INTERRUPT directly for the mpeg2
Use the register directly over the existing SWREG(). Ideally we'll port the driver away from the local registers, but for now this is enough. For context - I was reading through the IRQ register handling across the variants. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
index 6386a3989bfe..0fd306806f16 100644
--- a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
@@ -10,6 +10,7 @@
#include <media/v4l2-mem2mem.h>
#include "hantro.h"
#include "hantro_hw.h"
+#include "hantro_g1_regs.h"
#define G1_SWREG(nr) ((nr) * 4)
@@ -20,7 +21,6 @@
#define G1_REG_REFER2_BASE G1_SWREG(16)
#define G1_REG_REFER3_BASE G1_SWREG(17)
#define G1_REG_QTABLE_BASE G1_SWREG(40)
-#define G1_REG_DEC_E(v) ((v) ? BIT(0) : 0)
#define G1_REG_DEC_AXI_RD_ID(v) (((v) << 24) & GENMASK(31, 24))
#define G1_REG_DEC_TIMEOUT_E(v) ((v) ? BIT(23) : 0)
@@ -246,6 +246,5 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
hantro_end_prepare_run(ctx);
- reg = G1_REG_DEC_E(1);
- vdpu_write(vpu, reg, G1_SWREG(1));
+ vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT);
}