search for: page_flag

Displaying 20 results from an estimated 83 matches for "page_flag".

Did you mean: page_flags
2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...age_caching(struct page *p, > enum ttm_caching_state c_old, > @@ -227,8 +237,8 @@ void ttm_tt_destroy(struct ttm_tt *ttm) > ttm->func->destroy(ttm); > } > > -int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev, > - unsigned long size, uint32_t page_flags) > +void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_bo_device *bdev, > + unsigned long size, uint32_t page_flags) > { > ttm->bdev = bdev; > ttm->num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; > @@ -236,6 +246,12 @@ int ttm_tt_init(struct ttm_tt *tt...
2018 Mar 05
0
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...                   enum ttm_caching_state c_old, >> @@ -227,8 +237,8 @@ void ttm_tt_destroy(struct ttm_tt *ttm) >>       ttm->func->destroy(ttm); >>   } >>   -int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev, >> -        unsigned long size, uint32_t page_flags) >> +void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_bo_device *bdev, >> +            unsigned long size, uint32_t page_flags) >>   { >>       ttm->bdev = bdev; >>       ttm->num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; >> @@ -236,6 +246,...
2014 Dec 10
2
[PATCH] drm: sgdma: free allocated memory if TT init fails
...drm/nouveau_sgdma.c index 01707e7deaf5..e4fc494d688d 100644 --- a/drm/nouveau_sgdma.c +++ b/drm/nouveau_sgdma.c @@ -107,7 +107,10 @@ nouveau_sgdma_create_ttm(struct ttm_bo_device *bdev, else nvbe->ttm.ttm.func = &nv50_sgdma_backend; - if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) + if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) { + kfree(nvbe); return NULL; + } + return &nvbe->ttm.ttm; } -- 2.1.3
2020 Apr 28
0
[PATCH v3 22/75] x86/boot/compressed/64: Add set_page_en/decrypted() helpers
...boot process */ #undef __PAGE_OFFSET #define __PAGE_OFFSET __PAGE_OFFSET_BASE @@ -157,6 +158,139 @@ void initialize_identity_maps(void) write_cr3(top_level_pgt); } +static pte_t *split_large_pmd(struct x86_mapping_info *info, + pmd_t *pmdp, unsigned long __address) +{ + unsigned long page_flags; + unsigned long address; + pte_t *pte; + pmd_t pmd; + int i; + + pte = (pte_t *)info->alloc_pgt_page(info->context); + if (!pte) + return NULL; + + address = __address & PMD_MASK; + /* No large page - clear PSE flag */ + page_flags = info->page_flag & ~_PAGE_PSE; + + /* Pop...
2017 Aug 18
0
[PATCH] drm/nouveau: use new TTM populate/DMA map function
...6ad0ad53047a 100644 --- 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...
2020 Aug 20
0
[PATCH 1/2] drm/ttm: fix broken merge between drm-next and drm-misc-next
...dex 9aa4fbe386e6..1ccf1ef050d6 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -50,6 +50,9 @@ int ttm_tt_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 02
0
[PATCH -next] drm/nouveu: remove unused variable
...33377..96f00b5 100644 --- 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_tt...
2020 Nov 20
1
[PATCH] drm/ttm: remove unused varibles
...a4286..9465f56 100644 --- 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
2018 Nov 07
0
[PATCH] drm/qxl: use ttm_tt
...*qxl_ttm_tt_create(struct ttm_buffer_object *bo, gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL); if (gtt == NULL) return NULL; - gtt->ttm.ttm.func = &qxl_backend_func; + gtt->ttm.func = &qxl_backend_func; gtt->qdev = qdev; - if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags)) { + if (ttm_tt_init(&gtt->ttm, bo, page_flags)) { kfree(gtt); return NULL; } - return &gtt->ttm.ttm; + return &gtt->ttm; } static void qxl_move_null(struct ttm_buffer_object *bo, -- 2.9.3
2014 Dec 10
0
[PATCH] drm: sgdma: free allocated memory if TT init fails
...4 > --- a/drm/nouveau_sgdma.c > +++ b/drm/nouveau_sgdma.c > @@ -107,7 +107,10 @@ nouveau_sgdma_create_ttm(struct ttm_bo_device *bdev, > else > nvbe->ttm.ttm.func = &nv50_sgdma_backend; > > - if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) > + if (ttm_dma_tt_init(&nvbe->ttm, bdev, size, page_flags, dummy_read_page)) { > + kfree(nvbe); > return NULL; > + } > + > return &nvbe->ttm.ttm; > } > -- > 2.1.3 > > _____________...
2014 Jul 31
2
[PATCH v5] drm/nouveau: map pages using DMA API
...86f9f793..e4f2071c46c3 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 @...
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
2020 May 13
1
[PATCH 2/2] drm/ttm: deprecate AGP support
...d4ae48f5c 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -635,7 +635,7 @@ nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val) > static struct ttm_tt * > nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) > { > -#if IS_ENABLED(CONFIG_AGP) > +#if IS_ENABLED(CONFIG_DRM_TTM_AGP) > struct nouveau_drm *drm = nouveau_bdev(bo->bdev); > > if (drm->agp.bridge) { > @@ -1448,7 +1448,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg) >...
2019 Apr 09
0
[PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM
...ct ttm_tt *tt) > -{ > - ttm_tt_fini(tt); > - kfree(tt); > -} > - > -static struct ttm_backend_func vbox_tt_backend_func = { > - .destroy = &vbox_ttm_backend_destroy, > -}; > - > -static struct ttm_tt *vbox_ttm_tt_create(struct ttm_buffer_object *bo, > - u32 page_flags) > -{ > - struct ttm_tt *tt; > - > - tt = kzalloc(sizeof(*tt), GFP_KERNEL); > - if (!tt) > - return NULL; > - > - tt->func = &vbox_tt_backend_func; > - if (ttm_tt_init(tt, bo, page_flags)) { > - kfree(tt); > - return NULL; > - } > - > - return tt...
2020 May 13
0
[PATCH 2/2] drm/ttm: deprecate AGP support
...c index c40f127de3d0..c73d4ae48f5c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -635,7 +635,7 @@ nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val) static struct ttm_tt * nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) { -#if IS_ENABLED(CONFIG_AGP) +#if IS_ENABLED(CONFIG_DRM_TTM_AGP) struct nouveau_drm *drm = nouveau_bdev(bo->bdev); if (drm->agp.bridge) { @@ -1448,7 +1448,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg) /* System memory */ return 0; case...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...m) -{ -} - -static void ast_ttm_backend_destroy(struct ttm_tt *tt) -{ - ttm_tt_fini(tt); - kfree(tt); -} - -static struct ttm_backend_func ast_tt_backend_func = { - .destroy = &ast_ttm_backend_destroy, -}; - - -static struct ttm_tt *ast_ttm_tt_create(struct ttm_buffer_object *bo, - uint32_t page_flags) -{ - struct ttm_tt *tt; - - tt = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL); - if (tt == NULL) - return NULL; - tt->func = &ast_tt_backend_func; - if (ttm_tt_init(tt, bo, page_flags)) { - kfree(tt); - return NULL; - } - return tt; -} - -struct ttm_bo_driver ast_bo_driver = { - .ttm_tt_c...
2019 May 06
0
[PATCH v4 12/19] drm/bochs: Convert bochs driver to VRAM MM
...- -static void bochs_ttm_backend_destroy(struct ttm_tt *tt) -{ - ttm_tt_fini(tt); - kfree(tt); -} - -static struct ttm_backend_func bochs_tt_backend_func = { - .destroy = &bochs_ttm_backend_destroy, -}; - -static struct ttm_tt *bochs_ttm_tt_create(struct ttm_buffer_object *bo, - uint32_t page_flags) -{ - struct ttm_tt *tt; - - tt = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL); - if (tt == NULL) - return NULL; - tt->func = &bochs_tt_backend_func; - if (ttm_tt_init(tt, bo, page_flags)) { - kfree(tt); - return NULL; - } - return tt; -} - -static struct ttm_bo_driver bochs_bo_driver = {...
2014 Aug 04
0
[PATCH v5] drm/nouveau: map pages using DMA API
...au_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.s...
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.
2019 Apr 24
0
[PATCH v2 05/17] drm: Add VRAM MM, a simple memory manager for dedicated VRAM
...oid backend_func_destroy(struct ttm_tt *tt) +{ + ttm_tt_fini(tt); + kfree(tt); +} + +static struct ttm_backend_func backend_func = { + .destroy = backend_func_destroy +}; + +/* + * TTM BO device + */ + +static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo, + uint32_t page_flags) +{ + struct ttm_tt *tt; + int ret; + + tt = kzalloc(sizeof(*tt), GFP_KERNEL); + if (!tt) + return NULL; + + tt->func = &backend_func; + + ret = ttm_tt_init(tt, bo, page_flags); + if (ret < 0) + goto err_ttm_tt_init; + + return tt; + +err_ttm_tt_init: + kfree(tt); + return NULL; +} + +...