From patchwork Mon Mar 19 11:34:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 7355 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 186BF23E13 for ; Mon, 19 Mar 2012 11:42:17 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id C482FA186D7 for ; Mon, 19 Mar 2012 11:42:16 +0000 (UTC) Received: by iage36 with SMTP id e36so12427542iag.11 for ; Mon, 19 Mar 2012 04:42:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=OJmzR8JXc0H4f5wpJnBzH4bAjn19pHB3hwMi1IFYMEY=; b=gTNsO7ir4H8WbjJiMZdsYZF9fRL6sCo6g4j6aOgzjHnpuTrCxicPw1Klgz0XrZOQzY 1582Xf2m6F2464RBT7QwD40irll8crndJeaa8Ru+aC6hVjOZSjGZa7iKVpp619qaoh0m HlaDr96fBGf/eFmZEJnHe6oqFcUjkNjyjXFqzSwuGrgyeu/BpSThZuAzhJwMAAiknqTo GCqIbiBokuPE5Y+jiVPkf1DVUANdrlqn4+8WaqmCM8VnGUpg/BJETPL8E65N8iWm7Ao7 wP3RZzjSe7NPGuSfui13WB3BKrgruuZ4vsB1zRw80EeRE+jFPK2YYRW5xzijiY1AIg5j RmQw== Received: by 10.50.155.229 with SMTP id vz5mr5689793igb.12.1332157336271; Mon, 19 Mar 2012 04:42:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.203.79 with SMTP id fh15csp69767ibb; Mon, 19 Mar 2012 04:42:15 -0700 (PDT) Received: by 10.236.155.101 with SMTP id i65mr12105675yhk.52.1332157335155; Mon, 19 Mar 2012 04:42:15 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id d68si12258572yhe.46.2012.03.19.04.42.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Mar 2012 04:42:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by yhjj63 with SMTP id j63so6514358yhj.37 for ; Mon, 19 Mar 2012 04:42:14 -0700 (PDT) Received: by 10.68.229.33 with SMTP id sn1mr39854025pbc.59.1332157334513; Mon, 19 Mar 2012 04:42:14 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id b7sm11196896pba.2.2012.03.19.04.42.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Mar 2012 04:42:13 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, andrzej.p@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] [media] s5p-jpeg: Make the output format setting conditional Date: Mon, 19 Mar 2012 17:04:49 +0530 Message-Id: <1332156889-8175-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmNe2pnqzJrs5/dUQwDPNW0Ly5hHrW0uTYhkIIZpakoqy5ZEPgMMOngcW8+YzdbiVdSBfuv S5P-JPEG IP on Exynos4210 SoC supports YCbCr422 and YCbCr420 as decoded output formats. But the driver used to fix the output format as YCbCr422. This is now made conditional depending upon the requested output format. Signed-off-by: Sachin Kamat --- drivers/media/video/s5p-jpeg/jpeg-core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/video/s5p-jpeg/jpeg-core.c index 1105a87..ee78fb2 100644 --- a/drivers/media/video/s5p-jpeg/jpeg-core.c +++ b/drivers/media/video/s5p-jpeg/jpeg-core.c @@ -957,7 +957,10 @@ static void s5p_jpeg_device_run(void *priv) jpeg_rst_int_enable(jpeg->regs, true); jpeg_data_num_int_enable(jpeg->regs, true); jpeg_final_mcu_num_int_enable(jpeg->regs, true); - jpeg_outform_raw(jpeg->regs, S5P_JPEG_RAW_OUT_422); + if (ctx->cap_q.fmt->fourcc == V4L2_PIX_FMT_YUYV) + jpeg_outform_raw(jpeg->regs, S5P_JPEG_RAW_OUT_422); + else + jpeg_outform_raw(jpeg->regs, S5P_JPEG_RAW_OUT_420); jpeg_jpgadr(jpeg->regs, src_addr); jpeg_imgadr(jpeg->regs, dst_addr); }