All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: TW686x Linux Main Line Driver Issue
       [not found] <CAOxqCCT6MOCLG+HHsuOU0zoq1zxRRJNFn0DYz9tOj-ez7+BNRA@mail.gmail.com>
@ 2017-04-20 14:12   ` Ezequiel Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2017-04-20 14:12 UTC (permalink / raw)
  To: Anuradha Ranasinghe
  Cc: linux-media, Lakshitha Dayasena, Krishan Nilanga, linux-pci,
	l.stach, Richard.Zhu

On 20 April 2017 at 07:10, Anuradha Ranasinghe <anuradha@tengriaero.com> wrote:
> Dear All,
>
> This issue is associated to the Linux Mainline Kernel 4.1.15.2 (branch2)
> tw686x upstream driver and IMX6Q platform.
>
> We have an analog camera capture board (a custom one) based around tw6865.
> We are interfacing it with Nitrogen6_Max board (IMX6Q) . We use the
> aforementioned kernel with the boundary devices latest patches to the tw686x
> driver (having 3 DMA buffers) and system running on Ubuntu 16 Xenial Mate
> version.
> https://github.com/boundarydevices/linux-imx6/commits/7fcd22da6d731b36e5ab856551c41301fca9881f
>
> The driver initialization, device and composite signal detection work well
> as intended. But when the streaming started, frame rate becomes lower and
> after few frames, the whole system freezes. To get the camera to work to
> this level, we had to do :
>

What dma-mode are you using? Have you tried other dma-modes?

How many frames do you manage to obtain? I believe you should
debug this further and provide more information.

> 1. Disable PCI interrupts from the kernel (from menuconfig and pci=nomsi
> kernel command)

(CCing PCI people) Lucas, Richard: any idea about why is this parameter needed?

> 2. Set Coherent_Pool to 128M in boot args to get the memory allocation for
> driver. Without this driver does not enumerate.
>

Hm.. interesting.

> I can confirm that there is no issue in our hardware. I strictly followed
> the free scale data sheet recommendations. So I have few questions needing
> your answers :
>
>> Have you guys tried this driver for tw6865 or a related chip on same root
>> fs ? If not can you kindly mention the operating condition you had ?

FWIW, I have tested tw6869 on x86_64. It works well here, but only
using dma-mode=memcpy, as documented here:

http://lxr.free-electrons.com/source/drivers/media/pci/tw686x/tw686x-core.c#L19

>> Is attached patch required for higher kernel versions (4.1.15) to support
>> DMA accessing ?

I have no idea about that patch. The patch has nothing to do with tw686x,
but it's i.MX6 platform-specific, you should ask the author.

>> Is there any additional settings (cma allocation, memory mapping) required
>> for this newer kernel ?

That depends on your platform and usage.

>> I use the pipeline :
> gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=720,height=480
> ! autovideosink
> for an unknown reason, imxv4l2videosrc does not work at all for this pcie
> camera.
>

You need to ask imxv4l2videosrc's authors.

-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TW686x Linux Main Line Driver Issue
@ 2017-04-20 14:12   ` Ezequiel Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2017-04-20 14:12 UTC (permalink / raw)
  To: Anuradha Ranasinghe
  Cc: linux-media, Lakshitha Dayasena, Krishan Nilanga, linux-pci,
	l.stach, Richard.Zhu

On 20 April 2017 at 07:10, Anuradha Ranasinghe <anuradha@tengriaero.com> wr=
ote:
> Dear All,
>
> This issue is associated to the Linux Mainline Kernel 4.1.15.2 (branch2)
> tw686x upstream driver and IMX6Q platform.
>
> We have an analog camera capture board (a custom one) based around tw6865=
.
> We are interfacing it with Nitrogen6_Max board (IMX6Q) . We use the
> aforementioned kernel with the boundary devices latest patches to the tw6=
86x
> driver (having 3 DMA buffers) and system running on Ubuntu 16 Xenial Mate
> version.
> https://github.com/boundarydevices/linux-imx6/commits/7fcd22da6d731b36e5a=
b856551c41301fca9881f
>
> The driver initialization, device and composite signal detection work wel=
l
> as intended. But when the streaming started, frame rate becomes lower and
> after few frames, the whole system freezes. To get the camera to work to
> this level, we had to do :
>

What dma-mode are you using? Have you tried other dma-modes?

How many frames do you manage to obtain? I believe you should
debug this further and provide more information.

> 1. Disable PCI interrupts from the kernel (from menuconfig and pci=3Dnoms=
i
> kernel command)

(CCing PCI people) Lucas, Richard: any idea about why is this parameter nee=
ded?

> 2. Set Coherent_Pool to 128M in boot args to get the memory allocation fo=
r
> driver. Without this driver does not enumerate.
>

Hm.. interesting.

> I can confirm that there is no issue in our hardware. I strictly followed
> the free scale data sheet recommendations. So I have few questions needin=
g
> your answers :
>
>> Have you guys tried this driver for tw6865 or a related chip on same roo=
t
>> fs ? If not can you kindly mention the operating condition you had ?

FWIW, I have tested tw6869 on x86_64. It works well here, but only
using dma-mode=3Dmemcpy, as documented here:

http://lxr.free-electrons.com/source/drivers/media/pci/tw686x/tw686x-core.c=
#L19

>> Is attached patch required for higher kernel versions (4.1.15) to suppor=
t
>> DMA accessing ?

I have no idea about that patch. The patch has nothing to do with tw686x,
but it's i.MX6 platform-specific, you should ask the author.

>> Is there any additional settings (cma allocation, memory mapping) requir=
ed
>> for this newer kernel ?

That depends on your platform and usage.

>> I use the pipeline :
> gst-launch-1.0 v4l2src device=3D/dev/video0 ! video/x-raw,width=3D720,hei=
ght=3D480
> ! autovideosink
> for an unknown reason, imxv4l2videosrc does not work at all for this pcie
> camera.
>

You need to ask imxv4l2videosrc's authors.

--=20
Ezequiel Garc=C3=ADa, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TW686x Linux Main Line Driver Issue
  2017-04-20 14:12   ` Ezequiel Garcia
  (?)
@ 2017-04-24 10:38   ` Lucas Stach
       [not found]     ` <CAKXQXwLuG1A37NTPrE0abPWhMDGd=10Ud+xNa-4+k+8qMhD8tA@mail.gmail.com>
  -1 siblings, 1 reply; 5+ messages in thread
From: Lucas Stach @ 2017-04-24 10:38 UTC (permalink / raw)
  To: Ezequiel Garcia
  Cc: Anuradha Ranasinghe, linux-media, Lakshitha Dayasena,
	Krishan Nilanga, linux-pci, Richard.Zhu

Am Donnerstag, den 20.04.2017, 11:12 -0300 schrieb Ezequiel Garcia:
> On 20 April 2017 at 07:10, Anuradha Ranasinghe <anuradha@tengriaero.com> wrote:
> > Dear All,
> >
> > This issue is associated to the Linux Mainline Kernel 4.1.15.2 (branch2)
> > tw686x upstream driver and IMX6Q platform.
> >
> > We have an analog camera capture board (a custom one) based around tw6865.
> > We are interfacing it with Nitrogen6_Max board (IMX6Q) . We use the
> > aforementioned kernel with the boundary devices latest patches to the tw686x
> > driver (having 3 DMA buffers) and system running on Ubuntu 16 Xenial Mate
> > version.
> > https://github.com/boundarydevices/linux-imx6/commits/7fcd22da6d731b36e5ab856551c41301fca9881f
> >
> > The driver initialization, device and composite signal detection work well
> > as intended. But when the streaming started, frame rate becomes lower and
> > after few frames, the whole system freezes. To get the camera to work to
> > this level, we had to do :
> >
> 
> What dma-mode are you using? Have you tried other dma-modes?
> 
> How many frames do you manage to obtain? I believe you should
> debug this further and provide more information.
> 
> > 1. Disable PCI interrupts from the kernel (from menuconfig and pci=nomsi
> > kernel command)
> 
> (CCing PCI people) Lucas, Richard: any idea about why is this parameter needed?

Does the device support MSI IRQs?

If it only supports legacy IRQs this might be a known issue, where
legacy IRQs won't work with the designware host controller if MSI IRQs
are configured. I'm working on a patch to get around this issue.

Regards,
Lucas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TW686x Linux Main Line Driver Issue
       [not found]       ` <CAKXQXwKeA6YCaepmjJJBf+Nc3bOO9aEnGmnHfnb2aDX3f6YXzw@mail.gmail.com>
@ 2017-04-25 14:15           ` Ezequiel Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2017-04-25 14:15 UTC (permalink / raw)
  To: Krishan Nilanga
  Cc: Lucas Stach, Anuradha Ranasinghe, linux-media,
	Lakshitha Dayasena, linux-pci, Richard.Zhu

Hi Krishan,

On 25 April 2017 at 03:46, Krishan Nilanga <krishan@tengriaero.com> wrote:
> Hi All,
>
> gst-launch-1.0 --gst-debug=3 v4l2src device=/dev/video0 !
> video/x-raw,width=640,height=480,pixelformat=UYVY ! imxeglvivsink
>
> I have tried to run the above gstreamer pipeline and I'm getting
>
> [   97.392807] tw686x 0000:01:00.0: DMA timeout. Resetting DMA for all
> channels
> [   97.392827] tw686x 0000:01:00.0: reset: stopping DMA
>
> for most IRQ calls of tw686x driver.
>
> for some other IRQ calls I'm getting
>
> [   99.592901] tw686x 0000:01:00.0: video0: unexpected p-b buffer!
> [   99.592924] tw686x 0000:01:00.0: reset: stopping DMA
>
> in dmesg.
>
> I hope above details will help to understand the problem.
>

This does not provide much info. It merely says there is some hardware
problem or the signal is being problematic. FWIW, when we get those
messages on our platform it's always correlated to a bad cable
or poor signal.

What is your dma-mode configuration?
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TW686x Linux Main Line Driver Issue
@ 2017-04-25 14:15           ` Ezequiel Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2017-04-25 14:15 UTC (permalink / raw)
  To: Krishan Nilanga
  Cc: Lucas Stach, Anuradha Ranasinghe, linux-media,
	Lakshitha Dayasena, linux-pci, Richard.Zhu

Hi Krishan,

On 25 April 2017 at 03:46, Krishan Nilanga <krishan@tengriaero.com> wrote:
> Hi All,
>
> gst-launch-1.0 --gst-debug=3D3 v4l2src device=3D/dev/video0 !
> video/x-raw,width=3D640,height=3D480,pixelformat=3DUYVY ! imxeglvivsink
>
> I have tried to run the above gstreamer pipeline and I'm getting
>
> [   97.392807] tw686x 0000:01:00.0: DMA timeout. Resetting DMA for all
> channels
> [   97.392827] tw686x 0000:01:00.0: reset: stopping DMA
>
> for most IRQ calls of tw686x driver.
>
> for some other IRQ calls I'm getting
>
> [   99.592901] tw686x 0000:01:00.0: video0: unexpected p-b buffer!
> [   99.592924] tw686x 0000:01:00.0: reset: stopping DMA
>
> in dmesg.
>
> I hope above details will help to understand the problem.
>

This does not provide much info. It merely says there is some hardware
problem or the signal is being problematic. FWIW, when we get those
messages on our platform it's always correlated to a bad cable
or poor signal.

What is your dma-mode configuration?
--=20
Ezequiel Garc=C3=ADa, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-25 14:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAOxqCCT6MOCLG+HHsuOU0zoq1zxRRJNFn0DYz9tOj-ez7+BNRA@mail.gmail.com>
2017-04-20 14:12 ` TW686x Linux Main Line Driver Issue Ezequiel Garcia
2017-04-20 14:12   ` Ezequiel Garcia
2017-04-24 10:38   ` Lucas Stach
     [not found]     ` <CAKXQXwLuG1A37NTPrE0abPWhMDGd=10Ud+xNa-4+k+8qMhD8tA@mail.gmail.com>
     [not found]       ` <CAKXQXwKeA6YCaepmjJJBf+Nc3bOO9aEnGmnHfnb2aDX3f6YXzw@mail.gmail.com>
2017-04-25 14:15         ` Ezequiel Garcia
2017-04-25 14:15           ` Ezequiel Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.