search for: phys_to_pag

Displaying 10 results from an estimated 10 matches for "phys_to_pag".

Did you mean: phys_to_page
2014 Apr 23
2
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...neither pfn_to_dma() nor >> dma_to_pfn() are available. Is there some other way this can be >> allocated so that these functions don't need to be called? > > > Mmm, this is bad. There is probably another more portable way to do this. > Let me look for it. page_to_phys()/phys_to_page() can be used by drivers and will work just fine here since the CPU and GPU use the same physical addresses to access memory. Thanks, Alex.
2014 May 01
0
[PATCH v3 0/9] drm/nouveau: support for GK20A, cont'd
...25, 2014 at 5:19 PM, Alexandre Courbot <acourbot at nvidia.com> wrote: > Changes since v2: > - Enabled software class > - Removed unneeded changes to nouveau_accel_init() > - Replaced use of architecture-private pfn_to_dma() and dma_to_pfn() with > the portable page_to_phys()/phys_to_page() page_to_phys() looks well defined and used everywhere, phys_to_page() not so much (including on amd64) :( > - Fixed incorrect comment/commit log talking about bytes instead of words > > Hope this looks good! Once this gets merged the next set will be to use this > driver on Jetson a...
2014 Apr 28
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...ma_to_pfn() are available. Is there some other way this can be > >> allocated so that these functions don't need to be called? > > > > > > Mmm, this is bad. There is probably another more portable way to do this. > > Let me look for it. > > page_to_phys()/phys_to_page() can be used by drivers and will work > just fine here since the CPU and GPU use the same physical addresses > to access memory. I'm wondering how this is going to pan out when we try adding IOMMU support. But I guess we can cross that bridge when we come to it. Thierry --------------...
2014 May 01
1
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...Is there some other way this can be >> >> allocated so that these functions don't need to be called? >> > >> > >> > Mmm, this is bad. There is probably another more portable way to do this. >> > Let me look for it. >> >> page_to_phys()/phys_to_page() can be used by drivers and will work >> just fine here since the CPU and GPU use the same physical addresses >> to access memory. > > I'm wondering how this is going to pan out when we try adding IOMMU > support. But I guess we can cross that bridge when we come to it....
2014 Apr 22
2
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
On Mon, Apr 21, 2014 at 03:02:16PM +0900, Alexandre Courbot wrote: [...] > diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c b/drivers/gpu/drm/nouveau/core/subdev/fb/ramgk20a.c [...] > + pages = dma_alloc_from_contiguous(dev, ncmin, order); > + if (!pages) { > + gk20a_ram_put(pfb, &mem); > + return -ENOMEM; > + } > + > + dma_addr =
2014 Apr 25
12
[PATCH v3 0/9] drm/nouveau: support for GK20A, cont'd
Changes since v2: - Enabled software class - Removed unneeded changes to nouveau_accel_init() - Replaced use of architecture-private pfn_to_dma() and dma_to_pfn() with the portable page_to_phys()/phys_to_page() - Fixed incorrect comment/commit log talking about bytes instead of words Hope this looks good! Once this gets merged the next set will be to use this driver on Jetson and Venice2 boards. Cheers, Alexandre Courbot (9): drm/nouveau/bar: only ioremap BAR3 if it exists drm/nouveau/bar/nvc0:...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...omem * -gk20a_instobj_cpu_map_dma(struct nvkm_memory *memory) -{ - struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory); - struct device *dev = node->base.imem->base.subdev.device->dev; - int npages = nvkm_memory_size(memory) >> 12; - struct page *pages[npages]; - int i; - - /* phys_to_page does not exist on all platforms... */ - pages[0] = pfn_to_page(dma_to_phys(dev, node->handle) >> PAGE_SHIFT); - for (i = 1; i < npages; i++) - pages[i] = pages[0] + i; - - return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); -} - -static void __iomem * -gk20a_instobj_...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...nvkm_memory *memory) > -{ > - struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory); > - struct device *dev = node->base.imem->base.subdev.device->dev; > - int npages = nvkm_memory_size(memory) >> 12; > - struct page *pages[npages]; > - int i; > - > - /* phys_to_page does not exist on all platforms... */ > - pages[0] = pfn_to_page(dma_to_phys(dev, node->handle) >> PAGE_SHIFT); > - for (i = 1; i < npages; i++) > - pages[i] = pages[0] + i; > - > - return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); > -} > - &gt...
2016 Jun 02
0
[RFC v3 44/45] dma-mapping: Remove dma_get_attr
...*handle = phys; return __ioremap(phys, size, _PAGE_BUFFER); @@ -123,7 +123,7 @@ static void avr32_dma_free(struct device *dev, size_t size, { struct page *page; - if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) { + if (attrs & DMA_ATTR_WRITE_COMBINE) { iounmap(cpu_addr); page = phys_to_page(handle); diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 6b78fc953c4b..74c934a997bb 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c @@ -183,14 +183,11 @@ static dma_addr_t sn_dma_map_page(struct device *dev, struct page *page, unsigned long phy...
2016 Jun 02
52
[RFC v3 00/45] dma-mapping: Use unsigned long for dma_attrs
Hi, This is third approach (complete this time) for replacing struct dma_attrs with unsigned long. The main patch (2/45) doing the change is split into many subpatches for easier review (3-43). They should be squashed together when applying. *Important:* Patchset is *only* build tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc. Please provide reviewes and tests for other