Displaying 20 results from an estimated 25 matches for "bo_list".
Did you mean:
io_list
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...p(bo->map, bo->size);
drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
@@ -363,7 +380,9 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
return ret;
}
+ pthread_mutex_lock(&nvdev->lock);
DRMLISTADD(&nvbo->head, &nvdev->bo_list);
+ pthread_mutex_unlock(&nvdev->lock);
*pbo = bo;
return 0;
@@ -378,13 +397,16 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
struct nouveau_bo_priv *nvbo;
int ret;
+ pthread_mutex_lock(&nvdev->lock);
DRMLISTFOREACHENTRY(nvbo, &nvdev->bo_list, he...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...+ struct nouveau_bo **pbo, int name)
{
struct nouveau_device_priv *nvdev = nouveau_device(dev);
struct drm_nouveau_gem_info req = { .handle = handle };
@@ -427,8 +416,24 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
DRMLISTFOREACHENTRY(nvbo, &nvdev->bo_list, head) {
if (nvbo->base.handle == handle) {
- *pbo = NULL;
- nouveau_bo_ref(&nvbo->base, pbo);
+ if (atomic_inc_return(&nvbo->refcnt) == 1) {
+ /*
+ * Uh oh, this bo is dead and someone else
+ * will free it, but because refcnt is
+ * now non-zero fortunatel...
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...- drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
free(nvbo);
}
@@ -363,15 +408,17 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
return ret;
}
+ pthread_mutex_lock(&nvdev->lock);
DRMLISTADD(&nvbo->head, &nvdev->bo_list);
+ pthread_mutex_unlock(&nvdev->lock);
*pbo = bo;
return 0;
}
int
-nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
- struct nouveau_bo **pbo)
+nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
+ struct nouveau_bo **pbo)
{
struct n...
2015 Feb 26
4
[PATCH v2 1/4] Add atomic_inc_return to atomics.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
xf86atomic.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xf86atomic.h b/xf86atomic.h
index 8c4b696..17fb088 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -49,6 +49,7 @@ typedef struct {
# define atomic_read(x) ((x)->atomic)
# define atomic_set(x, val) ((x)->atomic = (val))
# define atomic_inc(x)
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...->base;
> int ret;
> @@ -397,10 +394,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
> return ret;
> }
>
> - pthread_mutex_lock(&nvdev->lock);
> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
> - pthread_mutex_unlock(&nvdev->lock);
> -
> *pbo = bo;
> return 0;
> }
> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
> return -ENOMEM;
> }
>
> +static void
> +nouveau_bo_make_glo...
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...*nvbo = calloc(1, sizeof(*nvbo));
struct nouveau_bo *bo = &nvbo->base;
int ret;
@@ -397,10 +394,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
return ret;
}
- pthread_mutex_lock(&nvdev->lock);
- DRMLISTADD(&nvbo->head, &nvdev->bo_list);
- pthread_mutex_unlock(&nvdev->lock);
-
*pbo = bo;
return 0;
}
@@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
return -ENOMEM;
}
+static void
+nouveau_bo_make_global(struct nouveau_bo_priv *nvbo)
+{
+ if (!nvbo->head.next) {
+ struct n...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...394,6 @@ nouveau_bo_new(struct nouveau_device *dev,
> uint32_t flags, uint32_t align,
> >> return ret;
> >> }
> >>
> >> - pthread_mutex_lock(&nvdev->lock);
> >> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
> >> - pthread_mutex_unlock(&nvdev->lock);
> >> -
> >> *pbo = bo;
> >> return 0;
> >> }
> >> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev,
> uint32_t handle,
> >> retu...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...> {
> struct nouveau_device_priv *nvdev = nouveau_device(dev);
> struct drm_nouveau_gem_info req = { .handle = handle };
> @@ -427,8 +416,24 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
>
> DRMLISTFOREACHENTRY(nvbo, &nvdev->bo_list, head) {
> if (nvbo->base.handle == handle) {
> - *pbo = NULL;
> - nouveau_bo_ref(&nvbo->base, pbo);
> + if (atomic_inc_return(&nvbo->refcnt) == 1) {
> + /...
2019 Oct 29
0
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
...gpu_cs.c
> index 2e53feed40e230..76771f5f0b60ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -607,8 +607,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
> e->tv.num_shared = 2;
>
> amdgpu_bo_list_get_list(p->bo_list, &p->validated);
> - if (p->bo_list->first_userptr != p->bo_list->num_entries)
> - p->mn = amdgpu_mn_get(p->adev, AMDGPU_MN_TYPE_GFX);
>
> INIT_LIST_HEAD(&duplicates);
> amdgpu_vm_get_pd_bo(&fpriv->vm, &p->va...
2015 Feb 25
3
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...v,
> >> uint32_t flags, uint32_t align,
> >>>> return ret;
> >>>> }
> >>>>
> >>>> - pthread_mutex_lock(&nvdev->lock);
> >>>> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
> >>>> - pthread_mutex_unlock(&nvdev->lock);
> >>>> -
> >>>> *pbo = bo;
> >>>> return 0;
> >>>> }
> >>>> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device
> *...
2019 Oct 28
1
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
..._cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 2e53feed40e230..76771f5f0b60ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -607,8 +607,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
e->tv.num_shared = 2;
amdgpu_bo_list_get_list(p->bo_list, &p->validated);
- if (p->bo_list->first_userptr != p->bo_list->num_entries)
- p->mn = amdgpu_mn_get(p->adev, AMDGPU_MN_TYPE_GFX);
INIT_LIST_HEAD(&duplicates);
amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);...
2019 Nov 12
0
[PATCH v3 12/14] drm/amdgpu: Use mmu_interval_notifier instead of hmm_mirror
..._cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 82823d9a8ba887..22c989bca7514c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -603,8 +603,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
e->tv.num_shared = 2;
amdgpu_bo_list_get_list(p->bo_list, &p->validated);
- if (p->bo_list->first_userptr != p->bo_list->num_entries)
- p->mn = amdgpu_mn_get(p->adev, AMDGPU_MN_TYPE_GFX);
INIT_LIST_HEAD(&duplicates);
amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...struct nouveau_device_priv *nvdev = nouveau_device(dev);
>> struct drm_nouveau_gem_info req = { .handle = handle };
>> @@ -427,8 +416,24 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
>>
>> DRMLISTFOREACHENTRY(nvbo, &nvdev->bo_list, head) {
>> if (nvbo->base.handle == handle) {
>> - *pbo = NULL;
>> - nouveau_bo_ref(&nvbo->base, pbo);
>> + if (atomic_inc_return(&nvbo->refcnt) == 1) {
>> +...
2015 Aug 14
0
[ANNOUNCE] libdrm 2.4.63
...: add ctx_id for wait_cs
amdgpu: reuse the kernel IB flags v2
amdgpu: validate the upper limit of virtual address v2
amdgpu: fix the number of IB size enums
amdgpu: remove unused AMDGPU_IB_RESOURCE_PRIORITY
amdgpu: replace alloca with calloc v2
amdgpu: add amdgpu_bo_list_update interface v2
amdgpu: add IB sharing support v2
tests/amdgpu: add shared IB submission test v2
amdgpu: get rid of IB pool management v3
tests/amdgpu: manage IB in client side
amdgpu: add amdgpu_query_gds_info
amdgpu: cleanup gds specific alloc/free function...
2015 Nov 26
0
[libdrm 07/13] nouveau: stack legacy nouveau_device on top of nouveau_drm
...;base.lib_version = drm->lib_version;
ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_CHIPSET_ID, &chipset);
if (ret == 0)
@@ -305,9 +302,6 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
else
nvdev->gart_limit_percent = 80;
DRMINITLISTHEAD(&nvdev->bo_list);
- nvdev->base.object.oclass = NOUVEAU_DEVICE_CLASS;
- nvdev->base.object.length = ~0;
- nvdev->base.lib_version = 0x01000000;
nvdev->base.chipset = chipset;
nvdev->base.vram_size = vram;
nvdev->base.gart_size = gart;
@@ -337,10 +331,12 @@ nouveau_device_del(struct nouveau_...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...int ret;
>> @@ -397,10 +394,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
>> return ret;
>> }
>>
>> - pthread_mutex_lock(&nvdev->lock);
>> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
>> - pthread_mutex_unlock(&nvdev->lock);
>> -
>> *pbo = bo;
>> return 0;
>> }
>> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle,
>> return -ENOMEM;
>> }
>>
>>...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
..._new(struct nouveau_device *dev,
>> uint32_t flags, uint32_t align,
>>>> return ret;
>>>> }
>>>>
>>>> - pthread_mutex_lock(&nvdev->lock);
>>>> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
>>>> - pthread_mutex_unlock(&nvdev->lock);
>>>> -
>>>> *pbo = bo;
>>>> return 0;
>>>> }
>>>> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev,
>> uint32_t handle,
>...
2019 Oct 29
4
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
On Tue, Oct 29, 2019 at 07:22:37PM +0000, Yang, Philip wrote:
> Hi Jason,
>
> I did quick test after merging amd-staging-drm-next with the
> mmu_notifier branch, which includes this set changes. The test result
> has different failures, app stuck intermittently, GUI no display etc. I
> am understanding the changes and will try to figure out the cause.
Thanks! I'm not
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...; uint32_t flags, uint32_t align,
>>>>>> return ret;
>>>>>> }
>>>>>>
>>>>>> - pthread_mutex_lock(&nvdev->lock);
>>>>>> - DRMLISTADD(&nvbo->head, &nvdev->bo_list);
>>>>>> - pthread_mutex_unlock(&nvdev->lock);
>>>>>> -
>>>>>> *pbo = bo;
>>>>>> return 0;
>>>>>> }
>>>>>> @@ -457,6 +450,18 @@ nouveau_bo_wrap_locked(struct nou...
2015 Nov 26
18
[libdrm 01/13] nouveau: move more abi16-specific logic into abi16.c
...au_bo(bo);
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 97fd77b..8a0be2f 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -135,6 +135,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
nvdev->gart_limit_percent = 80;
DRMINITLISTHEAD(&nvdev->bo_list);
nvdev->base.object.oclass = NOUVEAU_DEVICE_CLASS;
+ nvdev->base.object.length = ~0;
nvdev->base.lib_version = 0x01000000;
nvdev->base.chipset = chipset;
nvdev->base.vram_size = vram;
@@ -251,8 +252,8 @@ nouveau_object_new(struct nouveau_object *parent, uint64_t handle,...