search for: drmlistdel

Displaying 13 results from an estimated 13 matches for "drmlistdel".

2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...handle }; > > - pthread_mutex_lock(&nvdev->lock); > - if (nvbo->name) { > + if (nvbo->head.next) { > + pthread_mutex_lock(&nvdev->lock); > if (atomic_read(&nvbo->refcnt) == 0) { > DRMLISTDEL(&nvbo->head); > /* > @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) > } > pthread_mutex_unlock(&nvdev->lock); > } else { > - DRMLISTDEL(&nvbo->head); > -...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...k(&nvdev->lock); > >> - if (nvbo->name) { > >> + if (nvbo->head.next) { > >> + pthread_mutex_lock(&nvdev->lock); > >> if (atomic_read(&nvbo->refcnt) == 0) { > >> DRMLISTDEL(&nvbo->head); > >> /* > >> @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) > >> } > >> pthread_mutex_unlock(&nvdev->lock); > >> } else { > >> -...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...ex c6c153a..1c723b9 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -351,29 +351,18 @@ nouveau_bo_del(struct nouveau_bo *bo) pthread_mutex_lock(&nvdev->lock); if (nvbo->name) { - if (atomic_read(&nvbo->refcnt)) { + if (atomic_read(&nvbo->refcnt) == 0) { + DRMLISTDEL(&nvbo->head); /* - * bo has been revived by a race with - * nouveau_bo_prime_handle_ref, or nouveau_bo_name_ref. - * - * In theory there's still a race possible with - * nouveau_bo_wrap, but when using this function - * the lifetime of the handle is probably already...
2015 Feb 25
3
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...;> - if (nvbo->name) { > >>>> + if (nvbo->head.next) { > >>>> + pthread_mutex_lock(&nvdev->lock); > >>>> if (atomic_read(&nvbo->refcnt) == 0) { > >>>> DRMLISTDEL(&nvbo->head); > >>>> /* > >>>> @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) > >>>> } > >>>> pthread_mutex_unlock(&nvdev->lock); > >>>>...
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)
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...,43 @@ nouveau_object_find(struct nouveau_object *obj, uint32_t pclass) static void nouveau_bo_del(struct nouveau_bo *bo) { + struct nouveau_device_priv *nvdev = nouveau_device(bo->device); struct nouveau_bo_priv *nvbo = nouveau_bo(bo); struct drm_gem_close req = { bo->handle }; - DRMLISTDEL(&nvbo->head); + + pthread_mutex_lock(&nvdev->lock); + if (nvbo->name) { + if (atomic_read(&bo->refcnt)) { + /* + * bo has been revived by a race with + * nouveau_bo_prime_handle_ref, or nouveau_bo_name_ref. + * + * In theory there's still a race possible w...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...- pthread_mutex_lock(&nvdev->lock); >> - if (nvbo->name) { >> + if (nvbo->head.next) { >> + pthread_mutex_lock(&nvdev->lock); >> if (atomic_read(&nvbo->refcnt) == 0) { >> DRMLISTDEL(&nvbo->head); >> /* >> @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) >> } >> pthread_mutex_unlock(&nvdev->lock); >> } else { >> - DRMLISTDEL(&nvbo->head...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...t;lock); >>>> - if (nvbo->name) { >>>> + if (nvbo->head.next) { >>>> + pthread_mutex_lock(&nvdev->lock); >>>> if (atomic_read(&nvbo->refcnt) == 0) { >>>> DRMLISTDEL(&nvbo->head); >>>> /* >>>> @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) >>>> } >>>> pthread_mutex_unlock(&nvdev->lock); >>>> } else { >>>&g...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...+351,18 @@ nouveau_bo_del(struct nouveau_bo *bo) > > pthread_mutex_lock(&nvdev->lock); > if (nvbo->name) { > - if (atomic_read(&nvbo->refcnt)) { > + if (atomic_read(&nvbo->refcnt) == 0) { > + DRMLISTDEL(&nvbo->head); > /* > - * bo has been revived by a race with > - * nouveau_bo_prime_handle_ref, or nouveau_bo_name_ref. > - * > - * In theory there's still a...
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...u_bo *bo) struct nouveau_bo_priv *nvbo = nouveau_bo(bo); struct drm_gem_close req = { bo->handle }; - pthread_mutex_lock(&nvdev->lock); - if (nvbo->name) { + if (nvbo->head.next) { + pthread_mutex_lock(&nvdev->lock); if (atomic_read(&nvbo->refcnt) == 0) { DRMLISTDEL(&nvbo->head); /* @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) } pthread_mutex_unlock(&nvdev->lock); } else { - DRMLISTDEL(&nvbo->head); - pthread_mutex_unlock(&nvdev->lock); drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req); }...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...if (nvbo->name) { >>>>>> + if (nvbo->head.next) { >>>>>> + pthread_mutex_lock(&nvdev->lock); >>>>>> if (atomic_read(&nvbo->refcnt) == 0) { >>>>>> DRMLISTDEL(&nvbo->head); >>>>>> /* >>>>>> @@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo) >>>>>> } >>>>>> pthread_mutex_unlock(&nvdev->lock); >>>>...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...l(struct nouveau_bo *bo) >> >> pthread_mutex_lock(&nvdev->lock); >> if (nvbo->name) { >> - if (atomic_read(&nvbo->refcnt)) { >> + if (atomic_read(&nvbo->refcnt) == 0) { >> + DRMLISTDEL(&nvbo->head); >> /* >> - * bo has been revived by a race with >> - * nouveau_bo_prime_handle_ref, or nouveau_bo_name_ref. >> - * >> - * In theory...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...eau_object *obj, uint32_t pclass) static void nouveau_bo_del(struct nouveau_bo *bo) { + struct nouveau_device_priv *nvdev = nouveau_device(bo->device); struct nouveau_bo_priv *nvbo = nouveau_bo(bo); struct drm_gem_close req = { bo->handle }; + pthread_mutex_lock(&nvdev->lock); DRMLISTDEL(&nvbo->head); + pthread_mutex_unlock(&nvdev->lock); if (bo->map) munmap(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; }...