Re: [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder
From: Ezequiel Garcia <hidden>
Date: 2021-05-26 10:12:19
Also in:
linux-media, linux-rockchip, lkml
Hi Benjamin, (Adding Andrzej) On Tue, 2021-05-25 at 18:12 +0200, Benjamin Gaignard wrote:
Implement all the logic to get G2 hardware decoding HEVC frames. It supports up level 5.1 HEVC stream. It doesn't support yet 10 bits formats or the scaling feature. Add HANTRO HEVC dedicated control to skip some bits at the beginning of the slice header. That is very specific to this hardware so can't go into uapi structures. Computing the needed value is complex and requires information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Co-developed-by: Adrian Ratiu <redacted> Signed-off-by: Adrian Ratiu <redacted> Co-developed-by: Ezequiel Garcia <redacted> Signed-off-by: Ezequiel Garcia <redacted> ---
[..]
quoted hunk ↗ jump to hunk
diff --git a/drivers/staging/media/hantro/hantro_g2_regs.h b/drivers/staging/media/hantro/hantro_g2_regs.h new file mode 100644 index 000000000000..2477573f7163 --- /dev/null +++ b/drivers/staging/media/hantro/hantro_g2_regs.h@@ -0,0 +1,198 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2021, Collabora + * + * Author: Benjamin Gaignard <benjamin.gaignard@collabora.com> + */ + +#ifndef HANTRO_G2_REGS_H_ +#define HANTRO_G2_REGS_H_ + +#include "hantro.h" + +#define G2_SWREG(nr) ((nr) * 4) + +#define HEVC_DEC_REG(name, base, shift, mask) \ + static const struct hantro_reg _hevc_##name[] = { \ + { G2_SWREG(base), (shift), (mask) } \ + }; \ + static const struct hantro_reg __maybe_unused *hevc_##name = &_hevc_##name[0]; + +#define HEVC_REG_VERSION G2_SWREG(0) + +#define HEVC_REG_INTERRUPT G2_SWREG(1)
These definitions seem valid across G2 and not something specific to HEVC, so can we rename (the ones that make sense) to G2_ ? That would allow to reuse them for VP9 with a smaller gap. Thanks, Ezequiel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel