search for: dma_alloc_from_contigu

Displaying 18 results from an estimated 18 matches for "dma_alloc_from_contigu".

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 = 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_pf...
2014 May 19
3
[PATCH 0/2] drm/gk20a: FB fixes
Fix a very shameful memory leak and a compilation error due to the use of non-exported CMA functions. The workaround for the latter is not really elegant (replace the CMA functions by a runtime failure if we are compiled as a module), but is temporary and still an improvement over the current situation (compile error). Alexandre Courbot (2): drm/gk20a/fb: fix huge memory leak drm/gk20a/fb:
2014 Apr 23
2
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...r 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 = pfn_to_dma(nv_device_base(n...
2014 Apr 23
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...hierry Reding wrote: > * PGP Signed by an unknown key > > 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 = pfn_to_dma(nv_device_base(nv_device(pfb)), >> + page_to_pfn(pages)); > > This breaks compilation on x86 becau...
2014 Apr 28
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...e 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 May 01
1
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...t; [...] >> >>> >> >>> 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; >> >>> + } >> >>> + >> >>>...
2014 May 30
0
[PATCH] drm/gk20a/fb: use dma_alloc_coherent() for VRAM
...c(sizeof(dma_addr_t) * npages, GFP_KERNEL); + if (!mem->base.pages) { kfree(mem); return -ENOMEM; } - while (npages) { - struct page *pages; - int pos = 0; - - /* don't overflow in case size is not a multiple of ncmin */ - if (ncmin > npages) - ncmin = npages; - - pages = dma_alloc_from_contiguous(dev, ncmin, order); - if (!pages) { - gk20a_ram_put(pfb, &mem); - return -ENOMEM; - } + *pmem = &mem->base; - dma_addr = (dma_addr_t)(page_to_pfn(pages) << PAGE_SHIFT); + mem->cpuaddr = dma_alloc_coherent(dev, npages << PAGE_SHIFT, + &mem->handle,...
2014 Apr 21
0
[PATCH v2 04/10] drm/nouveau/fb: add GK20A support
...;pages = kzalloc(sizeof(dma_addr_t) * npages, GFP_KERNEL); + if (!mem) { + kfree(mem); + return -ENOMEM; + } + + while (npages) { + struct page *pages; + int pos = 0; + + /* don't overflow in case size is not a multiple of ncmin */ + if (ncmin > npages) + ncmin = npages; + + pages = dma_alloc_from_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)); + + nv_debug(pfb, " alloc count: %x, order: %x, addr: %x\n", ncmin, + order, dma_addr); + + f...
2014 Mar 26
2
[PATCH 00/12] drm/nouveau: support for GK20A, cont'd
Hi Lucas, On Mon, Mar 24, 2014 at 10:19 PM, Lucas Stach <l.stach at pengutronix.de> wrote: > Hi Alexandre, > > Am Montag, den 24.03.2014, 17:42 +0900 schrieb Alexandre Courbot: >> Hi everyone, > [...] >> >> A few lines of hacks (not included here) are still needed to deal with cached >> mappings triggering external aborts and CPU/GPU memory coherency
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
2019 Sep 08
7
[PATCH v6 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V6: -add more details to the description of patch 001-iommu-amd-Remove-unnecessary-locking-from-AMD-iommu-.patch -rename handle_deferred_device to iommu_dma_deferred_attach -fix double tabs in 0003-iommu-dma-iommu-Handle-deferred-devices.patch V5: -Rebase on
2019 Jun 13
8
[PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V4: -Rebase on top of linux-next -Split the removing of the unnecessary locking in the amd iommu driver into a seperate patch -refactor the "iommu/dma-iommu: Handle deferred devices" patch and address comments v3: -rename dma_limit to dma_mask -exit
2019 Jun 13
8
[PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api
Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: V4: -Rebase on top of linux-next -Split the removing of the unnecessary locking in the amd iommu driver into a seperate patch -refactor the "iommu/dma-iommu: Handle deferred devices" patch and address comments v3: -rename dma_limit to dma_mask -exit
2014 May 02
10
[PATCH v4 0/9] drm/nouveau: support for GK20A, cont'd
Latest patches for GK20A, taking comments received for v3 into account. Changes since v3: - use only pfn_to_page() and page_to_pfn() in GK20A's FB. These functions are present on every arch and the physical address to page frame number conversion is also consistently a shift of PAGE_SHIFT. This part will probably be replaced by something nicer in the future anyway. - fixed a warning on
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
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
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the
2019 Dec 21
13
[PATCH 0/8] Convert the intel iommu driver to the dma-iommu api
This patchset converts the intel iommu driver to the dma-iommu api. While converting the driver I exposed a bug in the intel i915 driver which causes a huge amount of artifacts on the screen of my laptop. You can see a picture of it here: https://github.com/pippy360/kernelPatches/blob/master/IMG_20191219_225922.jpg This issue is most likely in the i915 driver and is most likely caused by the