search for: nouveau_bo_wrap

Displaying 15 results from an estimated 15 matches for "nouveau_bo_wrap".

Did you mean: nouveau_bo_vram
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...>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 with + * nouveau_bo_wrap, but when using this function + * the lifetime of the handle is probably already + * handled in another way. If there are races + * you're probably using nouveau_bo_wrap wrong. + */ + pthread_mutex_unlock(&nvdev->lock); + return; + } + DRMLISTDEL(&nvbo->head); +...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...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, head) { if (nvbo->base.handle == handle) { + pthread_mutex_unlock(&nvdev->lock); *pbo = NULL;...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...tomic_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 - * handled in another way. If there are races - * you're probably using nouveau_bo_wrap wrong. + * This bo has to be closed with the lock held because + * gem handles are not refcounted. If a shared...
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
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
.../* > - * 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 > - * handled in another way. If there are races > - * you're probably using nouveau_bo_wrap wrong. > + * Th...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...* 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 >> - * handled in another way. If there are races >> - * you're probably using nouveau_bo_wrap wrong. >> +...
2015 Dec 16
0
[libdrm v3 13/14] nouveau: clean up nouveau.h, noting deprecated members/functions
...config; }; -int nouveau_bo_new(struct nouveau_device *, uint32_t flags, uint32_t align, - uint64_t size, union nouveau_bo_config *, +int nouveau_bo_new(struct nouveau_device *, uint32_t flags, uint32_t align, + uint64_t size, union nouveau_bo_config *, + struct nouveau_bo **); +int nouveau_bo_wrap(struct nouveau_device *, uint32_t handle, struct nouveau_bo **); -int nouveau_bo_wrap(struct nouveau_device *, uint32_t handle, - struct nouveau_bo **); -int nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name, - struct nouveau_bo **); -int nouveau_bo_name_get(struct no...
2014 Jul 31
1
[libdrm PATCH 1/3] nouveau: Only export public functions.
...s != pclass) { @@ -385,7 +385,7 @@ nouveau_bo_del(struct nouveau_bo *bo) free(nvbo); } -int +drm_public int nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align, uint64_t size, union nouveau_bo_config *config, struct nouveau_bo **pbo) @@ -451,7 +451,7 @@ nouveau_bo_wrap_locked(struct nouveau_device *dev, uint32_t handle, return -ENOMEM; } -int +drm_public int nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, struct nouveau_bo **pbo) { @@ -463,7 +463,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, return ret; } -int +drm_...
2012 Jul 27
1
[PATCH] nvc0: Add and enable vblank support
...- a/src/nv_dma.c +++ b/src/nv_dma.c @@ -63,6 +63,18 @@ NVInitDma(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Opened GPU channel %d\n", fifo->channel); + if (pNv->Architecture >= NV_ARCH_C0) { + struct nvc0_fifo *data = (struct nvc0_fifo *)fifo; + ret = nouveau_bo_wrap(pNv->dev, data->notify, + &pNv->notifier_bo); + if (ret) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to obtain notifier bo: %d\n", ret); + NVTakedownDma(pScrn); + return FALSE; + } + } + ret = nouveau_pushbuf_new(pNv-&g...
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...4,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 nouveau_device_priv *nvdev = nouveau_device(nvbo->base.device); + pthread_mutex_lock(&nvdev->lock); + i...
2015 Nov 27
14
[libdrm v2 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com> This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- include/drm/nouveau_drm.h | 1 + nouveau/Makefile.am | 11 +++- nouveau/libdrm_nouveau.pc.in | 2 +- nouveau/nvif/cl0080.h | 45 ++++++++++++++
2015 Nov 26
18
[libdrm 01/13] nouveau: move more abi16-specific logic into abi16.c
From: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- nouveau/abi16.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++----- nouveau/nouveau.c | 56 +++++++------------------------------------------ nouveau/private.h | 7 ++----- 3 files changed, 67 insertions(+), 58 deletions(-) diff --git a/nouveau/abi16.c b/nouveau/abi16.c index
2015 Jun 22
12
[RFC PATCH 0/8] nv50: expose global performance counters
Hello there, This series exposes NVIDIA's global performance counters for Tesla through the Gallium's HUD and the GL_AMD_performance_monitor extension. This adds support for 24 hardware events which have been reverse engineered with PerfKit (Windows) and CUPTI (Linux). These hardware events will allow developers to profile OpenGL applications. To reduce latency and to improve accuracy,
2015 Dec 16
16
[libdrm v3 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com> This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- include/drm/nouveau_drm.h | 1 + nouveau/Makefile.am | 11 +++- nouveau/libdrm_nouveau.pc.in | 2 +- nouveau/nvif/cl0080.h | 45 ++++++++++++++
2010 Aug 06
4
nv vpe video decoder
Hello, I have my work on the nv vpe video decoder in a functional state. In case you didn't know this decoder accelerates mpeg2 video at the idct/mc level. I have verified that it works on nv40 hardware. I believe it works on nv30 hardware (and maybe some earlier hardware), but I cannot verify since I have none. I will reply with patches against the kernel, drm, ddx and mesa for