Patchwork gstreamer strange distorted image.

login
register
mail settings
Submitter Dennis Han
Date Sept. 16, 2013, 8:49 a.m.
Message ID <COL125-DS209B6ADA9514ECF0B5066E87260@phx.gbl>
Download mbox | patch
Permalink /patch/58095/
State Not Applicable
Delegated to: Otavio Salvador
Headers show

Comments

Dennis Han - Sept. 16, 2013, 8:49 a.m.
Hi Leonardo.
The patch doesn't work at all.
But, I think it relates to ipu fb (mxc_ipuv3_fb).

Still testing on fb, especially, fb_pix_fmt.

And, 

I found another thing.
It's not related my issue though,

In mxc_ipuv3_fb.c
Line 1322, 
case MXCFB_CSC_UPDATE  statement.
There is no "break" 

Is it intended ?


Salvador 
I did update the report.
Bug 5202 Bugzilla.



-----Original Message-----
From: Sandoval Gonzalez Leonardo-B42214 [mailto:B42214@freescale.com] 
Sent: Monday, September 16, 2013 1:20 PM
To: Otavio Salvador
Cc: Dennis Han; meta-freescale@yoctoproject.org
Subject: RE: [meta-freescale] gstreamer strange distorted image.

Sure Otavio, I will send the correct patch soon.

Dennis, in the meantime, can you try the one below:

From 6ae2813aed1063143400de8fe111a9d9a6130a4a Mon Sep 17 00:00:00 2001
From: Oliver Brown <b37094@b37094-vmlinux.(none)>
Date: Wed, 24 Jul 2013 00:20:26 -0500
Subject: [PATCH] ENGR00272541 [IPU] -  IC_RSZ_MAX_RESIZE_RATIO should be set
to 0x2000

The max resize ratio should be set to 0x2000 (or 8192).

Signed-off-by: Oliver Brown <b37094@b37094-vmlinux.(none)>
---
 drivers/mxc/ipu3/ipu_regs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)  mode change 100644 => 100755
drivers/mxc/ipu3/ipu_regs.h

--
1.7.9.5
Otavio Salvador - Sept. 16, 2013, 11:07 a.m.
On Mon, Sep 16, 2013 at 5:49 AM, Dennis Han <jshan@live.co.kr> wrote:
> Hi Leonardo.
> The patch doesn't work at all.
> But, I think it relates to ipu fb (mxc_ipuv3_fb).
>
> Still testing on fb, especially, fb_pix_fmt.
>
> And,
>
> I found another thing.
> It's not related my issue though,
>
> In mxc_ipuv3_fb.c
> Line 1322,
> case MXCFB_CSC_UPDATE  statement.
> There is no "break"
>
> Is it intended ?
>
>
> Salvador
> I did update the report.
> Bug 5202 Bugzilla.

Good; so let's use it to track the progress for it.
Dennis Han - Sept. 16, 2013, 2:05 p.m.
Well, I just solved (?) my issue.

But, I don't think it would be the correct fix.

Anyway, I want to explain the reason for distorted images.
There is mxc_fbi->fb_pix_fmt value in mxc_ipuv3_fb.c taking from u-boot
parameter.
So, default would be IPU_PIX_FMT_RGB24 like mine. (if set HDMI).

Almost every video clips I have tested ok and not distorted.
In kernel ipu fb driver, It doesn't change the format while v4l update
(crop, panning resize)
Yes, this time, ipu fb stream is IPU_PIX_FMT_RGB24 format.

But the video clip that I attached before not like those. 
And it suddenly changed to NV12 format while v4l update.
I don't know why. Somebody explain to me.

So, I changed to the code to recheck the pixel format when
_setup_disp_channel1 and set it to mxc_fbi->fb_pix_fmt.
After that the video clip is normally displaying and no more distorted.

Any comment would be appreciated.


-----Original Message-----
From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On Behalf
Of Otavio Salvador
Sent: Monday, September 16, 2013 8:08 PM
To: Dennis Han
Cc: Sandoval Gonzalez Leonardo-B42214; meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] gstreamer strange distorted image.

On Mon, Sep 16, 2013 at 5:49 AM, Dennis Han <jshan@live.co.kr> wrote:
> Hi Leonardo.
> The patch doesn't work at all.
> But, I think it relates to ipu fb (mxc_ipuv3_fb).
>
> Still testing on fb, especially, fb_pix_fmt.
>
> And,
>
> I found another thing.
> It's not related my issue though,
>
> In mxc_ipuv3_fb.c
> Line 1322,
> case MXCFB_CSC_UPDATE  statement.
> There is no "break"
>
> Is it intended ?
>
>
> Salvador
> I did update the report.
> Bug 5202 Bugzilla.

Good; so let's use it to track the progress for it.

Patch

diff --git a/drivers/mxc/ipu3/ipu_regs.h b/drivers/mxc/ipu3/ipu_regs.h old
mode 100644 new mode 100755 index 94c587e..f089f7d
--- a/drivers/mxc/ipu3/ipu_regs.h
+++ b/drivers/mxc/ipu3/ipu_regs.h
@@ -465,7 +465,7 @@  enum {
 	IC_CONF_RWS_EN = 0x40000000,
 	IC_CONF_CSI_MEM_WR_EN = 0x80000000,
 
-	IC_RSZ_MAX_RESIZE_RATIO = 0x00004000,
+	IC_RSZ_MAX_RESIZE_RATIO = 0x00002000,
 
 	IC_IDMAC_1_CB0_BURST_16 = 0x00000001,
 	IC_IDMAC_1_CB1_BURST_16 = 0x00000002,