Re: [ivtv-devel] [patch] Fix DMA TIMEOUT lockups (for me at least, for the last 26 hours)

2007-07-28 Thread Hans Verkuil
On Friday 27 July 2007 16:00, Mark Bryars wrote:
 I already posted this patch yesterday but it was a hand crafted
 patch, so I'm resubmitting it properly with my latest results:

 Attached is the patch against 2.6.22.1 sources which I have been
 testing against 13 WinTV PVR-150 cards and 1 WinTV PVR-500, over the
 last 26 hours I have had no DMA TIMEOUTs, when normally I would have
 had 6 or 7.

 In my testing the cards also recover from a DMA TIMEOUT if you
 provoke one setting a stupidly low latency.

 You may also need Hans's VBI/PCM patch that is attached for
 convenience.

 Please report back on any successes/failures/side effects of this fix
 to the list.

 Regards,
  Mark Bryars

Thanks for your work on this. I never made the relationship between DMA 
size and DMA TIMEOUTs.

A very quick test yesterday suggested that this might indeed be the 
cause of the problems. What I want to figure out today is whether the 
gather-scatter DMA is indeed the problem and if replacing it with 
multiple 'simple' DMA calls will also fix the problem.

The reason is that allocating large buffers increases the chance that 
the buffer allocations will fail. Kernel allocation of large buffers is 
not recommended. Also, if the bitrate is increased to the maximum then 
a buffer size of 0x2 is probably not sufficient either.

Thanks,

Hans

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


Re: [ivtv-devel] [patch] Fix DMA TIMEOUT lockups (for me at least, for the last 26 hours)

2007-07-28 Thread Hans Verkuil
On Saturday 28 July 2007 12:35, Hans Verkuil wrote:
 On Friday 27 July 2007 16:00, Mark Bryars wrote:
  I already posted this patch yesterday but it was a hand crafted
  patch, so I'm resubmitting it properly with my latest results:
 
  Attached is the patch against 2.6.22.1 sources which I have been
  testing against 13 WinTV PVR-150 cards and 1 WinTV PVR-500, over
  the last 26 hours I have had no DMA TIMEOUTs, when normally I would
  have had 6 or 7.
 
  In my testing the cards also recover from a DMA TIMEOUT if you
  provoke one setting a stupidly low latency.
 
  You may also need Hans's VBI/PCM patch that is attached for
  convenience.
 
  Please report back on any successes/failures/side effects of this
  fix to the list.
 
  Regards,
   Mark Bryars

 Thanks for your work on this. I never made the relationship between
 DMA size and DMA TIMEOUTs.

 A very quick test yesterday suggested that this might indeed be the
 cause of the problems. What I want to figure out today is whether the
 gather-scatter DMA is indeed the problem and if replacing it with
 multiple 'simple' DMA calls will also fix the problem.

 The reason is that allocating large buffers increases the chance that
 the buffer allocations will fail. Kernel allocation of large buffers
 is not recommended. Also, if the bitrate is increased to the maximum
 then a buffer size of 0x2 is probably not sufficient either.

Preliminary results strongly suggest that it is indeed scatter/gather 
DMA that the card's DMA engine chokes on. If I handle this from within 
the driver as multiple single DMA transfers then everything seems to 
work.

Mark, very nice work! I never linked the large DMA transfers with the 
DMA timeouts.

Thanks,

Hans

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


Re: [ivtv-devel] [patch] Fix DMA TIMEOUT lockups (for me at least, for the last 26 hours)

2007-07-28 Thread John Drescher
 It appears the 128K buffer can not allocate at least in my 64 bit
 kernel but the 64K buffer allocates fine and when I then limit my
 transfers to 64K. I get lots of warnings and video artifacts:

Ok, setting the buffer size to 0x1F000 and limiting transfers to
0x1F000 seems to work for me. I am currently displaying both tuners at
the same time using mplayer and it appears that all is well. In the
past I was forced to use PIO with the older PVR250 as it had serious
problems with dma. After 10 minutes I am not calling this one fixed
but it looks promising.

John

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel