search for: dma_to_pfn

Displaying 14 results from an estimated 14 matches for "dma_to_pfn".

2014 Apr 22
2
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...m_contiguous(dev, ncmin, order); > + if (!pages) { > + gk20a_ram_put(pfb, &mem); > + return -ENOMEM; > + } > + > + dma_addr = pfn_to_dma(nv_device_base(nv_device(pfb)), > + page_to_pfn(pages)); This breaks compilation on x86 because 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? Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: &lt...
2014 Apr 23
2
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...gt;>> + } >>> + >>> + dma_addr = pfn_to_dma(nv_device_base(nv_device(pfb)), >>> + page_to_pfn(pages)); >> >> >> This breaks compilation on x86 because 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 wi...
2014 Apr 23
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...+ if (!pages) { >> + gk20a_ram_put(pfb, &mem); >> + return -ENOMEM; >> + } >> + >> + dma_addr = pfn_to_dma(nv_device_base(nv_device(pfb)), >> + page_to_pfn(pages)); > > This breaks compilation on x86 because 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. Thanks, Alex.
2014 Apr 28
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...>>> + > >>> + dma_addr = pfn_to_dma(nv_device_base(nv_device(pfb)), > >>> + page_to_pfn(pages)); > >> > >> > >> This breaks compilation on x86 because 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_p...
2014 May 01
1
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...>>> + dma_addr = pfn_to_dma(nv_device_base(nv_device(pfb)), >> >>> + page_to_pfn(pages)); >> >> >> >> >> >> This breaks compilation on x86 because 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. >> >&g...
2014 May 01
0
[PATCH v3 0/9] drm/nouveau: support for GK20A, cont'd
On Fri, Apr 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 th...
2014 Apr 21
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...ct nouveau_fb *pfb, struct nouveau_mem **pmem) +{ + struct device *dev = nv_device_base(nv_device(pfb)); + struct nouveau_mem *mem = *pmem; + int i; + + *pmem = NULL; + + for (i = 0; i < mem->size; i++) { + struct page *page; + + if (mem->pages[i] == 0) + break; + + page = pfn_to_page(dma_to_pfn(dev, mem->pages[i])); + dma_release_from_contiguous(dev, page, 1); + } + + kfree(mem->pages); + kfree(mem); +} + +static int +gk20a_ram_get(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin, + u32 memtype, struct nouveau_mem **pmem) +{ + struct device *dev = nv_device_base(nv_devic...
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 i...
2016 Jun 02
0
[RFC v3 44/45] dma-mapping: Remove dma_get_attr
...dev, struct page *pag static void arm_dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir, unsigned long attrs) { - if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) + if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) __dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)), handle & ~PAGE_MASK, size, dir); } @@ -622,9 +622,9 @@ static void __free_from_contiguous(struct device *dev, struct page *page, static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot) { - prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ? -...
2014 Apr 21
13
[PATCH v2 00/10] drm/nouveau: support for GK20A, cont'd
Hi everyone, Way overdue v2 of the final patches that enable basic GK20A support. Hopefully all the issues raised with v1 have been addressed. Changes since v1: - Use gk20a clock driver by Ben instead of twiddling nv04's - Name new classes after gk20a instead of nvea - Addressed comments about BAR initialization code factorization - Removed non-essential code which only purpose was to avoid
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
Hi all, this patch series enables xen-swiotlb on arm and arm64. It has been heavily reworked compared to the previous versions in order to achieve better performances and to address review comments. We are not using dma_mark_clean to ensure coherency anymore. We call the platform implementation of map_page and unmap_page. We assume that dom0 has been mapped 1:1 (physical address == machine
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
2014 Mar 24
27
[PATCH 00/12] drm/nouveau: support for GK20A, cont'd
Hi everyone, Here is the second batch of patches to add GK20A support to Nouveau. This time we are adding the actual chip support, and this series brings the driver to a point where a slightly-tweaked Mesa successfully runs shaders and renders triangles on GBM! Many thanks to Thierry Reding and the people on the #nouveau IRC channel for their help without which we would not have reached this
2020 Aug 19
39
a saner API for allocating DMA addressable pages
Hi all, this series replaced the DMA_ATTR_NON_CONSISTENT flag to dma_alloc_attrs with a separate new dma_alloc_pages API, which is available on all platforms. In addition to cleaning up the convoluted code path, this ensures that other drivers that have asked for better support for non-coherent DMA to pages with incurring bounce buffering over can finally be properly supported. I'm still a