From patchwork Tue Mar 1 08:21:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 598401 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p218Lujg009998 for ; Tue, 1 Mar 2011 08:21:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755825Ab1CAIVw (ORCPT ); Tue, 1 Mar 2011 03:21:52 -0500 Received: from mail.pripojeni.net ([217.66.174.14]:42731 "EHLO smtp.pripojeni.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755519Ab1CAIVv (ORCPT ); Tue, 1 Mar 2011 03:21:51 -0500 Received: from localhost.localdomain ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.1.3); Tue, 1 Mar 2011 09:21:43 +0100 From: Jiri Slaby To: mchehab@infradead.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Konrad Rzeszutek Wilk Subject: [PATCH v2 1/1] V4L: videobuf, don't use dma addr as physical Date: Tue, 1 Mar 2011 09:21:41 +0100 Message-Id: <1298967701-11889-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.4.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Mar 2011 08:21:59 +0000 (UTC) diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index c969111..19d3e4a 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -300,7 +300,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q, vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); retval = remap_pfn_range(vma, vma->vm_start, - mem->dma_handle >> PAGE_SHIFT, + PFN_DOWN(virt_to_phys(mem->vaddr)) size, vma->vm_page_prot); if (retval) { dev_err(q->dev, "mmap: remap failed with error %d. ", retval);