diff mbox

[media] s5p-jpeg: Make the output format setting conditional

Message ID 1332156889-8175-1-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat March 19, 2012, 11:34 a.m. UTC
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 <sachin.kamat@linaro.org>
---
 drivers/media/video/s5p-jpeg/jpeg-core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Comments

Andrzej Pietrasiewicz March 19, 2012, 3:34 p.m. UTC | #1
Hello,

On March 19, 2012 12:35 PM Sachin Kamat wrote:

> Subject: [PATCH] [media] s5p-jpeg: Make the output format setting
conditional
> 
> 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 <sachin.kamat@linaro.org>
> ---
>  drivers/media/video/s5p-jpeg/jpeg-core.c |    5 ++++-

<snip>

This has already been submitted and been pulled by Mauro:

http://git.linuxtv.org/media_tree.git/commit/fb6f8c0269644a19ee5e9bd6db080b3
64ab28ea7

Andrzej
Sachin Kamat March 20, 2012, 3:50 a.m. UTC | #2
Hi Andrzej,


On 19/03/2012, Andrzej Pietrasiewicz <andrzej.p@samsung.com> wrote:
> Hello,
>
> On March 19, 2012 12:35 PM Sachin Kamat wrote:
>
>> Subject: [PATCH] [media] s5p-jpeg: Make the output format setting
> conditional
>>
>> 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 <sachin.kamat@linaro.org>
>> ---
>>  drivers/media/video/s5p-jpeg/jpeg-core.c |    5 ++++-
>
> <snip>
>
> This has already been submitted and been pulled by Mauro:
>
> http://git.linuxtv.org/media_tree.git/commit/fb6f8c0269644a19ee5e9bd6db080b3
> 64ab28ea7

Thanks for the update. I did not notice this patch.
Please ignore my patch.

>
> Andrzej
>
>
>
>
diff mbox

Patch

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);
 	}