public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: khalasa@piap.pl (Krzysztof Hałasa)
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: Support Intersil/Techwell TW686x-based video capture cards
Date: Mon, 25 Jan 2016 10:40:19 +0100	[thread overview]
Message-ID: <m31t96j8u4.fsf@t19.piap.pl> (raw)
In-Reply-To: <CAAEAJfCs1fipSadLj8WyxiJd9g7MCJj1KX5UdAPx1hPt16t0VA@mail.gmail.com> (Ezequiel Garcia's message of "Mon, 18 Jan 2016 12:20:59 -0300")

Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> writes:

> A previous version of the driver didn't have that. However, under certain
> stress testing it was observed that the PCIe link goes down. I still have the
> traces for that:
>
> [..]
> [21833.389031] pciehp 0000:13:01.0:pcie24: pcie_isr: intr_loc 100
> [21833.389035] pciehp 0000:13:01.0:pcie24: Data Link Layer State change
> [21833.389038] pciehp 0000:13:01.0:pcie24: slot(1-5): Link Down event
> [21833.389076] pciehp 0000:13:01.0:pcie24: Disabling
> domain:bus:device=0000:14:00
> [21833.389078] pciehp 0000:13:01.0:pcie24: pciehp_unconfigure_device:
> domain:bus:dev = 0000:14:00
> [21833.389103] TW686x 0000:14:00.0: removing
> [21833.416557] TW686x 0000:14:00.0: removed
> [..]
>
> I have no idea why the link goes down (hardware issue?),
> but it's better to handle it gracefully :)

Could be hw issue indeed, FWIW I have never observed this problem on my
hw (which is ARM-based and includes TW6869).

> I understand that on some platforms this implementation could be too
> costly (it's
> completely cheap on any modern x86), and I intend to provide some option
> to provide "frame DMA-to-buffer" and "scatter-gather DMA".

Though I'm using the driver that I posted several months ago, with
SG DMA field-only mode (SG DMA engine doesn't support frame mode and
while non-SG DMA (field or frame) mode is certainly possible with CMA,
copying the buffers is out of the question here).

I wonder if that driver works for you (which would suggest a sw bug)
or if the problems are the same (hw issue - system, power, or the chip
itself).


BTW adding incremental patches on top of the driver I posted would seem
preferable to me. It would enable us to pinpoint (and not include)
changes which tend to break something. For now, it seems I'll be stuck
with my version, since I have to do DMA to buffers (though I could use
the frame mode).

Incremental patches are generally how it is done in Linux.
Perhaps we should merge my driver first and you'd add your changes on
top of it (preserving the existing functionality)?

This is very easy with git.
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

  parent reply	other threads:[~2016-01-25  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27  2:26 [PATCH] media: Support Intersil/Techwell TW686x-based video capture cards Ezequiel Garcia
2016-01-18 13:02 ` Hans Verkuil
2016-01-18 15:20   ` Ezequiel Garcia
2016-01-18 15:28     ` Hans Verkuil
2016-01-18 15:31       ` Ezequiel Garcia
2016-01-25  9:40     ` Krzysztof Hałasa [this message]
2016-01-25 12:03       ` Ezequiel Garcia
2016-01-26 11:16         ` Krzysztof Hałasa
2016-01-26 12:35           ` Ezequiel Garcia
2016-01-26 15:00             ` Krzysztof Hałasa
2016-01-27 12:14               ` Ezequiel Garcia
2016-01-28  7:25                 ` Krzysztof Hałasa
2016-01-28  7:43                   ` Hans Verkuil
2016-01-28  8:51                     ` Krzysztof Hałasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31t96j8u4.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox