search for: drmlistadd

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

2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...mp;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; } + 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); DRMLISTFO...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...> 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; > } >...
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...nouveau_device(dev); struct nouveau_bo_priv *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)...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...t; 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, >...
2015 Feb 25
3
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...,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_...
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 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...k; + } + + *pbo = &nvbo->base; return 0; } } @@ -443,6 +448,7 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle, atomic_set(&nvbo->refcnt, 1); nvbo->base.device = dev; abi16_bo_info(&nvbo->base, &req); + nvbo->name = name; DRMLISTADD(&nvbo->head, &nvdev->bo_list); *pbo = &nvbo->base; return 0; @@ -458,7 +464,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, struct nouveau_device_priv *nvdev = nouveau_device(dev); int ret; pthread_mutex_lock(&nvdev->lock); - ret = nouveau_b...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...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, >> r...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...t;>>> @@ -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_...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...ew(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 +...
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...>map) munmap(bo->map, bo->size); - 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, +...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...au_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle, > atomic_set(&nvbo->refcnt, 1); > nvbo->base.device = dev; > abi16_bo_info(&nvbo->base, &req); > + nvbo->name = name; > DRMLISTADD(&nvbo->head, &nvdev->bo_list); > *pbo = &nvbo->base; > return 0; > @@ -458,7 +464,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, > struct nouveau_device_priv *nvdev = nouveau_device(dev); > int re...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...ruct nouveau_device *dev, uint32_t handle, >> atomic_set(&nvbo->refcnt, 1); >> nvbo->base.device = dev; >> abi16_bo_info(&nvbo->base, &req); >> + nvbo->name = name; >> DRMLISTADD(&nvbo->head, &nvdev->bo_list); >> *pbo = &nvbo->base; >> return 0; >> @@ -458,7 +464,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, >> struct nouveau_device_priv *nvdev = nouveau_device(dev); &gt...