search for: platformdev

Displaying 20 results from an estimated 27 matches for "platformdev".

2014 Jul 10
3
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...rm/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,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) > if (nv_dev...
2014 Feb 10
0
[PATCH] drm/nouveau: support for platform devices
...> +resource_size_t > +nv_device_resource_start(struct nouveau_device *device, unsigned int bar) > +{ > + if (nv_device_is_pci(device)) { > + return pci_resource_start(device->pdev, bar); > + } else { > + struct resource *res; > + res = platform_get_resource(device->platformdev, > + IORESOURCE_MEM, bar); > + if (!res) > + return 0; > + return res->start; > + } > +} > + > +resource_size_t > +nv_device_resource_len(struct nouveau_device *device, unsigned int bar) > +{ > + if (nv_device_is_pci(device)) { > + return pci_reso...
2014 Feb 10
2
[PATCH] drm/nouveau: support for platform devices
...gine_destroy(&device->base); } +resource_size_t +nv_device_resource_start(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_start(device->pdev, bar); + } else { + struct resource *res; + res = platform_get_resource(device->platformdev, + IORESOURCE_MEM, bar); + if (!res) + return 0; + return res->start; + } +} + +resource_size_t +nv_device_resource_len(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_len(device->pdev, bar); + } else { + struct resourc...
2014 Jul 08
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...ice/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,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) if (nv_device_is_pci(device)) pci_unmap_page(de...
2014 Feb 11
2
[PATCH] drm/nouveau: support for platform devices
...eau_device *device, unsigned int bar) >> +{ >> + if (nv_device_is_pci(device)) { >> + return pci_resource_start(device->pdev, bar); >> + } else { >> + struct resource *res; >> + res = platform_get_resource(device->platformdev, >> + IORESOURCE_MEM, bar); >> + if (!res) >> + return 0; >> + return res->start; >> + } >> +} >> + >> +resource_size_t >> +nv_device_resource_len(struct...
2014 Jul 11
2
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...gt;> 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; >>> } >>> >>> retur...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...gine_destroy(&device->base); } +resource_size_t +nv_device_resource_start(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_start(device->pdev, bar); + } else { + struct resource *res; + res = platform_get_resource(device->platformdev, + IORESOURCE_MEM, bar); + if (!res) + return 0; + return res->start; + } +} + +resource_size_t +nv_device_resource_len(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_len(device->pdev, bar); + } else { + struct resourc...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...ce/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,9 @@ nv_device_unmap_page(struct nouveau_device *device, dma_ad...
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
...gine_destroy(&device->base); } +resource_size_t +nv_device_resource_start(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_start(device->pdev, bar); + } else { + struct resource *res; + res = platform_get_resource(device->platformdev, + IORESOURCE_MEM, bar); + if (!res) + return 0; + return res->start; + } +} + +resource_size_t +nv_device_resource_len(struct nouveau_device *device, unsigned int bar) +{ + if (nv_device_is_pci(device)) { + return pci_resource_len(device->pdev, bar); + } else { + struct resourc...
2014 Jul 11
0
[PATCH v4 2/6] drm/nouveau: map pages using DMA API on platform devices
...ge) >>>> 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 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 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 01
0
[RFC 03/16] drm/nouveau: add platform device probing function
...entry(device, &nv_devices, head) { + if (device->handle == name) + goto done; + } + + ret = nouveau_engine_create_(NULL, NULL, &nouveau_device_oclass, true, + "DEVICE", "device", length, pobject); + device = *pobject; + if (ret) + goto done; + + device->platformdev = pdev; + device->handle = name; + device->cfgopt = cfg; + device->dbgopt = dbg; + device->name = sname; + + nv_subdev(device)->debug = nouveau_dbgopt(device->dbgopt, "DEVICE"); + nv_engine(device)->sclass = nouveau_device_sclass; + list_add(&device->head, &amp...
2014 May 19
10
[PATCH 0/5] drm/nouveau: platform devices and GK20A probing
This patch series is the final (?) step towards the initial support of GK20A, allowing it to be probed and used (currently at a very slow speed, and for offscreen rendering only) on the Jetson TK1 and Venice 2 boards. The main piece if the first patch which adds platform devices probing support to Nouveau. There are probably lots of things that need to be discussed about it, e.g.: * The way the
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
2014 Jun 26
0
[PATCH v3 1/3] drm/nouveau: support for probing platform devices
..., pobject); + if (err) + return ERR_PTR(err); + + drm = drm_dev_alloc(&driver, &pdev->dev); + if (!drm) { + err = -ENOMEM; + goto err_free; } - return ret; + err = drm_dev_set_unique(drm, "%s", dev_name(&pdev->dev)); + if (err < 0) + goto err_free; + + drm->platformdev = pdev; + platform_set_drvdata(pdev, drm); + + return drm; + +err_free: + nouveau_object_ref(NULL, (struct nouveau_object **)pobject); + + return ERR_PTR(err); } +EXPORT_SYMBOL(nouveau_platform_device_create_); static int __init nouveau_drm_init(void) diff --git a/drivers/gpu/drm/nouveau/nouve...
2014 Jun 26
6
[PATCH v3 0/3] drm/nouveau: support for probing platform devices
This series adds support for probing platform devices on Nouveau, as well as the DT bindings for GK20A. It doesn't enable the GPU yet on Tegra boards since a few extra things need to be supported before that. This version is mostly identical to v2 but fixes an important issue: the drvdata must be set to the drm_device for sysfs to work, so the platform device structure now includes the
2014 Jun 13
3
[PATCH v2 0/3] drm/nouveau: support for probing platform devices
This series adds support for probing platform devices on Nouveau, as well as the DT bindings for GK20A. It doesn't enable the GPU yet on Tegra boards since a few extra things need to be supported before that. Thanks to the input received for v1, this version is more self-contained and shares less stuff between nouveau_drm and nouveau_platform. The major change is that nouveau_platform is now
2014 Jun 26
2
[PATCH v3 1/3] drm/nouveau: support for probing platform devices
...drm_dev_alloc(&driver, &pdev->dev); > + if (!drm) { > + err = -ENOMEM; > + goto err_free; > } > > - return ret; > + err = drm_dev_set_unique(drm, "%s", dev_name(&pdev->dev)); > + if (err < 0) > + goto err_free; > + > + drm->platformdev = pdev; > + platform_set_drvdata(pdev, drm); > + > + return drm; > + > +err_free: > + nouveau_object_ref(NULL, (struct nouveau_object **)pobject); > + > + return ERR_PTR(err); > } > +EXPORT_SYMBOL(nouveau_platform_device_create_); > > static int __init &gt...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...gt;> 8) != PCI_CLASS_DISPLAY_VGA)) goto err_request_regions; if (force_legacy) { diff --git a/include/drm/drmP.h b/include/drm/drmP.h index e928625..a1067c4 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -799,6 +799,7 @@ struct drm_device { #endif struct platform_device *platformdev; /**< Platform device struture */ + struct virtio_device *virtdev; struct drm_sg_mem *sg; /**< Scatter gather memory */ unsigned int num_crtcs; /**< Number of CRTCs on this device */ diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 68ceb97..97...