From patchwork Tue Apr 28 08:45:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 20360 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3S8nsdl020229 for ; Tue, 28 Apr 2009 08:49:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753482AbZD1Is1 (ORCPT ); Tue, 28 Apr 2009 04:48:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753471AbZD1Is1 (ORCPT ); Tue, 28 Apr 2009 04:48:27 -0400 Received: from rv-out-0506.google.com ([209.85.198.233]:54880 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753287AbZD1IsZ (ORCPT ); Tue, 28 Apr 2009 04:48:25 -0400 Received: by rv-out-0506.google.com with SMTP id f9so315072rvb.1 for ; Tue, 28 Apr 2009 01:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=KJM2mBoLqc5+Uwath8+CtN9f0T3AJYC7YP9miKJPjSU=; b=BlB53ZLA74oaRkjA2MfXnohlFGzuSRXhOBafuPUrQ50Amf28y1PgwNigkMw/zC5Enl aEDIbbMUHSN2Oy2ouXFhkh8YxpMR+4Y2clu7vubtZTd6tiu8ThzOeSGgtvLx0Vaz/mSb b85I2x9Jnc41vXmdq4yL3Rm2RFfO7rzFROkAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=wNJr8eVnFluQeaY1Y8Ly5kGAVgOOG1XL7ZSauL09YsclyUgHVy/1Ji1HcLTmXMPXnU UCHuJy4rUDvDDR6VT9fS+0tU5kNWLce5YA0opTTZ1vXUj55+Cr4E2kP32UKO3gjIJ0ix UFCi89/TnALg9uP3MEIqPXJOLuJxO1YL4sS/o= Received: by 10.114.159.17 with SMTP id h17mr3131297wae.124.1240908504751; Tue, 28 Apr 2009 01:48:24 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id y25sm4766065pod.15.2009.04.28.01.48.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 28 Apr 2009 01:48:23 -0700 (PDT) From: Magnus Damm To: linux-media@vger.kernel.org Cc: Magnus Damm , paulius.zaleckas@teltonika.lt, g.liakhovetski@gmx.de, matthieu.castet@parrot.com, lethal@linux-sh.org Date: Tue, 28 Apr 2009 17:45:39 +0900 Message-Id: <20090428084539.16911.79893.sendpatchset@rx1.opensource.se> Subject: [PATCH] videobuf-dma-contig: remove sync operation Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Magnus Damm Remove the videobuf-dma-contig sync operation. Sync is only needed for noncoherent buffers, and since videobuf-dma-contig is built on coherent memory allocators the memory is by definition always in sync. Reported-by: Matthieu CASTET Signed-off-by: Magnus Damm Reviewed-by: Paul Mundt --- Thanks to Mattieu, Paul and Paulius for all the help! Tested on SH7722 Migo-R with CEU and ov7725. drivers/media/video/videobuf-dma-contig.c | 14 -------------- 1 file changed, 14 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/media/video/videobuf-dma-contig.c +++ work/drivers/media/video/videobuf-dma-contig.c 2009-04-28 13:09:37.000000000 +0900 @@ -182,19 +182,6 @@ static int __videobuf_iolock(struct vide return 0; } -static int __videobuf_sync(struct videobuf_queue *q, - struct videobuf_buffer *buf) -{ - struct videobuf_dma_contig_memory *mem = buf->priv; - - BUG_ON(!mem); - MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); - - dma_sync_single_for_cpu(q->dev, mem->dma_handle, mem->size, - DMA_FROM_DEVICE); - return 0; -} - static int __videobuf_mmap_free(struct videobuf_queue *q) { unsigned int i; @@ -356,7 +343,6 @@ static struct videobuf_qtype_ops qops = .alloc = __videobuf_alloc, .iolock = __videobuf_iolock, - .sync = __videobuf_sync, .mmap_free = __videobuf_mmap_free, .mmap_mapper = __videobuf_mmap_mapper, .video_copy_to_user = __videobuf_copy_to_user,