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: <20230727210425.GK25174@pendragon.ideasonboard.com>
Date:   Fri, 28 Jul 2023 00:04:25 +0300
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Nicolas Dufresne <nicolas@...fresne.ca>
Cc:     Devarsh Thakkar <devarsht@...com>, mchehab@...nel.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        conor+dt@...nel.org, hverkuil-cisco@...all.nl,
        eugen.hristev@...labora.com, ezequiel@...guardiasur.com.ar,
        u.kleine-koenig@...gutronix.de, sakari.ailus@...ux.intel.com,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, praneeth@...com, nm@...com,
        vigneshr@...com, a-bhatia1@...com, j-luthra@...com,
        b-brnich@...com, detheridge@...com, p-mantena@...com, vijayp@...com
Subject: Re: [PATCH v2 2/2] media: imagination: Add E5010 JPEG Encoder driver

On Thu, Jul 27, 2023 at 10:10:41AM -0400, Nicolas Dufresne wrote:
> Le jeudi 27 juillet 2023 à 16:55 +0530, Devarsh Thakkar a écrit :
> > This adds support for stateful V4L2 M2M based driver
> > for Imagination E5010 JPEG Encoder [1] which supports baseline
> > encoding with two different quantization tables and compression
> > ratio as demanded.
> > 
> > Support for both contigous and non-contigous YUV420 and YUV422
>                    contiguous        contiguous
> 
> > semiplanar formats is added along with alignment restrictions
> > as required by the hardware.
> > 
> > System and runtime PM hooks are added in the driver along with v4l2
> > crop and selection API support.
> > 
> > Minimum resolution supported is 64x64 and
> > Maximum resolution supported is 8192x8192.
> > 
> > All v4l2-compliance tests are passing [2] :
> > v4l2-compliance -s -f -a  -d /dev/video0 -e /dev/video1
> > 
> > Total for e5010 device /dev/video0: 78, Succeeded: 78, Failed: 0,
> > Warnings: 0
> > 
> > NOTE: video1 here is VIVID test pattern generator
> > 
> > Also tests [3] were run manually to verify below driver features:
> >  - Runtime Power Management
> >  - Multi-instance JPEG Encoding
> >  - DMABUF import, export support
> >  - NV12, NV21, NV16, NV61 video format support
> >  - Compression quality S_CTRL
> > 
> > Existing V4L2 M2M based JPEG drivers namely s5p-jpeg,
> > imx-jpeg and rcar_jpu were referred while making this.
> > 
> > [1]:  AM62A TRM (Section 7.6 is for JPEG Encoder)
> > Link: https://www.ti.com/lit/pdf/spruj16
> > 
> > [2]: v4l2-compliance test :
> > Link: https://gist.github.com/devarsht/867b1d646bca3f3877edb1f3638aae31
> > 
> > [3]: E5010 JPEG Encoder Manual tests :
> > Link: https://gist.github.com/devarsht/ea31179199393c2026ae457219bb6321
> > 
> > Co-developed-by: David Huang <d-huang@...com>
> > Signed-off-by: David Huang <d-huang@...com>
> > Signed-off-by: Devarsh Thakkar <devarsht@...com>
> > ---
> > V2: No change
> > 
> >  MAINTAINERS                                   |    2 +
> >  drivers/media/platform/Kconfig                |    1 +
> >  drivers/media/platform/Makefile               |    1 +
> >  drivers/media/platform/imagination/Kconfig    |   13 +
> >  drivers/media/platform/imagination/Makefile   |    3 +
> >  .../platform/imagination/e5010-core-regs.h    |  584 ++++++
> >  .../platform/imagination/e5010-jpeg-enc-hw.c  |  319 +++
> >  .../platform/imagination/e5010-jpeg-enc-hw.h  |   41 +
> >  .../platform/imagination/e5010-jpeg-enc.c     | 1762 +++++++++++++++++
> >  .../platform/imagination/e5010-jpeg-enc.h     |  165 ++
> >  .../platform/imagination/e5010-mmu-regs.h     |  303 +++
> >  11 files changed, 3194 insertions(+)
> >  create mode 100644 drivers/media/platform/imagination/Kconfig
> >  create mode 100644 drivers/media/platform/imagination/Makefile
> >  create mode 100644 drivers/media/platform/imagination/e5010-core-regs.h
> >  create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc-hw.c
> >  create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc-hw.h
> >  create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc.c
> >  create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc.h
> >  create mode 100644 drivers/media/platform/imagination/e5010-mmu-regs.h

[snip]

> > diff --git a/drivers/media/platform/imagination/e5010-core-regs.h b/drivers/media/platform/imagination/e5010-core-regs.h
> > new file mode 100644
> > index 000000000000..aa2d57146c3d
> > --- /dev/null
> > +++ b/drivers/media/platform/imagination/e5010-core-regs.h
> > @@ -0,0 +1,584 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * TI E5010 JPEG Encoder driver.
> > + *
> > + * Copyright (c) 2023 Texas Instruments Inc.
> > + * Author: David Huang <d-huang@...com>
> > + * Author: Devarsh Thakkar <devarsht@...com>
> > + */
> > +
> > +#ifndef _E5010_CORE_REGS_H
> > +#define _E5010_CORE_REGS_H
> 
> nit: Could be modernized to "#pragma once" (though only used in selftest so far)

I don't know if there's a kernel-wide policy regarding its use, but
Linus has not too long ago expressed a dislike for "#pragma once", see
https://lore.kernel.org/lkml/CAHk-=wi13+FLcRo4zmnRUmmY=AAns-Yd5NR_mVdcAd6ZrPq2fA@mail.gmail.com/.

[snip]

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ