From: Thierry Escande <thierry.escande@collabora.com>
To: Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] [media] s5p-jpeg: Correct WARN_ON statement for checking subsampling
Date: Fri, 2 Jun 2017 18:02:50 +0200 [thread overview]
Message-ID: <1496419376-17099-4-git-send-email-thierry.escande@collabora.com> (raw)
In-Reply-To: <1496419376-17099-1-git-send-email-thierry.escande@collabora.com>
From: Tony K Nadackal <tony.kn@samsung.com>
Corrects the WARN_ON statement for subsampling based on the
JPEG Hardware version.
Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
---
drivers/media/platform/s5p-jpeg/jpeg-core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 6fb1ab4..0d83948 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -614,24 +614,26 @@ static inline struct s5p_jpeg_ctx *fh_to_ctx(struct v4l2_fh *fh)
static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx *ctx)
{
- WARN_ON(ctx->subsampling > 3);
-
switch (ctx->jpeg->variant->version) {
case SJPEG_S5P:
+ WARN_ON(ctx->subsampling > 3);
if (ctx->subsampling > 2)
return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
return ctx->subsampling;
case SJPEG_EXYNOS3250:
case SJPEG_EXYNOS5420:
+ WARN_ON(ctx->subsampling > 6);
if (ctx->subsampling > 3)
return V4L2_JPEG_CHROMA_SUBSAMPLING_411;
return exynos3250_decoded_subsampling[ctx->subsampling];
case SJPEG_EXYNOS4:
case SJPEG_EXYNOS5433:
+ WARN_ON(ctx->subsampling > 3);
if (ctx->subsampling > 2)
return V4L2_JPEG_CHROMA_SUBSAMPLING_420;
return exynos4x12_decoded_subsampling[ctx->subsampling];
default:
+ WARN_ON(ctx->subsampling > 3);
return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
}
}
--
2.7.4
next prev parent reply other threads:[~2017-06-02 16:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 16:02 [PATCH 0/9] [media] s5p-jpeg: Various fixes and improvements Thierry Escande
2017-06-02 16:02 ` [PATCH 1/9] [media] s5p-jpeg: Reset the Codec before doing a soft reset Thierry Escande
2017-06-02 19:50 ` Jacek Anaszewski
2017-06-07 12:34 ` Thierry Escande
2017-06-13 18:46 ` Jacek Anaszewski
2017-06-14 12:03 ` Andrzej Pietrasiewicz
2017-06-02 16:02 ` [PATCH 2/9] [media] s5p-jpeg: Call jpeg_bound_align_image after qbuf Thierry Escande
2017-06-02 21:27 ` Jacek Anaszewski
2017-06-02 16:02 ` Thierry Escande [this message]
2017-06-02 16:02 ` [PATCH 4/9] [media] s5p-jpeg: Decode 4:1:1 chroma subsampling format Thierry Escande
2017-06-02 21:34 ` Jacek Anaszewski
2017-06-02 16:02 ` [PATCH 5/9] [media] s5p-jpeg: Add IOMMU support Thierry Escande
2017-06-02 21:43 ` Jacek Anaszewski
2017-06-19 6:16 ` Marek Szyprowski
2017-06-03 0:46 ` Shuah Khan
[not found] ` <CGME20170605113718epcas5p3edec0d42b03181649f06ae9b5bbd6a65@epcas5p3.samsung.com>
2017-06-05 11:37 ` Sylwester Nawrocki
2017-06-02 16:02 ` [PATCH 6/9] [media] s5p-jpeg: Add support for resolution change event Thierry Escande
2017-06-02 21:53 ` Jacek Anaszewski
2017-06-07 15:27 ` Thierry Escande
2017-06-02 16:02 ` [PATCH 7/9] [media] s5p-jpeg: Change sclk_jpeg to 166MHz for Exynos5250 Thierry Escande
2017-06-02 21:58 ` Jacek Anaszewski
2017-06-05 10:26 ` Sylwester Nawrocki
2017-06-02 16:02 ` [PATCH 8/9] [media] s5p-jpeg: Add stream error handling for Exynos5420 Thierry Escande
2017-06-02 16:02 ` [PATCH 9/9] [media] s5p-jpeg: Add support for multi-planar APIs Thierry Escande
2017-06-02 22:04 ` Jacek Anaszewski
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=1496419376-17099-4-git-send-email-thierry.escande@collabora.com \
--to=thierry.escande@collabora.com \
--cc=andrzej.p@samsung.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®