All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Maxime Jourdan <mjourdan@baylibre.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 01/14] v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite
Date: Wed, 24 Jul 2019 13:05:10 +0200	[thread overview]
Message-ID: <20190724110523.29248-2-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190724110523.29248-1-hverkuil-cisco@xs4all.nl>

If a driver sets a FMT flag in the enum_fmt op, then that will be
ignored since v4l_fill_fmtdesc() overwrites it again.

v4l_fill_fmtdesc() should OR its flag, not overwrite it.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 80efc581e3f9..911a20f915c5 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1390,7 +1390,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 
 	if (descr)
 		WARN_ON(strscpy(fmt->description, descr, sz) < 0);
-	fmt->flags = flags;
+	fmt->flags |= flags;
 }
 
 static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,
-- 
2.20.1


  reply	other threads:[~2019-07-24 11:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 11:05 [PATCH 00/14] Stateful/stateless codec core support Hans Verkuil
2019-07-24 11:05 ` Hans Verkuil [this message]
2019-07-24 13:22   ` [PATCH 01/14] v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite Philipp Zabel
2019-07-24 13:30     ` Hans Verkuil
2019-07-24 14:34       ` Philipp Zabel
2019-07-24 11:05 ` [PATCH 02/14] videodev2.h: add V4L2_FMT_FLAG_HAS_BITSTREAM_PARSER Hans Verkuil
2019-07-27  9:37   ` Paul Kocialkowski
2019-07-28 14:05     ` Tomasz Figa
2019-07-29 13:12       ` Paul Kocialkowski
2019-07-29 13:18         ` Tomasz Figa
2019-07-30  7:21           ` Hans Verkuil
2019-08-01 14:24             ` Nicolas Dufresne
2019-07-24 11:05 ` [PATCH 03/14] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-07-24 11:05 ` [PATCH 04/14] videodev2.h.rst.exceptions: tymecode -> timecode Hans Verkuil
2019-07-27  9:43   ` Paul Kocialkowski
2019-07-24 11:05 ` [PATCH 05/14] media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-07-24 11:05 ` [PATCH 06/14] media: s5p_mfc_dec: set flags for OUTPUT coded formats Hans Verkuil
2019-07-26  9:12 ` [PATCH 00/14] Stateful/stateless codec core support Hans Verkuil
2019-07-24 11:10 Hans Verkuil
2019-07-24 11:10 ` [PATCH 01/14] v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite Hans Verkuil
2019-07-24 11:27 [PATCH 00/14] Stateful/stateless codec core support (resend) Hans Verkuil
2019-07-24 11:27 ` [PATCH 01/14] v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite Hans Verkuil

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=20190724110523.29248-2-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=acourbot@chromium.org \
    --cc=boris.brezillon@collabora.com \
    --cc=ezequiel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=mjourdan@baylibre.com \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=s.nawrocki@samsung.com \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.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.