From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 10 00:43:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ACEE16A518; Tue, 10 Oct 2006 00:43:39 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2421543D79; Tue, 10 Oct 2006 00:43:30 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (zzyi7tkttlmx5pa9@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k9A0hU8U002340; Mon, 9 Oct 2006 17:43:30 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k9A0hUoB002339; Mon, 9 Oct 2006 17:43:30 -0700 (PDT) (envelope-from jmg) Date: Mon, 9 Oct 2006 17:43:29 -0700 From: John-Mark Gurney To: Jonathan Chen Message-ID: <20061010004329.GU793@funkthat.com> Mail-Followup-To: Jonathan Chen , freebsd-hackers@freebsd.org References: <20061009213733.GC15088@porthos.spock.org> <20061009232649.GT793@funkthat.com> <20061009233903.GB20969@porthos.spock.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061009233903.GB20969@porthos.spock.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: bktr(4) risk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 00:43:39 -0000 Jonathan Chen wrote this message on Mon, Oct 09, 2006 at 19:39 -0400: > On Mon, Oct 09, 2006 at 04:26:50PM -0700, John-Mark Gurney wrote: > > Jonathan Chen wrote this message on Mon, Oct 09, 2006 at 17:37 -0400: > > > doesn't seem too useful a task for a video capture card to be doing. > > > Perhaps we should put a test for write access in there or just eliminate > > > the ioctl altogether. It should be noted that the meteor driver had this > > > ioctl ifdef'ed out prior to its removal. > > > > Hmmm... I think I'll go ahead and put in a compatibility ioctl based > > on the way I did the zoran driver, and schedule the removal of the > > ioctl.. > > Zoran driver? Can I have a pointer or a summary of what you did there so I > can do the same to meteor(4)? http://people.freebsd.org/~jmg/zoran.html There is a function verify_contig in zr_os.c, but we should teach meteor(4) and friends how to use bus_dma to do the buffer now that I think about it... The work that I do to verify that the buffer is contiguous should be done by bus_dma... We should make the user process mmap the video buffer, and then pass the user's address to the driver... Using a properly crafted uio struct, you can use bus_dmamap_load_uio to get the correct physical address of the buffer to program the card with... You can create a tag w/ only 1 segment to ensure that the mapping will be contigious... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."