From patchwork Mon Dec 6 20:13:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 379762 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 oB6KDw61025432 for ; Mon, 6 Dec 2010 20:13:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453Ab0LFUNX (ORCPT ); Mon, 6 Dec 2010 15:13:23 -0500 Received: from mail.pripojeni.net ([217.66.174.14]:41002 "EHLO smtp.pripojeni.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751993Ab0LFUNW (ORCPT ); Mon, 6 Dec 2010 15:13:22 -0500 Received: from localhost.localdomain ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.1.1); Mon, 6 Dec 2010 21:13:17 +0100 From: Jiri Slaby To: mchehab@infradead.org Cc: linux-media@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk Subject: [PATCH v2 1/1] V4L: videobuf, don't use dma addr as physical Date: Mon, 6 Dec 2010 21:13:16 +0100 Message-Id: <1291666396-23493-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <20101206175418.GA26693@dumpdata.com> References: <20101206175418.GA26693@dumpdata.com> 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.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Dec 2010 20:13: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);