lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06d5432c44d3b4d6129891c46cc62f0edf735cf7.camel@collabora.com>
Date:   Wed, 26 May 2021 07:12:00 -0300
From:   Ezequiel Garcia <ezequiel@...labora.com>
To:     Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        p.zabel@...gutronix.de, mchehab@...nel.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de, festevam@...il.com,
        gregkh@...uxfoundation.org, mripard@...nel.org,
        paul.kocialkowski@...tlin.com, wens@...e.org,
        jernej.skrabec@...l.net, emil.l.velikov@...il.com,
        Andrzej Pietrasiewicz <andrzej.p@...labora.com>
Cc:     kernel@...gutronix.de, linux-imx@....com,
        linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Adrian Ratiu <adrian.ratiu@...labora.com>
Subject: Re: [PATCH v11 8/9] media: hantro: Introduce G2/HEVC decoder

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@...labora.com>
> Co-developed-by: Adrian Ratiu <adrian.ratiu@...labora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@...labora.com>
> Co-developed-by: Ezequiel Garcia <ezequiel@...labora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@...labora.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@...labora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ