Displaying 20 results from an estimated 33 matches for "nouveau_ttm_tt_unpopul".
2014 Dec 10
0
[PATCH] drm: fix missing return statement in nouveau_ttm_tt_unpopulate
nouveau_ttm_tt_unpopulate() is supposed to return right after calling
ttm_dma_unpopulate() in the case of a coherent buffer. The return
statement was omitted, leading to the pages being unmapped twice. Fix
this.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau_bo.c | 4 +++-
1 file change...
2014 Jul 31
2
[PATCH v5] drm/nouveau: map pages using DMA API
...a->dma_address[i]);
+ dma_unmap_page(pdev, ttm_dma->dma_address[i],
+ PAGE_SIZE, DMA_BIDIRECTIONAL);
ttm_dma->dma_address[i] = 0;
}
ttm_pool_unpopulate(ttm);
return -EFAULT;
}
+
+ ttm_dma->dma_address[i] = addr;
}
return 0;
}
@@ -1399,6 +1406,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
struct nouveau_drm *drm;
struct nouveau_device *device;
struct drm_device *dev;
+ struct device *pdev;
unsigned i;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
@@ -1408,6 +1416,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
drm = nouveau_bdev(...
2014 Aug 04
0
[PATCH v5] drm/nouveau: map pages using DMA API
...;dma_address[i],
> + PAGE_SIZE, DMA_BIDIRECTIONAL);
> ttm_dma->dma_address[i] = 0;
> }
> ttm_pool_unpopulate(ttm);
> return -EFAULT;
> }
> +
> + ttm_dma->dma_address[i] = addr;
> }
> return 0;
> }
> @@ -1399,6 +1406,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
> struct nouveau_drm *drm;
> struct nouveau_device *device;
> struct drm_device *dev;
> + struct device *pdev;
> unsigned i;
> bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
>
> @@ -1408,6 +1416,7 @@ nouveau_ttm_tt_unpopulate(s...
2017 Aug 18
0
[PATCH] drm/nouveau: use new TTM populate/DMA map function
...dress[i],
- PAGE_SIZE, DMA_BIDIRECTIONAL);
- ttm_dma->dma_address[i] = 0;
- }
- ttm_pool_unpopulate(ttm);
- return -EFAULT;
- }
-
- ttm_dma->dma_address[i] = addr;
- }
- return 0;
+ return ttm_populate_and_map_pages(pdev, ttm_dma);
}
static void
@@ -1514,7 +1489,6 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
struct nvkm_device *device;
struct drm_device *dev;
struct device *pdev;
- unsigned i;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
if (slave)
@@ -1539,14 +1513,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
}
#endif
- for (i = 0; i < tt...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...{
while (--i) {
- pci_unmap_page(dev->pdev, ttm_dma->dma_address[i],
- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+ nv_device_unmap_page(device,
+ ttm_dma->dma_address[i]);
ttm_dma->dma_address[i] = 0;
}
ttm_pool_unpopulate(ttm);
@@ -1389,6 +1390,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
{
struct ttm_dma_tt *ttm_dma = (void *)ttm;
struct nouveau_drm *drm;
+ struct nouveau_device *device;
struct drm_device *dev;
unsigned i;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
@@ -1397,6 +1399,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)...
2014 Oct 10
1
[Bug 84880] New: [NV94] X freeze on nouveau list_del corruption / unable to handle kernel paging request
...del_entry+0xdd/0xe0
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffffff8139abfd>]
list_del+0xd/0x30
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffffffa00902e8>]
ttm_dma_unpopulate+0x2c8/0x360 [ttm]
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffffffa01a8bbd>]
nouveau_ttm_tt_unpopulate+0x11d/0x130 [nouveau]
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffffffa00871e4>]
ttm_tt_unpopulate+0x54/0x60 [ttm]
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffffffa0087255>]
ttm_tt_destroy+0x65/0x70 [ttm]
Oct 10 10:36:18 adam.happyassassin.net kernel: [<ffffff...
2016 Mar 02
0
[PATCH] bo: consider DMA buffers on x86 only
...drm/nouveau/nouveau_bo.c
@@ -1502,7 +1502,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm)
}
#endif
-#ifdef CONFIG_SWIOTLB
+#if IS_ENABLED(CONFIG_SWIOTLB) && IS_ENABLED(CONFIG_X86)
if (swiotlb_nr_tbl()) {
return ttm_dma_populate((void *)ttm, dev->dev);
}
@@ -1570,7 +1570,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
}
#endif
-#ifdef CONFIG_SWIOTLB
+#if IS_ENABLED(CONFIG_SWIOTLB) && IS_ENABLED(CONFIG_X86)
if (swiotlb_nr_tbl()) {
ttm_dma_unpopulate((void *)ttm, dev->dev);
return;
--
2.7.2
2020 Nov 02
0
[PATCH -next] drm/nouveu: remove unused variable
...;page_flags & TTM_PAGE_FLAG_SG);
if (ttm_tt_is_populated(ttm))
@@ -1324,7 +1323,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev,
}
drm = nouveau_bdev(bdev);
- dev = drm->dev->dev;
return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
}
@@ -1334,14 +1332,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_bo_device *bdev,
struct ttm_tt *ttm)
{
struct nouveau_drm *drm;
- struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
if (slave)
return;
drm = nouveau_bdev(bdev);
- dev = drm->dev->dev;
return ttm_pool_free(&drm->ttm.b...
2019 Jun 28
0
[PATCH v3 15/18] drm/nouveau: switch driver from bo->resv to bo->base.resv
...ev(bo->bdev);
struct drm_device *dev = drm->dev;
- struct dma_fence *fence = reservation_object_get_excl(bo->resv);
+ struct dma_fence *fence = reservation_object_get_excl(bo->base.resv);
nv10_bo_put_tile_region(dev, *old_tile, fence);
*old_tile = new_tile;
@@ -1656,7 +1655,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence, bool exclusive)
{
- struct reservation_object *resv = nvbo->bo.resv;
+ struct reservation_object *resv = nvbo->bo.base.resv;
if (exclusive)
reservation_object_add_excl_fence(resv, &...
2019 Aug 02
0
[PATCH v4 14/17] drm/nouveau: switch driver from bo->resv to bo->base.resv
...ev(bo->bdev);
struct drm_device *dev = drm->dev;
- struct dma_fence *fence = reservation_object_get_excl(bo->resv);
+ struct dma_fence *fence = reservation_object_get_excl(bo->base.resv);
nv10_bo_put_tile_region(dev, *old_tile, fence);
*old_tile = new_tile;
@@ -1656,7 +1655,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence, bool exclusive)
{
- struct reservation_object *resv = nvbo->bo.resv;
+ struct reservation_object *resv = nvbo->bo.base.resv;
if (exclusive)
reservation_object_add_excl_fence(resv, &...
2019 Aug 05
0
[PATCH v5 15/18] drm/nouveau: switch driver from bo->resv to bo->base.resv
...ev(bo->bdev);
struct drm_device *dev = drm->dev;
- struct dma_fence *fence = reservation_object_get_excl(bo->resv);
+ struct dma_fence *fence = reservation_object_get_excl(bo->base.resv);
nv10_bo_put_tile_region(dev, *old_tile, fence);
*old_tile = new_tile;
@@ -1656,7 +1655,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence, bool exclusive)
{
- struct reservation_object *resv = nvbo->bo.resv;
+ struct reservation_object *resv = nvbo->bo.base.resv;
if (exclusive)
reservation_object_add_excl_fence(resv, &...
2019 Aug 05
0
[PATCH v6 14/17] drm/nouveau: switch driver from bo->resv to bo->base.resv
...ev(bo->bdev);
struct drm_device *dev = drm->dev;
- struct dma_fence *fence = reservation_object_get_excl(bo->resv);
+ struct dma_fence *fence = reservation_object_get_excl(bo->base.resv);
nv10_bo_put_tile_region(dev, *old_tile, fence);
*old_tile = new_tile;
@@ -1656,7 +1655,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence, bool exclusive)
{
- struct reservation_object *resv = nvbo->bo.resv;
+ struct reservation_object *resv = nvbo->bo.base.resv;
if (exclusive)
reservation_object_add_excl_fence(resv, &...
2019 Jun 21
0
[PATCH v2 15/18] drm/nouveau: switch driver from bo->resv to bo->base.resv
...ev(bo->bdev);
struct drm_device *dev = drm->dev;
- struct dma_fence *fence = reservation_object_get_excl(bo->resv);
+ struct dma_fence *fence = reservation_object_get_excl(bo->base.resv);
nv10_bo_put_tile_region(dev, *old_tile, fence);
*old_tile = new_tile;
@@ -1654,7 +1654,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence, bool exclusive)
{
- struct reservation_object *resv = nvbo->bo.resv;
+ struct reservation_object *resv = nvbo->bo.base.resv;
if (exclusive)
reservation_object_add_excl_fence(resv, &...
2020 May 13
1
[PATCH 2/2] drm/ttm: deprecate AGP support
...ruct ttm_operation_ctx *ctx)
> drm = nouveau_bdev(ttm->bdev);
> dev = drm->dev->dev;
>
> -#if IS_ENABLED(CONFIG_AGP)
> +#if IS_ENABLED(CONFIG_DRM_TTM_AGP)
> if (drm->agp.bridge) {
> return ttm_agp_tt_populate(ttm, ctx);
> }
> @@ -1656,7 +1656,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
> drm = nouveau_bdev(ttm->bdev);
> dev = drm->dev->dev;
>
> -#if IS_ENABLED(CONFIG_AGP)
> +#if IS_ENABLED(CONFIG_DRM_TTM_AGP)
> if (drm->agp.bridge) {
> ttm_agp_tt_unpopulate(ttm);
> return;
> diff --git a/drivers/gpu/drm/n...
2020 May 13
0
[PATCH 2/2] drm/ttm: deprecate AGP support
...ouveau_ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
drm = nouveau_bdev(ttm->bdev);
dev = drm->dev->dev;
-#if IS_ENABLED(CONFIG_AGP)
+#if IS_ENABLED(CONFIG_DRM_TTM_AGP)
if (drm->agp.bridge) {
return ttm_agp_tt_populate(ttm, ctx);
}
@@ -1656,7 +1656,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
drm = nouveau_bdev(ttm->bdev);
dev = drm->dev->dev;
-#if IS_ENABLED(CONFIG_AGP)
+#if IS_ENABLED(CONFIG_DRM_TTM_AGP)
if (drm->agp.bridge) {
ttm_agp_tt_unpopulate(ttm);
return;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h b/drivers/gpu/dr...
2016 Jul 13
1
[PATCH 1/2] ttm: remove special handling of coherent objects
...them.
- */
- if (!nvxx_device(&drm->device)->func->cpu_coherent &&
- ttm->caching_state == tt_uncached)
- return ttm_dma_populate(ttm_dma, dev->dev);
-
#if IS_ENABLED(CONFIG_AGP)
if (drm->agp.bridge) {
return ttm_agp_tt_populate(ttm);
@@ -1557,16 +1516,6 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
dev = drm->dev;
pdev = device->dev;
- /*
- * Objects matching this condition have been marked as force_coherent,
- * so use the DMA API for them.
- */
- if (!nvxx_device(&drm->device)->func->cpu_coherent &&
- ttm->caching_state == tt...
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
...{
while (--i) {
- pci_unmap_page(dev->pdev, ttm_dma->dma_address[i],
- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+ nv_device_unmap_page(device,
+ ttm_dma->dma_address[i]);
ttm_dma->dma_address[i] = 0;
}
ttm_pool_unpopulate(ttm);
@@ -1389,6 +1390,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
{
struct ttm_dma_tt *ttm_dma = (void *)ttm;
struct nouveau_drm *drm;
+ struct nouveau_device *device;
struct drm_device *dev;
unsigned i;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
@@ -1397,6 +1399,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)...
2020 May 13
8
[RFC] Deprecate AGP GART support for Radeon/Nouveau/TTM
Unfortunately AGP is still to widely used as we could just drop support for using its GART.
Not using the AGP GART also doesn't mean a loss in functionality since drivers will just fallback to the driver specific PCI GART.
For now just deprecate the code and don't enable the AGP GART in TTM even when general AGP support is available.
Please comment,
Christian.
2014 Jun 27
3
[PATCH v3 0/2] drm: nouveau: memory coherency for ARM
v2 was doing some pretty nasty things with the DMA API, so I took a different
approach for this v3.
As suggested, this version uses ttm_dma_populate() to populate BOs. The reason
for doing this was that it would entitle us to using the DMA sync functions,
but since the memory returned is already coherent anyway, we do not even
need to call these functions anymore.
So this series has turned into
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()