From: Ezequiel Garcia <ezequiel@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com,
gregkh@linuxfoundation.org, mripard@kernel.org,
paul.kocialkowski@bootlin.com, wens@csie.org,
jernej.skrabec@siol.net, emil.l.velikov@gmail.com,
Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: kernel@pengutronix.de, linux-imx@nxp.com,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Adrian Ratiu <adrian.ratiu@collabora.com>
Subject: Re: [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder
Date: Wed, 26 May 2021 07:12:00 -0300 [thread overview]
Message-ID: <06d5432c44d3b4d6129891c46cc62f0edf735cf7.camel@collabora.com> (raw)
In-Reply-To: <20210525161238.1191168-9-benjamin.gaignard@collabora.com>
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 <adrian.ratiu@collabora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> Co-developed-by: Ezequiel Garcia <ezequiel@collabora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
[..]
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com,
gregkh@linuxfoundation.org, mripard@kernel.org,
paul.kocialkowski@bootlin.com, wens@csie.org,
jernej.skrabec@siol.net, emil.l.velikov@gmail.com,
Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: kernel@pengutronix.de, linux-imx@nxp.com,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Adrian Ratiu <adrian.ratiu@collabora.com>
Subject: Re: [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder
Date: Wed, 26 May 2021 07:12:00 -0300 [thread overview]
Message-ID: <06d5432c44d3b4d6129891c46cc62f0edf735cf7.camel@collabora.com> (raw)
In-Reply-To: <20210525161238.1191168-9-benjamin.gaignard@collabora.com>
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 <adrian.ratiu@collabora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> Co-developed-by: Ezequiel Garcia <ezequiel@collabora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
[..]
> 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-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com,
gregkh@linuxfoundation.org, mripard@kernel.org,
paul.kocialkowski@bootlin.com, wens@csie.org,
jernej.skrabec@siol.net, emil.l.velikov@gmail.com,
Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: kernel@pengutronix.de, linux-imx@nxp.com,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Adrian Ratiu <adrian.ratiu@collabora.com>
Subject: Re: [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder
Date: Wed, 26 May 2021 07:12:00 -0300 [thread overview]
Message-ID: <06d5432c44d3b4d6129891c46cc62f0edf735cf7.camel@collabora.com> (raw)
In-Reply-To: <20210525161238.1191168-9-benjamin.gaignard@collabora.com>
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 <adrian.ratiu@collabora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> Co-developed-by: Ezequiel Garcia <ezequiel@collabora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
[..]
> 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
next prev parent reply other threads:[~2021-05-26 10:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 16:12 [PATCH v11 0/9] Add HANTRO G2/HEVC decoder support for IMX8MQ Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 1/9] media: hevc: Add fields and flags for hevc PPS Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 2/9] media: hevc: Add decode params control Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 3/9] media: hantro: change hantro_codec_ops run prototype to return errors Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 4/9] media: hantro: Define HEVC codec profiles and supported features Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 5/9] media: hantro: Only use postproc when post processed formats are defined Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 6/9] media: uapi: Add a control for HANTRO driver Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 7/9] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-26 9:58 ` Hans Verkuil
2021-05-26 9:58 ` Hans Verkuil
2021-05-26 9:58 ` Hans Verkuil
2021-05-26 10:12 ` Ezequiel Garcia [this message]
2021-05-26 10:12 ` Ezequiel Garcia
2021-05-26 10:12 ` Ezequiel Garcia
2021-05-25 16:12 ` [PATCH v11 9/9] media: hantro: IMX8M: add variant for G2/HEVC codec Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-25 16:12 ` Benjamin Gaignard
2021-05-26 9:52 ` Hans Verkuil
2021-05-26 9:52 ` Hans Verkuil
2021-05-26 9:52 ` Hans Verkuil
2021-05-26 11:10 ` Benjamin Gaignard
2021-05-26 11:10 ` Benjamin Gaignard
2021-05-26 11:10 ` Benjamin Gaignard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06d5432c44d3b4d6129891c46cc62f0edf735cf7.camel@collabora.com \
--to=ezequiel@collabora.com \
--cc=adrian.ratiu@collabora.com \
--cc=andrzej.p@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=emil.l.velikov@gmail.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jernej.skrabec@siol.net \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=paul.kocialkowski@bootlin.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.