Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ivtv: devel

#0.3.2l minor code cleanup

 

 

ivtv devel RSS feed   Index | Next | Previous | View Threaded


ckennedy at kmos

Mar 23, 2005, 9:18 AM

Post #1 of 20 (1605 views)
Permalink
#0.3.2l minor code cleanup

This cleans up a bit more of the DMA code, removes some more unused code.
Please test this if you have had DMA problems, and if having VIA motherboard
problems in the past, or any other DMA errors.


http://ivtv.no-ip.info/ivtv-0.3/ivtv-0.3.2l.tgz


Thanks,
Chris
--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


lists at forevermore

Mar 23, 2005, 9:41 AM

Post #2 of 20 (1609 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

> This cleans up a bit more of the DMA code, removes some more unused code.
> Please test this if you have had DMA problems, and if having VIA motherboard
> problems in the past, or any other DMA errors.

Any chance of (re?)including the patch that let Allan tweak things to
get his s-video port working?

-Chris


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 10:01 AM

Post #3 of 20 (1628 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Sure, just resend it for this version, I must have missed that.

Thanks,
Chris
On Wed, Mar 23, 2005 at 08:41:44AM -0800, Chris Petersen wrote:
> >This cleans up a bit more of the DMA code, removes some more unused code.
> >Please test this if you have had DMA problems, and if having VIA
> >motherboard
> >problems in the past, or any other DMA errors.
>
> Any chance of (re?)including the patch that let Allan tweak things to
> get his s-video port working?
>
> -Chris
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


brent at forcomputerhelp

Mar 23, 2005, 10:59 AM

Post #4 of 20 (1594 views)
Permalink
RE: #0.3.2l minor code cleanup [In reply to]

I was having the dma deadlocking problem. I decided to try this version
since it's been a while since I updated.

I let it run for about 15 minutes with my dma on and it didn't lock up.
It HAS gone this long with dma before, will test longer after this
problem is fixed. But, the time it was running it seemed to be very
responsive (instant jump vs 3 second jumps)

When I return from a video stream in mythtv the screen is scrambled.
(horizontal white and black lines with traces of original color if it
helps)
If I blindly navigate back to a video stream, the entire x system
appears to freeze requiring reboot.

If this has been addressed on here before, I apologize. I haven't been
monitoring the list for a while.

-----Original Message-----
From: ivtv-devel-admin[at]lists.sourceforge.net
[mailto:ivtv-devel-admin[at]lists.sourceforge.net] On Behalf Of Chris
Kennedy
Sent: Wednesday, March 23, 2005 11:19 AM
To: ivtv-devel[at]lists.sourceforge.net
Subject: [ivtv-devel] #0.3.2l minor code cleanup

This cleans up a bit more of the DMA code, removes some more unused
code.
Please test this if you have had DMA problems, and if having VIA
motherboard
problems in the past, or any other DMA errors.


http://ivtv.no-ip.info/ivtv-0.3/ivtv-0.3.2l.tgz


Thanks,
Chris
--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon
2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.
Register
by 3/29 & save $300
http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


matthew at mxtelecom

Mar 23, 2005, 11:04 AM

Post #5 of 20 (1615 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Hi,

Chris Kennedy wrote:
> This cleans up a bit more of the DMA code, removes some more unused code.
> Please test this if you have had DMA problems, and if having VIA motherboard
> problems in the past, or any other DMA errors.

I'm afraid this hasn't fixed the issue I'm having with OSD performance on my
PVR-350 significantly reducing after DMAing to the decoder; on loading
0.3.2l ivtvfbctl -prepdma gives 33fps when displaying a 720x576 screen. I
then cat something.mpeg > /dev/video16, and then running the same ivtvfbctl
-prepdma gives 25fps.

Something I did notice, however, is that when running -prepdma with a
720x480 size frame, the problem doesn't present itself. In fact, it's only
when the DMA size gets to around the 720x520 mark that the fps starts to
fluctuate between 25fps and 33fps.

I've tried ramping up the PCI latency for the PVR-350 to maximum, but it
doesn't seem to make any difference. Likewise splitting the transfer into
two 720x288 chunks - or using PREP_DMA_BUF rather than PREP_DMA.

The only time it's worked recently has been with 0.3.2b using PREP_DMA_BUF -
but DMA then became unstable after a few days.

Can you think of anything which would be causing this? Perhaps a difference
between the number of DMA buffers that can be used of PAL size rather than
NTSC? For what it's worth, I'm not currently using the mpeg2 encoder on the
card - is there any chance that it might be somehow interfering with the
OSD, and if so, how do I turn it off?

cheers;

Matthew.

--
______________________________________________________________
Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
Systems Analyst, MX Telecom Ltd.


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 11:28 AM

Post #6 of 20 (1635 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Try this patch to 0.3.2l, maybe will help, I don't think we need the
vsync wait anymore for OSD DMA. The actual thing that seems to have
fixed this on my VIA and looks like a very promising fix, and the thing
I've been chasing for a very long time, is setting a pci register
different than the default. I just started looking closer at the
data sheet Axel Thimm sent us (thanks for that), for the cx23416,
which Conexant allowed Hauppauge to release to us finally a few months
back. That had in it, on page 66, the pci register values for PCI Bus
configuration. Well register 0x40 is very interesting, it's the
Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
the DMA timeouts on VIA and certain motherboards, and DMA errors. It
makes sense logically, I checked the windows driver, looked at the
system with a pci bus tool, and saw there the values are 0xff for
both, or 0x0000ffff for register 0x40, ours in linux (the default
acording to the datasheet) happens to be 0x00008080. So I maxed this
out, haven't had a DMA error or system lockup on my VIA system since.

So that's the reasoning, I think anyone out there who has had problems,
or says this chip isn't good at DMA, should now try this new version.
I think it will change your mind for the most part (admit there could be
other things, but this was the *BIG* one I've been chasing for a very
long time). Basically, we do DMA xfers, the PCI bus interface was set
to timeout at a low value and retry a small number of times, at least for
some motherboards (Intel ones seem fine, must have been what the default
values were tuned for), so the PCI bus was timing out in the middle of our
DMA xfers, retrying, and playing a game of random catastrophys depending
on our luck (which doesn't seem to be a good thing to stop the DMA xfer
in mid run and retry it multiple times, when waiting just a bit longer
would allow it to work, like twice as long it seems). That's my explanation,
of course just the datasheet and a windows pci probe shows the hard facts
of it being a setting changed by the windows driver, and my experience now
shows me it works perfectly under high DMA loads on a system which crashed
every time under certain tests it now works fine on.


diff -BurN ivtv-0.3.2l/driver/ivtv-osd.c ivtv-0.3.2m/driver/ivtv-osd.c
--- ivtv-0.3.2l/driver/ivtv-osd.c 2005-03-22 10:08:09.000000000 -0600
+++ ivtv-0.3.2m/driver/ivtv-osd.c 2005-03-23 12:16:50.000000000 -0600
@@ -1331,22 +1331,22 @@

/* Send DMA */
if (cmd == IVTVFB_IOCTL_PREP_FRAME) {
- if (wait_event_interruptible(itv->vsync_w_osd,
+ /*if (wait_event_interruptible(itv->vsync_w_osd,
atomic_read(&itv->
dec_dma_stat.
vsync_flag_osd)))
{
ret = -ERESTARTSYS;
} else {
- atomic_set(&itv->dec_dma_stat.vsync_flag_osd,
+ atomic_set(&itv->dec_dma_stat.vsync_flag_osd,*/
0);
ret =
ivtv_fb_prep_frame(itv, (args.dest_offset),
(args.source),
args.count);
- }
+ //}
} else if (cmd == IVTVFB_IOCTL_PREP_FRAME_BUF) {
- if (wait_event_interruptible(itv->vsync_w_osd,
+ /*if (wait_event_interruptible(itv->vsync_w_osd,
atomic_read(&itv->
dec_dma_stat.
vsync_flag_osd)))
@@ -1354,13 +1354,13 @@
ret = -ERESTARTSYS;
} else {
atomic_set(&itv->dec_dma_stat.vsync_flag_osd,
- 0);
+ 0);*/
ret =
ivtv_fb_prep_frame_buf(itv,
(args.dest_offset),
(args.source),
args.count);
- }
+ //}
} else if (cmd == IVTVFB_IOCTL_PREP_FRAME_YUV) {
if (wait_event_interruptible(itv->vsync_w_osd,
atomic_read(&itv->



Thanks,
Chris
On Wed, Mar 23, 2005 at 06:04:52PM +0000, Matthew Hodgson wrote:
> Hi,
>
> Chris Kennedy wrote:
> >This cleans up a bit more of the DMA code, removes some more unused code.
> >Please test this if you have had DMA problems, and if having VIA
> >motherboard
> >problems in the past, or any other DMA errors.
>
> I'm afraid this hasn't fixed the issue I'm having with OSD performance on
> my PVR-350 significantly reducing after DMAing to the decoder; on loading
> 0.3.2l ivtvfbctl -prepdma gives 33fps when displaying a 720x576 screen. I
> then cat something.mpeg > /dev/video16, and then running the same ivtvfbctl
> -prepdma gives 25fps.
>
> Something I did notice, however, is that when running -prepdma with a
> 720x480 size frame, the problem doesn't present itself. In fact, it's only
> when the DMA size gets to around the 720x520 mark that the fps starts to
> fluctuate between 25fps and 33fps.
>
> I've tried ramping up the PCI latency for the PVR-350 to maximum, but it
> doesn't seem to make any difference. Likewise splitting the transfer into
> two 720x288 chunks - or using PREP_DMA_BUF rather than PREP_DMA.
>
> The only time it's worked recently has been with 0.3.2b using PREP_DMA_BUF
> - but DMA then became unstable after a few days.
>
> Can you think of anything which would be causing this? Perhaps a
> difference between the number of DMA buffers that can be used of PAL size
> rather than NTSC? For what it's worth, I'm not currently using the mpeg2
> encoder on the card - is there any chance that it might be somehow
> interfering with the OSD, and if so, how do I turn it off?
>
> cheers;
>
> Matthew.
>
> --
> ______________________________________________________________
> Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
> Systems Analyst, MX Telecom Ltd.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 11:40 AM

Post #7 of 20 (1589 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Here's some tools to help check the pci bus registers, for those wanting
to try and research this too...

http://www.tssc.de/products/tools/pciscope/detail.htm

Thanks,
Chris
--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 11:53 AM

Post #8 of 20 (1590 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Also here's an explanation of general PCI data protocol transfering data
in writes/reads to a chip such as ours, so explains why the TRDY is an
important value and how it works with data transfers...

http://www.techfest.com/hardware/bus/pci.htm


Thanks,
Chris
On Wed, Mar 23, 2005 at 12:40:01PM -0600, Chris Kennedy wrote:
>
> Here's some tools to help check the pci bus registers, for those wanting
> to try and research this too...
>
> http://www.tssc.de/products/tools/pciscope/detail.htm
>
> Thanks,
> Chris
> --
> ---
> Chris Kennedy / ckennedy[at]kmos.cmsu.edu
> Engineer KMOS-TV/KTBG-FM
> Broadcasting Services Department
> Central Missouri State University
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 12:05 PM

Post #9 of 20 (1587 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Here's a free version, but of course alot more bare bones, pciscope
is very full featured, gets an easy raw dump of the pci registers
in the trial version, this pcimod tool is command line but free.

http://overclockers.com/articles583/

Thanks,
Chris

On Wed, Mar 23, 2005 at 12:40:01PM -0600, Chris Kennedy wrote:
>
> Here's some tools to help check the pci bus registers, for those wanting
> to try and research this too...
>
> http://www.tssc.de/products/tools/pciscope/detail.htm
>
> Thanks,
> Chris
> --
> ---
> Chris Kennedy / ckennedy[at]kmos.cmsu.edu
> Engineer KMOS-TV/KTBG-FM
> Broadcasting Services Department
> Central Missouri State University
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


alan at georgiabrands

Mar 23, 2005, 12:08 PM

Post #10 of 20 (1614 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Here is the original post on this. Unfortunately, I am not aware of an
actual patch that addresses this. My system is running 0.3.2j and it did
fix the same problem on my system.


---------------------------------------------------------------------------
I have a working SVideo input, however...

I'm currently using ivtv-0.3.2f-4kstacks-ioctl-sound. This provides a
nice (hacking) input to the cx25840 - cx25840ctl
. With this, after a channel is "tuned" in Myth, if I do:

echo INPUT_MODE=1|cx25840ctl -s

The input then switches from badly timed monochrome to perfect svideo.

However, looking at the cx25840 dump, there is no change to any of the
instrumented registers...

I'm at a loss how to progress this further. Does anyone have any clue?
Does SVideo "just work" with 0.3.2j? I'm going to try this now - I was
thinking that cx25840ctl hadn't been integrated and this was stopping me
from trying it.

Cheers,

Allan.


---------------------------------------------------------------------------



>
> Sure, just resend it for this version, I must have missed that.
>
> Thanks,
> Chris
> On Wed, Mar 23, 2005 at 08:41:44AM -0800, Chris Petersen wrote:
>> >This cleans up a bit more of the DMA code, removes some more unused
>> code.
>> >Please test this if you have had DMA problems, and if having VIA
>> >motherboard
>> >problems in the past, or any other DMA errors.
>>
>> Any chance of (re?)including the patch that let Allan tweak things to
>> get his s-video port working?
>>
>> -Chris
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon
>> 2005
>> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
>> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
>> Register
>> by 3/29 & save $300
>> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
>> _______________________________________________
>> ivtv-devel mailing list
>> ivtv-devel[at]lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>
> --
> ---
> Chris Kennedy / ckennedy[at]kmos.cmsu.edu
> Engineer KMOS-TV/KTBG-FM
> Broadcasting Services Department
> Central Missouri State University
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> Register
> by 3/29 & save $300
> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>
>



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ttrafford at gmail

Mar 23, 2005, 12:31 PM

Post #11 of 20 (1621 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Chris Petersen <lists[at]forevermore.net> wrote:
> Any chance of (re?)including the patch that let Allan tweak things to
> get his s-video port working?

The tool Allan used is already there: cx25840ctl.
--
Tyler Trafford


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


john.p.harvey at btinternet

Mar 23, 2005, 2:52 PM

Post #12 of 20 (1630 views)
Permalink
RE: #0.3.2l minor code cleanup [In reply to]

Chris
I think that vsync wants removing whatever. Since X is currently
doing 2 calls for large screen updates it means that a full screen X update
takes 2 vsync's which is bad.

I think in time it should possibly be an option to the prep frame call to
request a vsync'ed transfer, but for now I think this patch is correct.

John

> -----Original Message-----
> From: ivtv-devel-admin[at]lists.sourceforge.net [mailto:ivtv-devel-
> admin[at]lists.sourceforge.net] On Behalf Of Chris Kennedy
> Sent: 23 March 2005 18:28
> To: ivtv-devel[at]lists.sourceforge.net
> Subject: Re: [ivtv-devel] #0.3.2l minor code cleanup
>
> Try this patch to 0.3.2l, maybe will help, I don't think we need the
> vsync wait anymore for OSD DMA. The actual thing that seems to have
> fixed this on my VIA and looks like a very promising fix, and the thing
> I've been chasing for a very long time, is setting a pci register
> different than the default. I just started looking closer at the
> data sheet Axel Thimm sent us (thanks for that), for the cx23416,
> which Conexant allowed Hauppauge to release to us finally a few months
> back. That had in it, on page 66, the pci register values for PCI Bus
> configuration. Well register 0x40 is very interesting, it's the
> Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
> the DMA timeouts on VIA and certain motherboards, and DMA errors. It
> makes sense logically, I checked the windows driver, looked at the
> system with a pci bus tool, and saw there the values are 0xff for
> both, or 0x0000ffff for register 0x40, ours in linux (the default
> acording to the datasheet) happens to be 0x00008080. So I maxed this
> out, haven't had a DMA error or system lockup on my VIA system since.
>
> So that's the reasoning, I think anyone out there who has had problems,
> or says this chip isn't good at DMA, should now try this new version.
> I think it will change your mind for the most part (admit there could be
> other things, but this was the *BIG* one I've been chasing for a very
> long time). Basically, we do DMA xfers, the PCI bus interface was set
> to timeout at a low value and retry a small number of times, at least for
> some motherboards (Intel ones seem fine, must have been what the default
> values were tuned for), so the PCI bus was timing out in the middle of our
> DMA xfers, retrying, and playing a game of random catastrophys depending
> on our luck (which doesn't seem to be a good thing to stop the DMA xfer
> in mid run and retry it multiple times, when waiting just a bit longer
> would allow it to work, like twice as long it seems). That's my
> explanation,
> of course just the datasheet and a windows pci probe shows the hard facts
> of it being a setting changed by the windows driver, and my experience now
> shows me it works perfectly under high DMA loads on a system which crashed
> every time under certain tests it now works fine on.
>
>
> diff -BurN ivtv-0.3.2l/driver/ivtv-osd.c ivtv-0.3.2m/driver/ivtv-osd.c
> --- ivtv-0.3.2l/driver/ivtv-osd.c 2005-03-22 10:08:09.000000000 -
> 0600
> +++ ivtv-0.3.2m/driver/ivtv-osd.c 2005-03-23 12:16:50.000000000 -
> 0600
> @@ -1331,22 +1331,22 @@
>
> /* Send DMA */
> if (cmd == IVTVFB_IOCTL_PREP_FRAME) {
> - if (wait_event_interruptible(itv->vsync_w_osd,
> + /*if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
>
> dec_dma_stat.
>
> vsync_flag_osd)))
> {
> ret = -ERESTARTSYS;
> } else {
> - atomic_set(&itv-
> >dec_dma_stat.vsync_flag_osd,
> + atomic_set(&itv-
> >dec_dma_stat.vsync_flag_osd,*/
> 0);
> ret =
> ivtv_fb_prep_frame(itv,
> (args.dest_offset),
> (args.source),
> args.count);
> - }
> + //}
> } else if (cmd == IVTVFB_IOCTL_PREP_FRAME_BUF) {
> - if (wait_event_interruptible(itv->vsync_w_osd,
> + /*if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
>
> dec_dma_stat.
>
> vsync_flag_osd)))
> @@ -1354,13 +1354,13 @@
> ret = -ERESTARTSYS;
> } else {
> atomic_set(&itv-
> >dec_dma_stat.vsync_flag_osd,
> - 0);
> + 0);*/
> ret =
> ivtv_fb_prep_frame_buf(itv,
>
> (args.dest_offset),
> (args.source),
> args.count);
> - }
> + //}
> } else if (cmd == IVTVFB_IOCTL_PREP_FRAME_YUV) {
> if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
>
>
>
> Thanks,
> Chris
> On Wed, Mar 23, 2005 at 06:04:52PM +0000, Matthew Hodgson wrote:
> > Hi,
> >
> > Chris Kennedy wrote:
> > >This cleans up a bit more of the DMA code, removes some more unused
> code.
> > >Please test this if you have had DMA problems, and if having VIA
> > >motherboard
> > >problems in the past, or any other DMA errors.
> >
> > I'm afraid this hasn't fixed the issue I'm having with OSD performance
> on
> > my PVR-350 significantly reducing after DMAing to the decoder; on
> loading
> > 0.3.2l ivtvfbctl -prepdma gives 33fps when displaying a 720x576 screen.
> I
> > then cat something.mpeg > /dev/video16, and then running the same
> ivtvfbctl
> > -prepdma gives 25fps.
> >
> > Something I did notice, however, is that when running -prepdma with a
> > 720x480 size frame, the problem doesn't present itself. In fact, it's
> only
> > when the DMA size gets to around the 720x520 mark that the fps starts to
> > fluctuate between 25fps and 33fps.
> >
> > I've tried ramping up the PCI latency for the PVR-350 to maximum, but it
> > doesn't seem to make any difference. Likewise splitting the transfer
> into
> > two 720x288 chunks - or using PREP_DMA_BUF rather than PREP_DMA.
> >
> > The only time it's worked recently has been with 0.3.2b using
> PREP_DMA_BUF
> > - but DMA then became unstable after a few days.
> >
> > Can you think of anything which would be causing this? Perhaps a
> > difference between the number of DMA buffers that can be used of PAL
> size
> > rather than NTSC? For what it's worth, I'm not currently using the
> mpeg2
> > encoder on the card - is there any chance that it might be somehow
> > interfering with the OSD, and if so, how do I turn it off?
> >
> > cheers;
> >
> > Matthew.
> >
> > --
> > ______________________________________________________________
> > Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
> > Systems Analyst, MX Telecom Ltd.
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon
> 2005
> > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> > Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> > Register
> > by 3/29 & save $300
> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> > _______________________________________________
> > ivtv-devel mailing list
> > ivtv-devel[at]lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>
> --
> ---
> Chris Kennedy / ckennedy[at]kmos.cmsu.edu
> Engineer KMOS-TV/KTBG-FM
> Broadcasting Services Department
> Central Missouri State University
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
> Register
> by 3/29 & save $300
> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


robson at akwan

Mar 23, 2005, 5:27 PM

Post #13 of 20 (1626 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

On Wed, Mar 23, 2005 at 12:28:19PM -0600, Chris Kennedy wrote:
> Try this patch to 0.3.2l, maybe will help, I don't think we need the
> vsync wait anymore for OSD DMA. The actual thing that seems to have
> fixed this on my VIA and looks like a very promising fix, and the thing
> I've been chasing for a very long time, is setting a pci register
> different than the default. I just started looking closer at the
> data sheet Axel Thimm sent us (thanks for that), for the cx23416,
> which Conexant allowed Hauppauge to release to us finally a few months
> back. That had in it, on page 66, the pci register values for PCI Bus
> configuration. Well register 0x40 is very interesting, it's the
> Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
> the DMA timeouts on VIA and certain motherboards, and DMA errors. It
> makes sense logically, I checked the windows driver, looked at the
> system with a pci bus tool, and saw there the values are 0xff for
> both, or 0x0000ffff for register 0x40, ours in linux (the default
> acording to the datasheet) happens to be 0x00008080. So I maxed this
> out, haven't had a DMA error or system lockup on my VIA system since.

This looks very interesting! Can you tell us how to change it? I did not
see any pci setting in the patch that follows. Should I use setpci or
something?

Thanks a lot.

--
[]s,
Robson Braga Araujo
Ciencia da Computacao - UFMG http://www.dcc.ufmg.br/
Akwan Information Technologies http://www.akwan.com.br/

There's never enough time to do all the nothing you want.
-- Calvin


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


jerome.lacoste at gmail

Mar 23, 2005, 5:57 PM

Post #14 of 20 (1624 views)
Permalink
Re: Re: #0.3.2l minor code cleanup [In reply to]

On Wed, 23 Mar 2005 21:27:40 -0300, Robson Braga Araujo
<robson[at]akwan.com.br> wrote:
> On Wed, Mar 23, 2005 at 12:28:19PM -0600, Chris Kennedy wrote:
> > Try this patch to 0.3.2l, maybe will help, I don't think we need the
> > vsync wait anymore for OSD DMA. The actual thing that seems to have
> > fixed this on my VIA and looks like a very promising fix, and the thing
> > I've been chasing for a very long time, is setting a pci register
> > different than the default. I just started looking closer at the
> > data sheet Axel Thimm sent us (thanks for that), for the cx23416,
> > which Conexant allowed Hauppauge to release to us finally a few months
> > back. That had in it, on page 66, the pci register values for PCI Bus
> > configuration. Well register 0x40 is very interesting, it's the
> > Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
> > the DMA timeouts on VIA and certain motherboards, and DMA errors. It
> > makes sense logically, I checked the windows driver, looked at the
> > system with a pci bus tool, and saw there the values are 0xff for
> > both, or 0x0000ffff for register 0x40, ours in linux (the default
> > acording to the datasheet) happens to be 0x00008080. So I maxed this
> > out, haven't had a DMA error or system lockup on my VIA system since.
>
> This looks very interesting! Can you tell us how to change it? I did not
> see any pci setting in the patch that follows. Should I use setpci or
> something?

+1

setpci is cryptic to me...

Jerome


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 6:17 PM

Post #15 of 20 (1628 views)
Permalink
Re: Re: #0.3.2l minor code cleanup [In reply to]

It's in there, don't worry :-), in ivtv-driver.c, just use it and everything
should be fine. You can do pcitweak -r PCIID 0x40 to see the setting,
or pcitweak -w PCIID 0x40 0xffff on older driver versions to get the same
effect as the driver now sets it.

Thanks,
Chris
On Wed, Mar 23, 2005 at 09:27:40PM -0300, Robson Braga Araujo wrote:
> On Wed, Mar 23, 2005 at 12:28:19PM -0600, Chris Kennedy wrote:
> > Try this patch to 0.3.2l, maybe will help, I don't think we need the
> > vsync wait anymore for OSD DMA. The actual thing that seems to have
> > fixed this on my VIA and looks like a very promising fix, and the thing
> > I've been chasing for a very long time, is setting a pci register
> > different than the default. I just started looking closer at the
> > data sheet Axel Thimm sent us (thanks for that), for the cx23416,
> > which Conexant allowed Hauppauge to release to us finally a few months
> > back. That had in it, on page 66, the pci register values for PCI Bus
> > configuration. Well register 0x40 is very interesting, it's the
> > Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
> > the DMA timeouts on VIA and certain motherboards, and DMA errors. It
> > makes sense logically, I checked the windows driver, looked at the
> > system with a pci bus tool, and saw there the values are 0xff for
> > both, or 0x0000ffff for register 0x40, ours in linux (the default
> > acording to the datasheet) happens to be 0x00008080. So I maxed this
> > out, haven't had a DMA error or system lockup on my VIA system since.
>
> This looks very interesting! Can you tell us how to change it? I did not
> see any pci setting in the patch that follows. Should I use setpci or
> something?
>
> Thanks a lot.
>
> --
> []s,
> Robson Braga Araujo
> Ciencia da Computacao - UFMG http://www.dcc.ufmg.br/
> Akwan Information Technologies http://www.akwan.com.br/
>
> There's never enough time to do all the nothing you want.
> -- Calvin
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


matthew at mxtelecom

Mar 23, 2005, 7:50 PM

Post #16 of 20 (1614 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Many many thanks for looking into this - I'll give the patch a whirl
tomorrow morning. I'd wondered earlier what the

+ pci_write_config_dword(dev, 0x40, 0xffff);

line was doing in ivtv-driver.c in 0.3.2l, but never xreffed Axel's
datasheet. It appeared to improve the stability of the framerate when
writing to the OSD (especially combined with cranking up the PCI latency
to 248 from 64), but not the actual transfer rate (or my core problem of
OSD performance taking a serious hit after opening/writing/closing the
decoder MPEG stream). This is on an 2.8GHz P4 reference Intel
motherboard, however, so I've probably never suffered the same problems as
everyone with VIA chipsets.

Anyway, thanks again for the vsyncless patch - I'll post back my findings
tomorrow.

cheers;

M.

--
______________________________________________________________
Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
Systems Analyst, MX Telecom Ltd.

On Wed, 23 Mar 2005, Chris Kennedy wrote:

> Try this patch to 0.3.2l, maybe will help, I don't think we need the
> vsync wait anymore for OSD DMA. The actual thing that seems to have
> fixed this on my VIA and looks like a very promising fix, and the thing
> I've been chasing for a very long time, is setting a pci register
> different than the default. I just started looking closer at the
> data sheet Axel Thimm sent us (thanks for that), for the cx23416,
> which Conexant allowed Hauppauge to release to us finally a few months
> back. That had in it, on page 66, the pci register values for PCI Bus
> configuration. Well register 0x40 is very interesting, it's the
> Retry TImeout and also the TRDY Timeout for PCI transfers, ties into
> the DMA timeouts on VIA and certain motherboards, and DMA errors. It
> makes sense logically, I checked the windows driver, looked at the
> system with a pci bus tool, and saw there the values are 0xff for
> both, or 0x0000ffff for register 0x40, ours in linux (the default
> acording to the datasheet) happens to be 0x00008080. So I maxed this
> out, haven't had a DMA error or system lockup on my VIA system since.
>
> So that's the reasoning, I think anyone out there who has had problems,
> or says this chip isn't good at DMA, should now try this new version.
> I think it will change your mind for the most part (admit there could be
> other things, but this was the *BIG* one I've been chasing for a very
> long time). Basically, we do DMA xfers, the PCI bus interface was set
> to timeout at a low value and retry a small number of times, at least for
> some motherboards (Intel ones seem fine, must have been what the default
> values were tuned for), so the PCI bus was timing out in the middle of our
> DMA xfers, retrying, and playing a game of random catastrophys depending
> on our luck (which doesn't seem to be a good thing to stop the DMA xfer
> in mid run and retry it multiple times, when waiting just a bit longer
> would allow it to work, like twice as long it seems). That's my explanation,
> of course just the datasheet and a windows pci probe shows the hard facts
> of it being a setting changed by the windows driver, and my experience now
> shows me it works perfectly under high DMA loads on a system which crashed
> every time under certain tests it now works fine on.
>
>
> diff -BurN ivtv-0.3.2l/driver/ivtv-osd.c ivtv-0.3.2m/driver/ivtv-osd.c
> --- ivtv-0.3.2l/driver/ivtv-osd.c 2005-03-22 10:08:09.000000000 -0600
> +++ ivtv-0.3.2m/driver/ivtv-osd.c 2005-03-23 12:16:50.000000000 -0600
> @@ -1331,22 +1331,22 @@
>
> /* Send DMA */
> if (cmd == IVTVFB_IOCTL_PREP_FRAME) {
> - if (wait_event_interruptible(itv->vsync_w_osd,
> + /*if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
> dec_dma_stat.
> vsync_flag_osd)))
> {
> ret = -ERESTARTSYS;
> } else {
> - atomic_set(&itv->dec_dma_stat.vsync_flag_osd,
> + atomic_set(&itv->dec_dma_stat.vsync_flag_osd,*/
> 0);
> ret =
> ivtv_fb_prep_frame(itv, (args.dest_offset),
> (args.source),
> args.count);
> - }
> + //}
> } else if (cmd == IVTVFB_IOCTL_PREP_FRAME_BUF) {
> - if (wait_event_interruptible(itv->vsync_w_osd,
> + /*if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
> dec_dma_stat.
> vsync_flag_osd)))
> @@ -1354,13 +1354,13 @@
> ret = -ERESTARTSYS;
> } else {
> atomic_set(&itv->dec_dma_stat.vsync_flag_osd,
> - 0);
> + 0);*/
> ret =
> ivtv_fb_prep_frame_buf(itv,
> (args.dest_offset),
> (args.source),
> args.count);
> - }
> + //}
> } else if (cmd == IVTVFB_IOCTL_PREP_FRAME_YUV) {
> if (wait_event_interruptible(itv->vsync_w_osd,
> atomic_read(&itv->
>
>
>
> Thanks,
> Chris
> On Wed, Mar 23, 2005 at 06:04:52PM +0000, Matthew Hodgson wrote:
>> Hi,
>>
>> Chris Kennedy wrote:
>>> This cleans up a bit more of the DMA code, removes some more unused code.
>>> Please test this if you have had DMA problems, and if having VIA
>>> motherboard
>>> problems in the past, or any other DMA errors.
>>
>> I'm afraid this hasn't fixed the issue I'm having with OSD performance on
>> my PVR-350 significantly reducing after DMAing to the decoder; on loading
>> 0.3.2l ivtvfbctl -prepdma gives 33fps when displaying a 720x576 screen. I
>> then cat something.mpeg > /dev/video16, and then running the same ivtvfbctl
>> -prepdma gives 25fps.
>>
>> Something I did notice, however, is that when running -prepdma with a
>> 720x480 size frame, the problem doesn't present itself. In fact, it's only
>> when the DMA size gets to around the 720x520 mark that the fps starts to
>> fluctuate between 25fps and 33fps.
>>
>> I've tried ramping up the PCI latency for the PVR-350 to maximum, but it
>> doesn't seem to make any difference. Likewise splitting the transfer into
>> two 720x288 chunks - or using PREP_DMA_BUF rather than PREP_DMA.
>>
>> The only time it's worked recently has been with 0.3.2b using PREP_DMA_BUF
>> - but DMA then became unstable after a few days.
>>
>> Can you think of anything which would be causing this? Perhaps a
>> difference between the number of DMA buffers that can be used of PAL size
>> rather than NTSC? For what it's worth, I'm not currently using the mpeg2
>> encoder on the card - is there any chance that it might be somehow
>> interfering with the OSD, and if so, how do I turn it off?
>>
>> cheers;
>>
>> Matthew.
>>
>> --
>> ______________________________________________________________
>> Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
>> Systems Analyst, MX Telecom Ltd.
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
>> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
>> Embedded(r) & Windows Mobile(tm) platforms, applications & content.
>> Register
>> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
>> _______________________________________________
>> ivtv-devel mailing list
>> ivtv-devel[at]lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>
> --
> ---
> Chris Kennedy / ckennedy[at]kmos.cmsu.edu
> Engineer KMOS-TV/KTBG-FM
> Broadcasting Services Department
> Central Missouri State University
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


jelle-ivtv-devel at foks

Mar 23, 2005, 8:49 PM

Post #17 of 20 (1591 views)
Permalink
RE: #0.3.2l minor code cleanup [In reply to]

On Wed, 23 Mar 2005 21:52:37 +0000, John Harvey wrote:

> Chris
> I think that vsync wants removing whatever. Since X is currently
> doing 2 calls for large screen updates it means that a full screen X
> update takes 2 vsync's which is bad.
>
> I think in time it should possibly be an option to the prep frame call to
> request a vsync'ed transfer, but for now I think this patch is correct.

For quite a while now, I've been using a patched x11 driver that does
only one call, even for full screen without any problems (ivtv 0.3.x)

John, any ideas about YUV decoder support (xvideo)?

Jelle.


--- ivtv/ivtvhw.c 2004-12-15 16:04:27.000000000 -0500
+++ ivtv.patched/ivtvhw.c 2005-02-05 20:46:26.000000000 -0500
@@ -750,8 +754,8 @@
unsigned long totalData =
endOffset - startOffset;

-
- if (totalData > 64 *1024 *4)
+#if 0
+ if (totalData > 64 *1024 *4) /* otherwise we get "Count 1441792 Offset -59392 is greater than buffer" from the driver */
{
/* This is a bigger lump so send in 2 bits */
totalData /= 2;
@@ -759,15 +763,20 @@
secondOffset = endOffset - totalData;
} else
{
- totalData = (totalData + 65535) & ~65535;
+#endif
+ if (totalData <= 64 *1024 *21) /* otherwise we get "Count 1441792 Offset -59392 is greater than buffer" from the driver during playback */
+ {
+ totalData = (totalData + 65535) & ~65535;
+ }


if ((startOffset + totalData) > totalScreenSize)
{
startOffset -= (startOffset + totalData) - totalScreenSize;
}
+#if 0
}
-
+#endif

args.source = ((char *)ptr+startOffset);
args.dest_offset = startOffset;





-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


ckennedy at kmos

Mar 23, 2005, 10:23 PM

Post #18 of 20 (1628 views)
Permalink
Re: RE: #0.3.2l minor code cleanup [In reply to]

I'd suspect the X driver should now be able to make full size xfers
while decoding too, on all systems. I think all we need to know is the
current YUV buffer used, we have all them defined, and a similar decoding
function like the encoding one to split the Y and UV apart. Maybe the
YUV decoding xfer info is in a higher mailbox number, have to check that,
we should get the Y offset, UV offset and PTS possibly, just like
encoding does. Another thing to think about here is the PCM
data for sound, we will need that too for really decoding
YUV video.

Thanks,
Chris
On Wed, Mar 23, 2005 at 10:49:11PM -0500, Jelle wrote:
> On Wed, 23 Mar 2005 21:52:37 +0000, John Harvey wrote:
>
> > Chris
> > I think that vsync wants removing whatever. Since X is currently
> > doing 2 calls for large screen updates it means that a full screen X
> > update takes 2 vsync's which is bad.
> >
> > I think in time it should possibly be an option to the prep frame call to
> > request a vsync'ed transfer, but for now I think this patch is correct.
>
> For quite a while now, I've been using a patched x11 driver that does
> only one call, even for full screen without any problems (ivtv 0.3.x)
>
> John, any ideas about YUV decoder support (xvideo)?
>
> Jelle.
>
>
> --- ivtv/ivtvhw.c 2004-12-15 16:04:27.000000000 -0500
> +++ ivtv.patched/ivtvhw.c 2005-02-05 20:46:26.000000000 -0500
> @@ -750,8 +754,8 @@
> unsigned long totalData =
> endOffset - startOffset;
>
> -
> - if (totalData > 64 *1024 *4)
> +#if 0
> + if (totalData > 64 *1024 *4) /* otherwise we get "Count 1441792 Offset -59392 is greater than buffer" from the driver */
> {
> /* This is a bigger lump so send in 2 bits */
> totalData /= 2;
> @@ -759,15 +763,20 @@
> secondOffset = endOffset - totalData;
> } else
> {
> - totalData = (totalData + 65535) & ~65535;
> +#endif
> + if (totalData <= 64 *1024 *21) /* otherwise we get "Count 1441792 Offset -59392 is greater than buffer" from the driver during playback */
> + {
> + totalData = (totalData + 65535) & ~65535;
> + }
>
>
> if ((startOffset + totalData) > totalScreenSize)
> {
> startOffset -= (startOffset + totalData) - totalScreenSize;
> }
> +#if 0
> }
> -
> +#endif
>
> args.source = ((char *)ptr+startOffset);
> args.dest_offset = startOffset;
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
> Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
> by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel[at]lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ivtv-devel

--
---
Chris Kennedy / ckennedy[at]kmos.cmsu.edu
Engineer KMOS-TV/KTBG-FM
Broadcasting Services Department
Central Missouri State University


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


matthew at mxtelecom

Mar 24, 2005, 6:40 AM

Post #19 of 20 (1619 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

Chris Kennedy wrote:
> Try this patch to 0.3.2l, maybe will help, I don't think we need the
> vsync wait anymore for OSD DMA.

*snip*

Removing the vsync wait code does speed up the OSD transfer by 2.6% after
having opened the decoder (from ~24fps to ~25fps), but the overall
performance hit of 25% after writing to the decoder is still there:

# patch -p2 -l < no-vsync-wait.patch
# make
# make install
# modprobe ivtv
# modprobe ivtv-fb
# ../utils/ivtvfbctl -prepdma
...
frameloop: userspace buffer 0xb7cfe000 of 1658880 bytes:
Warning, you must change CPU_HZ to be accurate, currently 2793423000:
mlock rc = 0
iter 0: time = 33.649651 fps
iter 1: time = 33.635635 fps
iter 2: time = 33.635289 fps
iter 3: time = 33.635412 fps
iter 4: time = 33.625753 fps
iter 5: time = 33.630572 fps
iter 6: time = 33.626303 fps

# cat ~/foo.mpeg > /dev/video16
# ../utils/ivtvfbctl -prepdma
...
frameloop: userspace buffer 0xb7cfe000 of 1658880 bytes:
Warning, you must change CPU_HZ to be accurate, currently 2793423000:
mlock rc = 0
iter 0: time = 25.291016 fps
iter 1: time = 25.250913 fps
iter 2: time = 25.197580 fps
iter 3: time = 25.195648 fps
iter 4: time = 25.204124 fps
iter 5: time = 25.198119 fps
iter 6: time = 25.192121 fps

:-/

The performance hit appears to only occur after all 16 DMA decoder buffers
have been filled: so that if writing to the decoder is interrupted before
the decoder queue is full, the OSD appears to perform correctly afterwards.
As each buffer is 65k, if the MPEG I try to decode is smaller than a
megabyte, all's seems to be well - assuming the device isn't close()d too
quickly due to lack of blocking whilst write()ing (I think).

I'm therefore assuming that it's something which happens once decoder DMA
buffers start to be added to the FULL Queue rather than the IO Queue which
causes the problem.

I'm going to investigate this more carefully this afternoon, but if anyone
has any insight into what part of the decoder's DMA would adversely effect
subsequent unrelated OSD transfers, it really would be very very helpful :)

cheers;

M.

> On Wed, Mar 23, 2005 at 06:04:52PM +0000, Matthew Hodgson wrote:
>
>>Hi,
>>
>>Chris Kennedy wrote:
>>
>>>This cleans up a bit more of the DMA code, removes some more unused code.
>>>Please test this if you have had DMA problems, and if having VIA
>>>motherboard
>>>problems in the past, or any other DMA errors.
>>
>>I'm afraid this hasn't fixed the issue I'm having with OSD performance on
>>my PVR-350 significantly reducing after DMAing to the decoder; on loading
>>0.3.2l ivtvfbctl -prepdma gives 33fps when displaying a 720x576 screen. I
>>then cat something.mpeg > /dev/video16, and then running the same ivtvfbctl
>>-prepdma gives 25fps.
>>
>>Something I did notice, however, is that when running -prepdma with a
>>720x480 size frame, the problem doesn't present itself. In fact, it's only
>>when the DMA size gets to around the 720x520 mark that the fps starts to
>>fluctuate between 25fps and 33fps.
>>
>>I've tried ramping up the PCI latency for the PVR-350 to maximum, but it
>>doesn't seem to make any difference. Likewise splitting the transfer into
>>two 720x288 chunks - or using PREP_DMA_BUF rather than PREP_DMA.
>>
>>The only time it's worked recently has been with 0.3.2b using PREP_DMA_BUF
>>- but DMA then became unstable after a few days.
>>
>>Can you think of anything which would be causing this? Perhaps a
>>difference between the number of DMA buffers that can be used of PAL size
>>rather than NTSC? For what it's worth, I'm not currently using the mpeg2
>>encoder on the card - is there any chance that it might be somehow
>>interfering with the OSD, and if so, how do I turn it off?
>>
>>cheers;
>>
>>Matthew.
>>
>>--
>>______________________________________________________________
>>Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
>> Systems Analyst, MX Telecom Ltd.
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
>>Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
>>Embedded(r) & Windows Mobile(tm) platforms, applications & content.
>>Register
>>by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
>>_______________________________________________
>>ivtv-devel mailing list
>>ivtv-devel[at]lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/ivtv-devel
>
>


--
______________________________________________________________
Matthew Hodgson matthew[at]mxtelecom.com Tel: +44 845 6667778
Systems Analyst, MX Telecom Ltd.


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


jerome.lacoste at gmail

Mar 26, 2005, 1:11 PM

Post #20 of 20 (1609 views)
Permalink
Re: #0.3.2l minor code cleanup [In reply to]

On Wed, 23 Mar 2005 12:28:19 -0600, Chris Kennedy <ckennedy[at]kmos.org> wrote:
> Try this patch to 0.3.2l, maybe will help, I don't think we need the
> vsync wait anymore for OSD DMA. The actual thing that seems to have
> fixed this on my VIA and looks like a very promising fix

I have an EPIA M 10000 board (C3 nehemiah)

I've put the 0.3.2l version on my box about 2.5 days ago. On the same
day I put the fix, but before I did it, I had 5 or 6 hard locks. I
haven't had a hard lock since.

I haven't hammered the box completely. But I've done the following:
- watched 3 movies while recording 2 others
- now watching TV while transferring files over a wireless USB dongle
(that gives me a 650Kbytes/sec bandwidth). I've transfered so far
around 1.5 Go which is a huge number.

Althought I am not 100% sure, I think this is a winner for me. It is a
*huge* improvement.

Note: my ERR count is still increasing albeit very slowly: it is
around 3000 now, which is nothing compared to previous values, given
the fact that the box has recorded around 10 hours of shows while
displaying almost the same amount of videos/recorded programs.

I will confirm in around a week or 2 of further testing. But for ther
first time, I am feeling hopeful.
I can live with 2 weeks MTBF, not with a 10 min one :)

Chris thanks a lot.

J


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
ivtv-devel mailing list
ivtv-devel[at]lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel

ivtv devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.