search for: ttm_page_flag_sg

Displaying 17 results from an estimated 17 matches for "ttm_page_flag_sg".

2017 Aug 18
0
[PATCH] drm/nouveau: use new TTM populate/DMA map function
...44 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1448,8 +1448,6 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) struct nvkm_device *device; struct drm_device *dev; struct device *pdev; - unsigned i; - int r; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (ttm->state != tt_unpopulated) @@ -1480,30 +1478,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) } #endif - r = ttm_pool_populate(ttm); - if (r) { - return r; - } - - for (i = 0; i < ttm->num_pages; i++) { - dma_addr_t addr; - - addr = dma_map_page(pdev, ttm->pages[i],...
2020 Nov 02
0
[PATCH -next] drm/nouveu: remove unused variable
...0644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1310,7 +1310,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, { struct ttm_tt *ttm_dma = (void *)ttm; struct nouveau_drm *drm; - struct device *dev; bool slave = !!(ttm->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 t...
2020 Nov 20
1
[PATCH] drm/ttm: remove unused varibles
...0644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1228,7 +1228,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, { struct ttm_tt *ttm_dma = (void *)ttm; struct nouveau_drm *drm; - struct device *dev; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (ttm_tt_is_populated(ttm)) @@ -1242,7 +1241,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); } -- 2.7.4
2014 Jul 31
2
[PATCH v5] drm/nouveau: map pages using DMA API
...c46c3 100644 --- a/drm/nouveau_bo.c +++ b/drm/nouveau_bo.c @@ -1340,6 +1340,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) struct nouveau_drm *drm; struct nouveau_device *device; struct drm_device *dev; + struct device *pdev; unsigned i; int r; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); @@ -1358,6 +1359,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) drm = nouveau_bdev(ttm->bdev); device = nv_device(drm->device); dev = drm->dev; + pdev = nv_device_base(device); #if __OS_HAS_AGP if (drm->agp.stat == ENABLED) { @@ -1377,17 +1379,22 @@ nouveau_ttm_tt_populat...
2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...ct ttm_bo_device *bdev, > + unsigned long size, uint32_t page_flags) > +{ > + struct ttm_tt *ttm = &ttm_dma->ttm; > + int ret; > + > + ttm_tt_init_fields(ttm, bdev, size, page_flags); > + > + INIT_LIST_HEAD(&ttm_dma->pages_list); > + if (page_flags & TTM_PAGE_FLAG_SG) > + ret = ttm_sg_tt_alloc_page_directory(ttm_dma); > + else > + ret = ttm_dma_tt_alloc_page_directory(ttm_dma); > + if (ret) { > + ttm_tt_destroy(ttm); > + pr_err("Failed allocating page table\n"); > + return -ENOMEM; > + } > + return 0; > +} > +EXPO...
2014 Aug 04
0
[PATCH v5] drm/nouveau: map pages using DMA API
...b/drm/nouveau_bo.c > @@ -1340,6 +1340,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) > struct nouveau_drm *drm; > struct nouveau_device *device; > struct drm_device *dev; > + struct device *pdev; > unsigned i; > int r; > bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); > @@ -1358,6 +1359,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm) > drm = nouveau_bdev(ttm->bdev); > device = nv_device(drm->device); > dev = drm->dev; > + pdev = nv_device_base(device); > > #if __OS_HAS_AGP > if (drm->agp.stat == ENABLED) { > @...
2020 Aug 20
0
[PATCH 1/2] drm/ttm: fix broken merge between drm-next and drm-misc-next
...create(struct ttm_buffer_object *bo, bool zero_alloc) dma_resv_assert_held(bo->base.resv); + if (bo->ttm) + return 0; + if (bdev->need_dma32) page_flags |= TTM_PAGE_FLAG_DMA32; @@ -67,7 +70,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) page_flags |= TTM_PAGE_FLAG_SG; break; default: - bo->ttm = NULL; pr_err("Illegal buffer object type\n"); return -EINVAL; } -- 2.17.1
2020 Nov 19
0
[PATCH] drm/ttm: remove unused varibles
...eau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -1228,7 +1228,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, > { > struct ttm_tt *ttm_dma = (void *)ttm; > struct nouveau_drm *drm; > - struct device *dev; > bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); > > if (ttm_tt_is_populated(ttm)) > @@ -1242,7 +1241,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); > }
2020 Aug 20
3
Moving LRU handling into Nouveau v2
Hi guys, I already tried this a few month ago, but since I don't have NVidia hardware its rather hard to test for me (need to get some ordered). Dave brought up the topic that we should probably try to move the handling into Nouveau once more, so I tried to fix the problem Ben reported and rebased on top of current drm-misc-next. Dave can you test this? At least in theory the approach
2018 Mar 05
0
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...g size, uint32_t page_flags) >> +{ >> +    struct ttm_tt *ttm = &ttm_dma->ttm; >> +    int ret; >> + >> +    ttm_tt_init_fields(ttm, bdev, size, page_flags); >> + >> +    INIT_LIST_HEAD(&ttm_dma->pages_list); >> +    if (page_flags & TTM_PAGE_FLAG_SG) >> +        ret = ttm_sg_tt_alloc_page_directory(ttm_dma); >> +    else >> +        ret = ttm_dma_tt_alloc_page_directory(ttm_dma); >> +    if (ret) { >> +        ttm_tt_destroy(ttm); >> +        pr_err("Failed allocating page table\n"); >> +    ...
2014 Feb 01
0
[RFC 02/16] drm/nouveau: basic support for platform devices
...= 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) return; drm = nouveau_bdev(ttm->bdev); + device = nv_device(drm->device); dev = drm->dev; #if __OS_HAS_AGP @@ -1415,8 +1418,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm) for (i = 0; i < ttm->nu...
2020 Nov 06
4
[PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
Hi folks, Currently, when the device is removed (or the driver is unbound) the nouveau_drm structure de-allocated. However, it's still accessible from and used by some DRM layer callbacks. For example, file handles can be closed after the device has been removed (physically or otherwise). This series converts the Nouveau device structure to be allocated and de-allocated with the
2014 Feb 12
0
[PATCH v2] drm/nouveau: support for platform devices
...= 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) return; drm = nouveau_bdev(ttm->bdev); + device = nv_device(drm->device); dev = drm->dev; #if __OS_HAS_AGP @@ -1415,8 +1418,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm) for (i = 0; i < ttm->nu...
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
...= 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) return; drm = nouveau_bdev(ttm->bdev); + device = nv_device(drm->device); dev = drm->dev; #if __OS_HAS_AGP @@ -1415,8 +1418,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm) for (i = 0; i < ttm->nu...
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