public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Boris Brezillon <boris.brezillon@collabora.com>
Subject: Re: [PATCH 3/3] cedrus: fix various format-related compliance issues
Date: Tue, 03 Sep 2019 17:43:31 +0200	[thread overview]
Message-ID: <3724097.viA1KGSQxa@jernej-laptop> (raw)
In-Reply-To: <20190830092624.18228-4-hverkuil-cisco@xs4all.nl>

Hi!

Dne petek, 30. avgust 2019 ob 11:26:24 CEST je Hans Verkuil napisal(a):
> Initialize the context on open() with valid capture and output
> formats. It is good practice to always have valid formats internally.
> 
> This solves one vb2 warning in the kernel log where the sizeimage
> value of the output format was 0 when requesting buffers, which is
> not allowed.
> 
> It also simplifies the g_fmt ioctl implementations since they no longer
> have to check if a valid format was ever set.
> 
> cedrus_prepare_format() now also validates sizeimage for the output
> formats, ensuring userspace can't set it to 0 since that would cause
> the same vb2 warning.
> 
> Finally remove the sizeimage == 0 check in cedrus_try_fmt_vid_out()
> since cedrus_prepare_format() will now adjust this value.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
>  drivers/staging/media/sunxi/cedrus/cedrus.c   | 10 +++++++
>  .../staging/media/sunxi/cedrus/cedrus_video.c | 28 ++-----------------
>  .../staging/media/sunxi/cedrus/cedrus_video.h |  1 +
>  3 files changed, 14 insertions(+), 25 deletions(-)

Selecting default format needs to be expanded to select default format based 
on compatible. SoCs with Display Engine 2 and 3 don't know how to display 
tiled formats directly. But that's out of scope for this series.

Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



      reply	other threads:[~2019-09-03 15:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  9:26 [PATCH 0/3] cedrus: v4l2-compliance fixes Hans Verkuil
2019-08-30  9:26 ` [PATCH 1/3] cedrus: fill in bus_info for media device Hans Verkuil
2019-09-03 15:39   ` Jernej Škrabec
2019-08-30  9:26 ` [PATCH 2/3] cedrus: choose default pixelformat in try_fmt Hans Verkuil
2019-09-03 15:40   ` Jernej Škrabec
2019-08-30  9:26 ` [PATCH 3/3] cedrus: fix various format-related compliance issues Hans Verkuil
2019-09-03 15:43   ` Jernej Škrabec [this message]

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=3724097.viA1KGSQxa@jernej-laptop \
    --to=jernej.skrabec@siol.net \
    --cc=boris.brezillon@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=paul.kocialkowski@bootlin.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