From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Muench Subject: Re: [ivtv-devel] Problems loading ivtv in Xen - DMA issues? Date: Fri, 15 Jul 2005 08:43:29 -0400 Message-ID: References: <1120750950.1556.24.camel@mud> <5c8bdef6ff868881d1a1e3bc0a79a906@cl.cam.ac.uk> <16670726ccb66463d6804f0dc87e3690@cl.cam.ac.uk> <38a9ac6264e50346c160833d732fc567@cl.cam.ac.uk> Reply-To: David Muench Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List List-Id: xen-devel@lists.xenproject.org On 7/13/05, Keir Fraser wrote: >=20 > I believe the code as checked in is strictly correct, but maybe we can > relax things a little. What happens if you leave the direction tests in > dma_map_single and dma_unmap_single, but remove them from > dma_sync_single_for_cpu and dma_sync_single_for_device? That works fine. > If the above works, leave the direction tests in the new modified form; > otherwise revert to the previous working state (ie. direction tests > removed from all four functions). Either way, another thing that is > interesting to try is the following: > (1) At the start of dma_sync_single_for_cpu add: > if (direction =3D=3D DMA_TO_DEVICE) > dma_sync_single_for_device(dev, dma_handle, size, direction); > (2) At the start of dma_sync_single_for_device add: > if (direction =3D=3D DMA_FROM_DEVICE) > dma_sync_single_for_cpu(dev, dma_handle, size, direction); >=20 > This will make the sync functions behave as they do in the ARM > architecture, which also uses bounce buffers but has at least been > looked over by the core kernel DMA guys. That doesn't work however: saa7115: decoder disable output saa7115: decoder enable output ivtv: DEC: REG_ENCSG1LEN wait failed ivtv: DMA Registers State: xfer: 0x00000002, state: 0x00000001 dec_addr: 0x00000000 enc_addr: 0x46760060 control: 0x00000003 ivtv: DMA DEC Buffers: 0x00000000:0x00000000:0x00000000 ivtv: DMA ENC Buffers: 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 ivtv: ENC: REG_DMAXFER wait failed ivtv: DMA Registers State: xfer: 0x00000002, state: 0x00000001 dec_addr: 0x00000000 enc_addr: 0x46760060 control: 0x00000003 ivtv: DMA DEC Buffers: 0x00000000:0x00000000:0x00000000 ivtv: DMA ENC Buffers: 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 ivtv: ENC: User stopped capture. ivtv: ENC: REG_DMASTATUS2 wait failed ivtv: DMA Registers State: xfer: 0x00000002, state: 0x00000001 dec_addr: 0x00000000 enc_addr: 0x46760060 control: 0x00000003 ivtv: DMA DEC Buffers: 0x00000000:0x00000000:0x00000000 ivtv: DMA ENC Buffers: 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 0x00000000:0x00000000:0x00000000 I'm going to take that out and run with the conditionals in the map functions only, and see if that holds up under longer testing. Dave --=20 David Muench - davemuench@gmail.com Jabber ID: dave@jabber.wasteland.org