Displaying 20 results from an estimated 621 matches for "bdev".
Did you mean:
xbdev
2014 May 14
0
[RFC PATCH v1 06/16] drm/ttm: kill fence_lock
...veau/nouveau_bo.c
index 33eb7164525a..e98af2e9a1cb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1196,9 +1196,7 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr,
}
/* Fallback to software copy. */
- spin_lock(&bo->bdev->fence_lock);
ret = ttm_bo_wait(bo, true, intr, no_wait_gpu);
- spin_unlock(&bo->bdev->fence_lock);
if (ret == 0)
ret = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
@@ -1425,26 +1423,19 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
ttm_pool_unpopulate(ttm);
}
+...
2020 Jul 15
3
[PATCH 1/4] drm: remove optional dummy function from drivers using TTM
...git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 3df685287cc1..9c0f12f74af9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -836,10 +836,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_
return 0;
}
-static void amdgpu_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
-{
-}
-
static unsigned long amdgpu_ttm_io_mem_pfn(struct ttm_buffer_object *bo,
unsigned long page_offset)
{
@@ -1754,7 +1750,6 @@ static struct ttm_bo_driver amdgp...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...e {
/*
* Protected by internal locks.
*/
- struct drm_vma_offset_manager vma_manager;
+ struct drm_vma_offset_manager *vma_manager;
+ struct drm_vma_offset_manager _vma_manager;
/*
* Protected by the global:lru lock.
@@ -585,6 +587,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
* @glob: A pointer to an initialized struct ttm_bo_global.
* @driver: A pointer to a struct ttm_bo_driver set up by the caller.
* @mapping: The address space to use for this bo.
+ * @vma_manager: A pointer to a vma manager or NULL.
* @file_page_offset: Offset into the device address space...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...e {
/*
* Protected by internal locks.
*/
- struct drm_vma_offset_manager vma_manager;
+ struct drm_vma_offset_manager *vma_manager;
+ struct drm_vma_offset_manager _vma_manager;
/*
* Protected by the global:lru lock.
@@ -585,6 +587,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
* @glob: A pointer to an initialized struct ttm_bo_global.
* @driver: A pointer to a struct ttm_bo_driver set up by the caller.
* @mapping: The address space to use for this bo.
+ * @vma_manager: A pointer to a vma manager or NULL.
* @file_page_offset: Offset into the device address space...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
...e {
/*
* Protected by internal locks.
*/
- struct drm_vma_offset_manager vma_manager;
+ struct drm_vma_offset_manager *vma_manager;
+ struct drm_vma_offset_manager _vma_manager;
/*
* Protected by the global:lru lock.
@@ -585,6 +587,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
* @glob: A pointer to an initialized struct ttm_bo_global.
* @driver: A pointer to a struct ttm_bo_driver set up by the caller.
* @mapping: The address space to use for this bo.
+ * @vma_manager: A pointer to a vma manager or NULL.
* @file_page_offset: Offset into the device address space...
2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...G_X86
> static inline int ttm_tt_set_page_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;
> @@ -23...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...rm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 772c640a6046..89d8ab6edd40 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -263,11 +263,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
struct ttm_resource_manager *new_man = ttm_manager_type(bdev, mem->mem_type);
int ret;
- ret = ttm_mem_io_lock(old_man, true);
- if (unlikely(ret != 0))
- goto out_err;
- ttm_bo_unmap_virtual_locked(bo);
- ttm_mem_io_unlock(old_man);
+ ttm_bo_unmap_virtual(bo);
/*
* Create and bind a ttm if required.
@@ -538,7 +534,6 @@ static void ttm_bo_rele...
2019 Nov 20
2
Move io_reserve_lru handling into the driver
Just a gentle ping on this.
Already got the Acked-by from Daniel, but I need some of the
nouveau guys to test this since I can only compile test it.
Regards,
Christian.
2020 Sep 01
10
remove revalidate_disk()
Hi Jens,
this series removes the revalidate_disk() function, which has been a
really odd duck in the last years. The prime reason why most people
use it is because it propagates a size change from the gendisk to
the block_device structure. But it also calls into the rather ill
defined ->revalidate_disk method which is rather useless for the
callers. So this adds a new helper to just
2012 Feb 16
2
[PATCH] blkfront: don't put bdev right after getting it
We should hang onto bdev until we're done with it.
Signed-off-by: Andrew Jones <drjones at redhat.com>
---
drivers/block/xen-blkfront.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2f22874..5d45688 100644
--- a/driver...
2012 Feb 16
2
[PATCH] blkfront: don't put bdev right after getting it
We should hang onto bdev until we're done with it.
Signed-off-by: Andrew Jones <drjones at redhat.com>
---
drivers/block/xen-blkfront.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2f22874..5d45688 100644
--- a/driver...
2019 Sep 30
3
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
...truct nouveau_bo *nvbo, u64 size, int align, u32 flags,
nouveau_bo_fixup_align(nvbo, flags, &align, &size);
nvbo->bo.mem.num_pages = size >> PAGE_SHIFT;
nouveau_bo_placement_set(nvbo, flags, 0);
+ INIT_LIST_HEAD(&nvbo->io_reserve_lru);
ret = ttm_bo_init(nvbo->bo.bdev, &nvbo->bo, size, type,
&nvbo->placement, align >> PAGE_SHIFT, false,
@@ -566,6 +568,26 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
PAGE_SIZE, DMA_FROM_DEVICE);
}
+void nouveau_bo_add_io_reserve_lru(struct ttm_buffer_object *bo)
+{
+ struct nouveau_drm *dr...
2020 Jan 24
4
TTM/Nouveau cleanups
Hi guys,
I've already send this out in September last year, but only got a response from Daniel.
Could you guys please test this and tell me what you think about it?
Basically I'm trying to remove all driver specific features from TTM which don't need to be inside the framework.
Thanks,
Christian.
2020 Aug 21
5
Moving LRU handling into Nouveau v3
Hi guys,
so I got some hardware and tested this and after hammering out tons of typos it now seems to work fine.
Could you give it more testing?
Thanks in advance,
Christian
2020 Sep 01
4
[PATCH 1/3] drm/ttm: make sure that we always zero init mem.bus v2
..._buffer_object *bo,
mem.page_alignment = bo->mem.page_alignment;
mem.bus.io_reserved_vm = false;
mem.bus.io_reserved_count = 0;
+ mem.bus.base = 0;
+ mem.bus.offset = 0;
+ mem.bus.addr = NULL;
mem.mm_node = NULL;
/*
@@ -1243,6 +1249,9 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev,
bo->mem.page_alignment = page_alignment;
bo->mem.bus.io_reserved_vm = false;
bo->mem.bus.io_reserved_count = 0;
+ bo->mem.bus.base = 0;
+ bo->mem.bus.offset = 0;
+ bo->mem.bus.addr = NULL;
bo->moving = NULL;
bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CA...
2019 Sep 27
5
[PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp,
/* qxl ttm */
int qxl_ttm_init(struct qxl_device *qdev);
void qxl_ttm_fini(struct qxl_device *qdev);
+int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
+ struct ttm_mem_reg *mem);
int qxl_mmap(struct file *filp, struct vm_area_struct *vma);
/* qxl image */
diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c
index 548dfe6f3b26..299e63a951c5 100644
--- a/drivers/gpu/drm/qxl/qxl_object.c
+++ b/drivers/gpu/drm/qx...
2018 Mar 05
0
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...tm_tt_set_page_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 + PA...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...b/drivers/gpu/drm/qxl/qxl_drv.h
>> @@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp,
>> /* qxl ttm */
>> int qxl_ttm_init(struct qxl_device *qdev);
>> void qxl_ttm_fini(struct qxl_device *qdev);
>> +int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
>> + struct ttm_mem_reg *mem);
>> int qxl_mmap(struct file *filp, struct vm_area_struct *vma);
>>
>> /* qxl image */
>> diff --git a/drivers/gpu/drm/qxl/qxl_object.c
>> b/drivers/gpu/drm/qxl/qxl_object.c
>> index 548dfe6f3b26..299e63a951c5 1006...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...b/drivers/gpu/drm/qxl/qxl_drv.h
>> @@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp,
>> /* qxl ttm */
>> int qxl_ttm_init(struct qxl_device *qdev);
>> void qxl_ttm_fini(struct qxl_device *qdev);
>> +int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
>> + struct ttm_mem_reg *mem);
>> int qxl_mmap(struct file *filp, struct vm_area_struct *vma);
>>
>> /* qxl image */
>> diff --git a/drivers/gpu/drm/qxl/qxl_object.c
>> b/drivers/gpu/drm/qxl/qxl_object.c
>> index 548dfe6f3b26..299e63a951c5 1006...
2009 Aug 19
1
[PATCH] drm/nouveau: Add a MM for mappable VRAM that isn't usable as scanout.
...|= TTM_PL_FLAG_PRIV1;
+ if (!nvbo->mappable)
+ flags |= TTM_PL_FLAG_PRIV0;
+ }
/* Some of the tile_flags have a periodic structure of 24*4096 bytes,
* align to to that as well as the page size. Overallocate memory to
@@ -271,6 +274,21 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->available_caching =
man->default_caching = 0;
break;
+ case TTM_PL_PRIV1: /* Mappable but unusable as scanout. */
+ {
+ man->flags = TTM_MEMTYPE_FLAG_FIXED |
+ TTM_MEMTYPE_FLAG_MAPPABLE |
+ TTM_MEMTYPE_FLAG_NEEDS_IOREMAP;
+ man->available_ca...