Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675953
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thierry Escande <thierry.escande@collabora.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 2/8] [media] s5p-jpeg: Correct WARN_ON statement for checking subsampling |
| Date | Tue, 27 Jun 2017 18:10:03 +0200 |
| Message-ID | <tX1dV-2UD-35@gated-at.bofh.it> (permalink) |
| References | <tX1dT-2UD-7@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.7.4 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset = "utf-8" |
| Content-Transfert-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-media@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 27 Jun 2017 18:08:48 +0200 |
| X-Original-Message-ID | <1498579734-1594-3-git-send-email-thierry.escande@collabora.com> |
| X-Original-References | <1498579734-1594-1-git-send-email-thierry.escande@collabora.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1675953 |
Show key headers only | View raw
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 623508d..0d935f5 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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v3 2/8] [media] s5p-jpeg: Correct WARN_ON statement for checking subsampling Thierry Escande <thierry.escande@collabora.com> - 2017-06-27 18:10 +0200 Re: [PATCH v3 2/8] [media] s5p-jpeg: Correct WARN_ON statement for checking subsampling Andrzej Pietrasiewicz <andrzej.p@samsung.com> - 2017-06-29 14:10 +0200
csiph-web