search for: pci_dma_mapping_error

Displaying 20 results from an estimated 24 matches for "pci_dma_mapping_error".

2014 Jul 10
3
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...core/engine/device/base.c > index 18c8c7245b73..e4e9e64988fe 100644 > --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c > +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c > @@ -489,7 +489,10 @@ nv_device_map_page(struct nouveau_device *device, struct page *page) > if (pci_dma_mapping_error(device->pdev, ret)) > ret = 0; > } else { > - ret = page_to_phys(page); > + ret = dma_map_page(&device->platformdev->dev, page, 0, > + PAGE_SIZE, DMA_BIDIRECTIONAL); > + if (dma_mapping_error(&device->platformdev->dev, ret)) > + ret = 0;...
2014 Jul 31
2
[PATCH v5] drm/nouveau: map pages using DMA API
...r_t -pci_map_page(struct pci_dev *pdev, struct page *page, int offset, +dma_map_page(struct device *pdev, struct page *page, int offset, int length, unsigned flags) { return 0; @@ -696,13 +696,13 @@ pci_map_page(struct pci_dev *pdev, struct page *page, int offset, static inline bool -pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t addr) +dma_mapping_error(struct device *pdev, dma_addr_t addr) { return true; } static inline void -pci_unmap_page(struct pci_dev *pdev, dma_addr_t addr, int size, unsigned flags) +dma_unmap_page(struct device *pdev, dma_addr_t addr, int size, unsigned flags)...
2014 Aug 04
0
[PATCH v5] drm/nouveau: map pages using DMA API
...t page *page, int offset, > +dma_map_page(struct device *pdev, struct page *page, int offset, > int length, unsigned flags) > { > return 0; > @@ -696,13 +696,13 @@ pci_map_page(struct pci_dev *pdev, struct page *page, int offset, > > > static inline bool > -pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t addr) > +dma_mapping_error(struct device *pdev, dma_addr_t addr) > { > return true; > } > > static inline void > -pci_unmap_page(struct pci_dev *pdev, dma_addr_t addr, int size, unsigned flags) > +dma_unmap_page(struct device *pdev, dm...
2014 Jul 11
2
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...988fe 100644 >>> --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c >>> +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c >>> @@ -489,7 +489,10 @@ nv_device_map_page(struct nouveau_device *device, >>> struct page *page) >>> if (pci_dma_mapping_error(device->pdev, ret)) >>> ret = 0; >>> } else { >>> - ret = page_to_phys(page); >>> + ret = dma_map_page(&device->platformdev->dev, page, 0, >>> + PAG...
2014 Feb 01
0
[RFC 09/16] drm/nouveau/fb: support platform devices
...struct nouveau_object *parent, struct nouveau_object *engine, priv->r100c10_page = alloc_page(GFP_KERNEL | __GFP_ZERO); if (priv->r100c10_page) { - priv->r100c10 = pci_map_page(device->pdev, priv->r100c10_page, - 0, PAGE_SIZE, - PCI_DMA_BIDIRECTIONAL); - if (pci_dma_mapping_error(device->pdev, priv->r100c10)) + priv->r100c10 = nv_device_map_page(device, priv->r100c10_page); + if (!priv->r100c10) return -EFAULT; } -- 1.8.5.3
2014 Jul 08
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
.../drivers/gpu/drm/nouveau/core/engine/device/base.c index 18c8c7245b73..e4e9e64988fe 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c @@ -489,7 +489,10 @@ nv_device_map_page(struct nouveau_device *device, struct page *page) if (pci_dma_mapping_error(device->pdev, ret)) ret = 0; } else { - ret = page_to_phys(page); + ret = dma_map_page(&device->platformdev->dev, page, 0, + PAGE_SIZE, DMA_BIDIRECTIONAL); + if (dma_mapping_error(&device->platformdev->dev, ret)) + ret = 0; } return ret; @@ -501,6 +504,...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...se.c >> index 18c8c7245b73..e4e9e64988fe 100644 >> --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c >> +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c >> @@ -489,7 +489,10 @@ nv_device_map_page(struct nouveau_device *device, struct page *page) >> if (pci_dma_mapping_error(device->pdev, ret)) >> ret = 0; >> } else { >> - ret = page_to_phys(page); >> + ret = dma_map_page(&device->platformdev->dev, page, 0, >> + PAGE_SIZE, DMA_BIDIRECTIONAL); >> + if (dma_mapping_error(&device->platformdev->dev...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...if (!res) + return 0; + return resource_size(res); + } +} + +dma_addr_t +nv_device_map_page(struct nouveau_device *device, struct page *page) { + dma_addr_t ret; + + if (nv_device_is_pci(device)) { + ret = pci_map_page(device->pdev, page, 0, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL); + if (pci_dma_mapping_error(device->pdev, ret)) + ret = 0; + } else { + ret = page_to_phys(page); + } + + return ret; +} + +void +nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) +{ + if (nv_device_is_pci(device)) + pci_unmap_page(device->pdev, addr, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL);...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...>> --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c >>>> +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c >>>> @@ -489,7 +489,10 @@ nv_device_map_page(struct nouveau_device *device, >>>> struct page *page) >>>> if (pci_dma_mapping_error(device->pdev, ret)) >>>> ret = 0; >>>> } else { >>>> - ret = page_to_phys(page); >>>> + ret = dma_map_page(&device->platformdev->dev, page, 0, >>>> +...
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
...if (!res) + return 0; + return resource_size(res); + } +} + +dma_addr_t +nv_device_map_page(struct nouveau_device *device, struct page *page) +{ + dma_addr_t ret; + + if (nv_device_is_pci(device)) { + ret = pci_map_page(device->pdev, page, 0, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL); + if (pci_dma_mapping_error(device->pdev, ret)) + ret = 0; + } else { + ret = page_to_phys(page); + } + + return ret; +} + +void +nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) +{ + if (nv_device_is_pci(device)) + pci_unmap_page(device->pdev, addr, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL);...
2014 Feb 12
2
[PATCH v2] drm/nouveau: support for platform devices
On 12/02/14 05:38, Alexandre Courbot wrote: > Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead > of PCI to which Nouveau is tightly dependent. This patch allows Nouveau > to handle platform devices by: > > - abstracting PCI-dependent functions that were typically used for > resource querying and page mapping, > - introducing a nv_device_is_pci()
2014 Feb 11
2
[PATCH] drm/nouveau: support for platform devices
On Mon, Feb 10, 2014 at 8:50 PM, Thierry Reding <thierry.reding at gmail.com> wrote: > On Mon, Feb 10, 2014 at 02:53:00PM +0900, Alexandre Courbot wrote: > [...] >> diff --git a/drivers/gpu/drm/nouveau/core/engine/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c > [...] >> +resource_size_t >> +nv_device_resource_start(struct nouveau_device *device,
2014 Feb 10
2
[PATCH] drm/nouveau: support for platform devices
...if (!res) + return 0; + return resource_size(res); + } +} + +dma_addr_t +nv_device_map_page(struct nouveau_device *device, struct page *page) +{ + dma_addr_t ret; + + if (nv_device_is_pci(device)) { + ret = pci_map_page(device->pdev, page, 0, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL); + if (pci_dma_mapping_error(device->pdev, ret)) + ret = 0; + } else { + ret = page_to_phys(page); + } + + return ret; +} + +void +nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) +{ + if (nv_device_is_pci(device)) + pci_unmap_page(device->pdev, addr, PAGE_SIZE, + PCI_DMA_BIDIRECTIONAL);...
2014 Jul 08
8
[PATCH v4 0/6] drm: nouveau: memory coherency on ARM
Another revision of this patchset critical for GK20A to operate. Previous attempts were exclusively using either TTM's regular page allocator or the DMA API one. Both have their advantages and drawbacks: the page allocator is fast but requires explicit synchronization on non-coherent architectures, whereas the DMA allocator always returns coherent memory, but is also slower, creates a
2014 Feb 01
28
[RFC 00/16] drm/nouveau: initial support for GK20A (Tegra K1)
Hello everyone, GK20A is the Kepler-based GPU used in the upcoming Tegra K1 chips. The following patches perform architectural changes to Nouveau that are necessary to support non-PCI GPUs and add initial support for GK20A. Although the support is still very basic and more user-space changes will be needed to make the full graphics stack run on top of it, we were able to successfully open
2013 Jul 25
0
[PATCH 1/5] Intel MIC Host Driver for X100 family.
...k for errors by called mic_map_error(..). + * + * returns DMA address as required by MIC. + */ +dma_addr_t mic_map_single(struct mic_device *mdev, void *va, size_t size) +{ + dma_addr_t mic_addr = 0; + dma_addr_t dma_addr = + pci_map_single(mdev->pdev, va, size, PCI_DMA_BIDIRECTIONAL); + + if (!pci_dma_mapping_error(mdev->pdev, dma_addr)) { + mic_addr = mic_map(mdev, dma_addr, size); + if (!mic_addr) { + dev_err(&mdev->pdev->dev, + "mic_map failed dma_addr 0x%llx size 0x%lx\n", + dma_addr, size); + pci_unmap_single(mdev->pdev, dma_addr, + size, PCI_DMA_BIDIRECTIONAL); +...
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)