linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: Devarsh Thakkar <devarsht@ti.com>,
	mchehab@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	hverkuil-cisco@xs4all.nl, eugen.hristev@collabora.com,
	ezequiel@vanguardiasur.com.ar, u.kleine-koenig@pengutronix.de,
	sakari.ailus@linux.intel.com, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	praneeth@ti.com, nm@ti.com, vigneshr@ti.com, a-bhatia1@ti.com,
	j-luthra@ti.com, b-brnich@ti.com, detheridge@ti.com,
	p-mantena@ti.com, vijayp@ti.com
Subject: Re: [PATCH v2 2/2] media: imagination: Add E5010 JPEG Encoder driver
Date: Fri, 28 Jul 2023 00:04:25 +0300	[thread overview]
Message-ID: <20230727210425.GK25174@pendragon.ideasonboard.com> (raw)
In-Reply-To: <b83249c002c6986f471913cf96fa631c46ec69be.camel@ndufresne.ca>

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@ti.com>
> > Signed-off-by: David Huang <d-huang@ti.com>
> > Signed-off-by: Devarsh Thakkar <devarsht@ti.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@ti.com>
> > + * Author: Devarsh Thakkar <devarsht@ti.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

  reply	other threads:[~2023-07-27 21:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 11:25 [PATCH v2 0/2] Add V4L2 M2M Driver for E5010 JPEG Encoder Devarsh Thakkar
2023-07-27 11:25 ` [PATCH v2 1/2] dt-bindings: media: Add bindings for Imagination E5010 JPEG Encoder driver Devarsh Thakkar
2023-07-27 12:03   ` Krzysztof Kozlowski
2023-07-27 12:27     ` Devarsh Thakkar
2023-07-27 11:25 ` [PATCH v2 2/2] media: imagination: Add " Devarsh Thakkar
2023-07-27 12:13   ` Krzysztof Kozlowski
2023-07-27 14:19     ` Nicolas Dufresne
2023-07-27 14:48       ` Devarsh Thakkar
2023-08-08 13:37     ` Devarsh Thakkar
2023-07-27 14:10   ` Nicolas Dufresne
2023-07-27 21:04     ` Laurent Pinchart [this message]
2023-08-08 12:34     ` Devarsh Thakkar

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=20230727210425.GK25174@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a-bhatia1@ti.com \
    --cc=b-brnich@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=detheridge@ti.com \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eugen.hristev@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=j-luthra@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=nm@ti.com \
    --cc=p-mantena@ti.com \
    --cc=praneeth@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vigneshr@ti.com \
    --cc=vijayp@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).