search for: ttm_placement

Displaying 20 results from an estimated 108 matches for "ttm_placement".

2017 May 18
0
[PATCH v3 02/16] drm/virtio: fix include notation and remove -Iinclude/drm flag
...ivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -36,10 +36,10 @@ #include <drm/drm_atomic.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_encoder.h> -#include <ttm/ttm_bo_api.h> -#include <ttm/ttm_bo_driver.h> -#include <ttm/ttm_placement.h> -#include <ttm/ttm_module.h> +#include <drm/ttm/ttm_bo_api.h> +#include <drm/ttm/ttm_bo_driver.h> +#include <drm/ttm/ttm_placement.h> +#include <drm/ttm/ttm_module.h> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" diff -...
2017 Jul 02
1
[PATCH] drm: ttm: virtio-gpu: dma-buf: Constify ttm_place structures.
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by <drm/ttm/ttm_placement.h> work with const ttm_place. So mark the non-const structs as const. File size before: text data bss dec hex filename 2315 184 0 2499 9c3 drivers/gpu/drm/virtio/virtgpu_ttm.o File size After adding 'const': text data bss dec hex...
2017 Jul 02
1
[PATCH] drm: ttm: virtio-gpu: dma-buf: Constify ttm_place structures.
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by <drm/ttm/ttm_placement.h> work with const ttm_place. So mark the non-const structs as const. File size before: text data bss dec hex filename 2315 184 0 2499 9c3 drivers/gpu/drm/virtio/virtgpu_ttm.o File size After adding 'const': text data bss dec hex...
2013 Aug 28
1
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
...L_MASK_CACHING; > + > nouveau_bo_placement_set(nvbo, flags, 0); > > acc_size = ttm_bo_dma_acc_size(&drm->ttm.bdev, size, > @@ -292,7 +298,7 @@ void > nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy) > { > struct ttm_placement *pl = &nvbo->placement; > - uint32_t flags = TTM_PL_MASK_CACHING | > + uint32_t flags = nvbo->valid_caching | > (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); > > pl->placement = nvbo->placements; > @@ -1554,6 +1560,9 @@ nouve...
2017 May 18
1
[PATCH v3 00/16] gpu/drm: remove -Iinclude/drm compiler flags from Makefile
Many Makefiles needed to add -Iinclude/drm as an include path, but the right thing to do is to include headers in the form #include <drm/.../*.h> This series fixes the source files, then rip off -Iinclude/drm flags. V3: rebased on commit bb2af9bda33 (drm-misc-next) Masahiro Yamada (16): drm/vc4: fix include notation and remove -Iinclude/drm flag drm/virtio: fix include notation and
2017 May 18
1
[PATCH v3 00/16] gpu/drm: remove -Iinclude/drm compiler flags from Makefile
Many Makefiles needed to add -Iinclude/drm as an include path, but the right thing to do is to include headers in the form #include <drm/.../*.h> This series fixes the source files, then rip off -Iinclude/drm flags. V3: rebased on commit bb2af9bda33 (drm-misc-next) Masahiro Yamada (16): drm/vc4: fix include notation and remove -Iinclude/drm flag drm/virtio: fix include notation and
2019 May 06
2
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...like this: drm_gem_vram_push_to_system() { if (gbo->pin_count == 1 && gbo->kmap.virtual) ttm_bo_kunmap(&gbo->kmap); return drm_gem_vram_unpin(); } > +struct drm_gem_vram_object { > + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > + struct ttm_placement placement; > + struct ttm_place placements[3]; placements[2] should be enough I guess? cheers, Gerd
2019 May 06
2
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...like this: drm_gem_vram_push_to_system() { if (gbo->pin_count == 1 && gbo->kmap.virtual) ttm_bo_kunmap(&gbo->kmap); return drm_gem_vram_unpin(); } > +struct drm_gem_vram_object { > + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > + struct ttm_placement placement; > + struct ttm_place placements[3]; placements[2] should be enough I guess? cheers, Gerd
2019 Jun 30
2
[PATCH v1 27/33] drm/virtgpu: drop use of drmP.h
...rm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_gem.h> +#include <drm/drm_ioctl.h> #include <drm/drm_probe_helper.h> #include <drm/ttm/ttm_bo_api.h> #include <drm/ttm/ttm_bo_driver.h> -#include <drm/ttm/ttm_placement.h> #include <drm/ttm/ttm_module.h> +#include <drm/ttm/ttm_placement.h> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 70d6c4329778..a0514f5bd...
2019 Jun 30
2
[PATCH v1 27/33] drm/virtgpu: drop use of drmP.h
...rm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_gem.h> +#include <drm/drm_ioctl.h> #include <drm/drm_probe_helper.h> #include <drm/ttm/ttm_bo_api.h> #include <drm/ttm/ttm_bo_driver.h> -#include <drm/ttm/ttm_placement.h> #include <drm/ttm/ttm_module.h> +#include <drm/ttm/ttm_placement.h> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 70d6c4329778..a0514f5bd...
2010 Mar 18
0
[PATCH] drm/nouveau: Make use of TTM busy_placements.
...t;placement.placement = nvbo->placements; - nvbo->placement.busy_placement = nvbo->placements; - nvbo->placement.num_placement = n; - nvbo->placement.num_busy_placement = n; - - if (nvbo->pin_refcnt) { - while (n--) - nvbo->placements[n] |= TTM_PL_FLAG_NO_EVICT; - } + struct ttm_placement *pl = &nvbo->placement; + uint32_t flags = TTM_PL_MASK_CACHING | + (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); + + pl->placement = nvbo->placements; + set_placement_list(nvbo->placements, &pl->num_placement, + type, flags); + + pl->busy_placement = nvbo->bus...
2017 Jul 02
0
[PATCH] drm: qxl: constify ttm_place structures.
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by <drm/ttm/ttm_placement.h> work with const ttm_place. So mark the non-const structs as const. File size before: text data bss dec hex filename 3485 184 264 3933 f5d drivers/gpu/drm/qxl/qxl_ttm.o File size After adding 'const': text data bss dec hex filenam...
2019 Apr 24
0
[PATCH v2 02/17] drm: Add |struct drm_gem_vram_object| callbacks for |struct ttm_bo_driver|
...+/** + * drm_gem_vram_bo_driver_evict_flags() - \ + Implements &struct ttm_bo_driver.evict_flags + * @bo: TTM buffer object. Refers to &struct drm_gem_vram_object.bo + * @pl: TTM placement information. + */ +void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo, + struct ttm_placement *pl) +{ + struct drm_gem_vram_object *gbo; + + /* TTM may pass BOs that are not GEM VRAM BOs. */ + if (!drm_is_gem_vram(bo)) + return; + + gbo = drm_gem_vram_of_bo(bo); + drm_gem_vram_placement(gbo, TTM_PL_FLAG_SYSTEM); + *pl = gbo->placement; +} +EXPORT_SYMBOL(drm_gem_vram_bo_driver_evict_flag...
2019 Apr 29
0
[PATCH v3 02/19] drm: Add |struct drm_gem_vram_object| callbacks for |struct ttm_bo_driver|
...+/** + * drm_gem_vram_bo_driver_evict_flags() - \ + Implements &struct ttm_bo_driver.evict_flags + * @bo: TTM buffer object. Refers to &struct drm_gem_vram_object.bo + * @pl: TTM placement information. + */ +void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo, + struct ttm_placement *pl) +{ + struct drm_gem_vram_object *gbo; + + /* TTM may pass BOs that are not GEM VRAM BOs. */ + if (!drm_is_gem_vram(bo)) + return; + + gbo = drm_gem_vram_of_bo(bo); + drm_gem_vram_placement(gbo, TTM_PL_FLAG_SYSTEM); + *pl = gbo->placement; +} +EXPORT_SYMBOL(drm_gem_vram_bo_driver_evict_flag...
2019 May 06
0
[PATCH v4 02/19] drm: Add |struct drm_gem_vram_object| callbacks for |struct ttm_bo_driver|
...+/** + * drm_gem_vram_bo_driver_evict_flags() - \ + Implements &struct ttm_bo_driver.evict_flags + * @bo: TTM buffer object. Refers to &struct drm_gem_vram_object.bo + * @pl: TTM placement information. + */ +void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo, + struct ttm_placement *pl) +{ + struct drm_gem_vram_object *gbo; + + /* TTM may pass BOs that are not GEM VRAM BOs. */ + if (!drm_is_gem_vram(bo)) + return; + + gbo = drm_gem_vram_of_bo(bo); + drm_gem_vram_placement(gbo, TTM_PL_FLAG_SYSTEM); + *pl = gbo->placement; +} +EXPORT_SYMBOL(drm_gem_vram_bo_driver_evict_flag...
2017 Jul 02
0
[PATCH] drm: qxl: constify ttm_place structures.
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by <drm/ttm/ttm_placement.h> work with const ttm_place. So mark the non-const structs as const. File size before: text data bss dec hex filename 3485 184 264 3933 f5d drivers/gpu/drm/qxl/qxl_ttm.o File size After adding 'const': text data bss dec hex filenam...
2013 Aug 28
0
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
...TTM_PL_FLAG_WC; + else + nvbo->valid_caching = TTM_PL_MASK_CACHING; + nouveau_bo_placement_set(nvbo, flags, 0); acc_size = ttm_bo_dma_acc_size(&drm->ttm.bdev, size, @@ -292,7 +298,7 @@ void nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy) { struct ttm_placement *pl = &nvbo->placement; - uint32_t flags = TTM_PL_MASK_CACHING | + uint32_t flags = nvbo->valid_caching | (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); pl->placement = nvbo->placements; @@ -1554,6 +1560,9 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *v...
2019 May 06
1
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...t; We > could build a common implementation out of both interfaces, but that > would obfuscate the code IMHO. I'd just leave it as it is. Ok. > >> +struct drm_gem_vram_object { > >> + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > >> + struct ttm_placement placement; > >> + struct ttm_place placements[3]; > > > > placements[2] should be enough I guess? > > TTM_PL_VRAM has index 2 and TTM_PL_SYSTEM has index 0. There's TTM_PL_TT > at index 1. We don't use all three array entries here, but I'm not sure > i...
2019 Apr 24
1
[PATCH v2 02/17] drm: Add |struct drm_gem_vram_object| callbacks for |struct ttm_bo_driver|
...er_evict_flags() - \ > + Implements &struct ttm_bo_driver.evict_flags > + * @bo: TTM buffer object. Refers to &struct drm_gem_vram_object.bo > + * @pl: TTM placement information. > + */ > +void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo, > + struct ttm_placement *pl) > +{ > + struct drm_gem_vram_object *gbo; > + > + /* TTM may pass BOs that are not GEM VRAM BOs. */ > + if (!drm_is_gem_vram(bo)) > + return; > + > + gbo = drm_gem_vram_of_bo(bo); > + drm_gem_vram_placement(gbo, TTM_PL_FLAG_SYSTEM); > + *pl = gbo->placement; &...
2020 Oct 15
5
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...ers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c > index bdee4df1f3f2..80c42c774c7d 100644 > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c > @@ -32,6 +32,7 @@ > #include <drm/ttm/ttm_bo_driver.h> > #include <drm/ttm/ttm_placement.h> > #include <drm/drm_vma_manager.h> > +#include <linux/dma-buf-map.h> > #include <linux/io.h> > #include <linux/highmem.h> > #include <linux/wait.h> > @@ -526,6 +527,77 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map) > } > EX...