From patchwork Mon Feb 28 09:37:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 594951 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 p1S9bH8v022984 for ; Mon, 28 Feb 2011 09:37:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872Ab1B1JhP (ORCPT ); Mon, 28 Feb 2011 04:37:15 -0500 Received: from mail.pripojeni.net ([217.66.174.14]:52197 "EHLO smtp.pripojeni.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384Ab1B1JhO (ORCPT ); Mon, 28 Feb 2011 04:37:14 -0500 Received: from localhost.localdomain ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.1.3); Mon, 28 Feb 2011 10:37:08 +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 -resend#1 1/1] V4L: videobuf, don't use dma addr as physical Date: Mon, 28 Feb 2011 10:37:02 +0100 Message-Id: <1298885822-10083-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]); Mon, 28 Feb 2011 09:37:18 +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);