Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 1997 04:58:16 -0700
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        Peter Dufault <dufault@hda.com>
Cc:        msmith@atrad.adelaide.edu.au (Michael Smith), hackers@freebsd.org
Subject:   Re: video capture driver interface to file system? 
Message-ID:  <199704211158.EAA00447@rah.star-gate.com>
In-Reply-To: Your message of "Mon, 21 Apr 1997 06:35:30 EDT." <199704211035.GAA24306@hda.hda.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>From The Desk Of Peter Dufault :
> > I was actually believing that it would cover the uiomove() time as
> > well, which looked to be the worst offender.  Some more study tells
> > me this was wrong, so yes, I'd have to agree that a user-space
> > application is probably going to perform nearly as well.
> 
> I'm assuming DMA directly into the user buffer via physio for a
> raw transfer.  I use "raw transfer" always to mean directly to user
> buffers.  I guess I need to use "cooked" or "psuedo-raw" transfers
> to describe transfers that uiomove indirectly through kernel buffers.
> 
> From Amancio's brief description I assume the device is capable of
> DMAing to anywhere in PCI memory.  The only cool optimization
> I can think of is to use non-ascending transfers to DMA directly
> to a SCSI controller's data FIFO ... but we'll talk about that when
> we're trying to do 40MB/second to a disk array.  (I've done exactly
> that in an HDTV research application four years back, though it
> was only 20MB/sec).

Now thats more like it 8)


Yes the Bt848 is capable of DMAing to any place in memory or to any 
PCI target device. For instance, we can capture video to system
memory or we can dma straight into the video display's frame buffer
without any cpu intervention. I use the latter to watch TV in my system.
On a good monitor it matches the quality of a reqular TV.

Not sure how much clear I can make it. So here is a sample code
from the driver.


This is from the code which instructs the Bt848 where to dma the
info to:

	if (bktr->video.addr) {
		target_buffer = (u_long) bktr->video.addr;
		pitch = bktr->video.width;
	}
	else {
		target_buffer = (u_long) vtophys(bktr->bigbuf);
		pitch = cols*pixel_width;
	}

So if the user specified the physical address of the video display's
frame buffer we use it otherwise we happily capture to system memory.

>From the Bt848 point of view , it does not know if its dmaing to 
host memory or to the card's display frame buffer.

The Bt848 has 70 32bit words to hold a video line.

The dma control procedure is controlled by a "RISC" program in the 
host memory. The RISC instructions tells the dma processor what to
do with a video line: skip pixels , write to a given destination , 
or wait for start of frame, etc... to dma a line one uses a write instruction 
with the number of bytes to transfer and  the address of the target.



	Cheers,
	Amancio






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704211158.EAA00447>