search for: ttm_place

Displaying 20 results from an estimated 64 matches for "ttm_place".

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 driv...
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 driv...
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 driv...
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 driv...
2017 Jul 03
0
[PATCH] drm: ttm: virtio-gpu: dma-buf: Constify ttm_place structures.
On Sun, 2017-07-02 at 13:11 +0530, Arvind Yadav wrote: > 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...
2023 Mar 03
1
[PATCH] Change the meaning of the fields in the ttm_place structure from pfn to bytes
On 3/3/23 08:16, Somalapuram Amaranath wrote: > Change the ttm_place structure member fpfn, lpfn, mem_type to > res_start, res_end, res_type. > Change the unsigned to u64. > Fix the dependence in all the DRM drivers and > clean up PAGE_SHIFT operation. > > Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com> > > [.....
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 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 &g...
2023 Jan 25
4
[PATCH v3 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
...ue; @@ -916,6 +918,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); struct ttm_operation_ctx ctx = { false, false }; struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(bo->ttm); + struct amdgpu_res_cursor cursor; struct ttm_placement placement; struct ttm_place placements; struct ttm_resource *tmp; @@ -927,7 +930,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) addr = amdgpu_gmc_agp_addr(bo); if (addr != AMDGPU_BO_INVALID_OFFSET) { - bo->resource->start = addr >> PAGE_SHIFT; + bo->reso...
2019 May 06
0
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...ast and mgag200 framebuffer handling. It's actually something that should be done by VRAM MM, but both drivers are non-atomic and could require an overhaul anyway. >> +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 if something in TTM does. I took...
2019 Jul 02
2
[PATCH v6 11/18] drm/virtio: switch from ttm to gem shmem helpers
...; +#include <drm/drm_gem_shmem_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.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> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" @@ -68,21 +65,16 @@ struct virtio_gpu_object_params { }; struct virtio_gpu_object { - struct drm_gem_object gem_base; + struct drm_gem_shmem_object base;...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...; +#include <drm/drm_gem_shmem_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.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> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" @@ -68,21 +65,16 @@ struct virtio_gpu_object_params { }; struct virtio_gpu_object { - struct drm_gem_object gem_base; + struct drm_gem_shmem_object base;...
2019 Jun 20
2
[PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers
...; +#include <drm/drm_gem_shmem_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.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> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" @@ -68,21 +65,16 @@ struct virtio_gpu_object_params { }; struct virtio_gpu_object { - struct drm_gem_object gem_base; + struct drm_gem_shmem_object base;...
2023 Jan 25
5
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
...ue; @@ -916,6 +918,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); struct ttm_operation_ctx ctx = { false, false }; struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(bo->ttm); + struct amdgpu_res_cursor cursor; struct ttm_placement placement; struct ttm_place placements; struct ttm_resource *tmp; @@ -927,7 +930,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) addr = amdgpu_gmc_agp_addr(bo); if (addr != AMDGPU_BO_INVALID_OFFSET) { - bo->resource->start = addr >> PAGE_SHIFT; + bo->reso...
2014 Oct 27
4
[PATCH v5 0/4] drm: nouveau: memory coherency on ARM
It has been a couple of months since v4 - apologies for this. v4 has not received many comments, but this version addresses them and makes a new attempt at pushing the critical bit for GK20A and Nouveau on ARM in general. As a reminder, this series addresses the memory coherency issue that we are seeing on ARM platforms. Contrary to x86 which invalidates the PCI caches whenever a write is made by
2018 Sep 03
0
[virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.
...rm/virtio/virtgpu_drv.h > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h > @@ -57,6 +57,7 @@ struct virtio_gpu_object { > uint32_t hw_res_handle; > > struct sg_table *pages; > + uint32_t mapped; > void *vmap; > bool dumb; > struct ttm_place placement_code; > diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c > index af24e91267..bf631d32d4 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_vq.c > +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c > @@ -424,7 +424,8 @@ void virtio_gpu_...
2019 Aug 02
0
[PATCH v7 14/18] drm/virtio: switch from ttm to gem shmem helpers
...h> #include <drm/drm_gem.h> +#include <drm/drm_gem_shmem_helper.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_module.h> -#include <drm/ttm/ttm_placement.h> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" @@ -68,21 +65,16 @@ struct virtio_gpu_object_params { }; struct virtio_gpu_object { - struct drm_gem_object gem_base; + struct drm_gem_shmem_object base; uint32_t hw_res_handle; struct sg_t...
2023 Jan 25
0
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
...mdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) > struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); > struct ttm_operation_ctx ctx = { false, false }; > struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(bo->ttm); > + struct amdgpu_res_cursor cursor; > struct ttm_placement placement; > struct ttm_place placements; > struct ttm_resource *tmp; > @@ -927,7 +930,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) > > addr = amdgpu_gmc_agp_addr(bo); > if (addr != AMDGPU_BO_INVALID_OFFSET) { > - bo->resource->start =...
2019 Jun 18
0
[PATCH v2 10/12] drm/virtio: switch from ttm to gem shmem helpers
...; +#include <drm/drm_gem_shmem_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.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> #define DRIVER_NAME "virtio_gpu" #define DRIVER_DESC "virtio GPU" @@ -68,21 +65,16 @@ struct virtio_gpu_object_params { }; struct virtio_gpu_object { - struct drm_gem_object gem_base; + struct drm_gem_shmem_object base;...