search for: nouveau_device_wrap

Displaying 20 results from an estimated 22 matches for "nouveau_device_wrap".

2014 Mar 11
2
nouveau_device_wrap
Sorry for the lame question, but is nouveau_device_wrap (...) implemented outside Mesa source code? (like libdrm, I don't know...) Because I searched the whole Mesa-10.0.3 source and found no implementation for this function. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedes...
2014 Jun 19
1
[PATCH] nouveau: dup fd before passing it to device
...u_drm_winsys.c @@ -1,4 +1,5 @@ #include <sys/stat.h> +#include <unistd.h> #include "pipe/p_context.h" #include "pipe/p_state.h" #include "util/u_format.h" @@ -75,7 +76,14 @@ nouveau_drm_screen_create(int fd) return &screen->base; } - ret = nouveau_device_wrap(fd, 0, &dev); + /* Since the screen re-use is based on the device node and not the fd, + * create a copy of the fd to be owned by the device. Otherwise a + * scenario could occur where two screens are created, and the first + * one is shut down, along with the fd being closed. The second +...
2012 May 23
1
[PATCH (nouveau)] Add xwayland support
...n) { + xf86DrvMsg(-1, X_ERROR, "Failed to initialise xwayland.\n"); + return FALSE; + } + if (xwl_drm_pre_init(xwl_screen) != Success) { + xwl_screen_destroy(xwl_screen); + xf86DrvMsg(-1, X_ERROR, "Failed to initialise xwayland drm.\n"); + return FALSE; + } + ret = nouveau_device_wrap(xwl_screen_get_drm_fd(xwl_screen), 0, &dev); + if (ret) { + xwl_screen_destroy(xwl_screen); + xf86DrvMsg(-1, X_ERROR, "[drm] Failed to create drm device.\n"); + return FALSE; + } + } else { +#endif if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) { xf86DrvMsg(-1...
2015 Nov 26
0
[libdrm 06/13] nouveau: introduce object to represent the kernel client
...+ 3 files changed, 56 insertions(+) diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check index 38b6ec5..e360b92 100755 --- a/nouveau/nouveau-symbol-check +++ b/nouveau/nouveau-symbol-check @@ -30,6 +30,8 @@ nouveau_device_del nouveau_device_open nouveau_device_open_existing nouveau_device_wrap +nouveau_drm_del +nouveau_drm_new nouveau_getparam nouveau_object_del nouveau_object_find diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index 0017303..9f82fde 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -195,6 +195,41 @@ nouveau_object_find(struct nouveau_object *obj, uint32_t...
2015 Nov 26
0
[libdrm 07/13] nouveau: stack legacy nouveau_device on top of nouveau_drm
...------------ 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index 9f82fde..e304a1b 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -244,39 +244,36 @@ nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd, int nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) { - struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev)); - struct nouveau_device *dev = &nvdev->base; + struct nouveau_drm *drm; + struct nouveau_device_priv *nvdev; + struct nouveau_device *dev; uint64_t chipset, vram, gart, bous...
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
...e; +} + +drm_private void abi16_bo_info(struct nouveau_bo *bo, struct drm_nouveau_gem_info *info) { struct nouveau_bo_priv *nvbo = nouveau_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...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...m.mit.edu> --- nouveau/nouveau.c | 29 ++++++++++++++++++++++++++++- nouveau/private.h | 3 ++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index ee7893b..72c31cf 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -85,6 +85,12 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) if (!nvdev) return -ENOMEM; + ret = pthread_mutex_init(&nvdev->lock, NULL); + if (ret) { + free(nvdev); + return ret; + } + nvdev->base.fd = fd; ver = drmGetVersion(fd); @@ -161,6 +167,7 @@ nouveau_device_del(struct nouveau_d...
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 ++++++++++++++
2012 Jul 04
0
[PATCH] Add xwayland support (v2)
...n) { + xf86DrvMsg(-1, X_ERROR, "Failed to initialise xwayland.\n"); + return FALSE; + } + if (xwl_drm_pre_init(xwl_screen) != Success) { + xwl_screen_destroy(xwl_screen); + xf86DrvMsg(-1, X_ERROR, "Failed to initialise xwayland drm.\n"); + return FALSE; + } + ret = nouveau_device_wrap(xwl_screen_get_drm_fd(xwl_screen), 0, &dev); + if (ret) { + xwl_screen_destroy(xwl_screen); + xf86DrvMsg(-1, X_ERROR, "[drm] Failed to create drm device.\n"); + return FALSE; + } + } else { + if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) { + xf86D...
2015 Dec 16
0
[libdrm v3 13/14] nouveau: clean up nouveau.h, noting deprecated members/functions
...version; /* deprecated */ uint32_t chipset; uint64_t vram_size; uint64_t gart_size; @@ -122,20 +71,23 @@ struct nouveau_device { uint64_t gart_limit; }; -int nouveau_device_new(struct nouveau_object *parent, int32_t oclass, - void *data, uint32_t size, struct nouveau_device **); -int nouveau_device_wrap(int fd, int close, struct nouveau_device **); -int nouveau_device_open(const char *busid, struct nouveau_device **); +int nouveau_device_new(struct nouveau_object *parent, int32_t oclass, + void *data, uint32_t size, struct nouveau_device **); void nouveau_device_del(struct nouveau_device...
2014 Jul 31
1
[libdrm PATCH 1/3] nouveau: Only export public functions.
...ere to prevent AIGLX from crashing if the DDX is linked against * the new libdrm, but the DRI driver against the old */ -int +drm_public int nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd, drm_context_t ctx) { return -EACCES; } -int +drm_public int nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) { struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev)); @@ -147,7 +147,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) return 0; } -int +drm_public int nouveau_device_open(const char *busid, struct nouveau_...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...ersion_major, + version->version_minor, version->version_patchlevel); + printf(" Name: %s\n", version->name); + printf(" Date: %s\n", version->date); + printf(" Description: %s\n", version->desc); + + drmFreeVersion(version); + } + + err = nouveau_device_wrap(fd, 0, &nvdev); + if (!err) + err = nouveau_device_wrap(fd2, 0, &nvdev2); + if (err < 0) + return 1; + + err = nouveau_bo_new(nvdev2, NOUVEAU_BO_GART, 0, 4096, NULL, &bo); + if (!err) + err = nouveau_bo_set_prime(bo, &import_fd); + + if (!err) { + pthread_create(&t1, NULL...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...printf(" Name: %s\n", version->name); > + printf(" Date: %s\n", version->date); > + printf(" Description: %s\n", version->desc); > + > + drmFreeVersion(version); > + } > + > + err = nouveau_device_wrap(fd, 0, &nvdev); > + if (!err) > + err = nouveau_device_wrap(fd2, 0, &nvdev2); > + if (err < 0) > + return 1; > + > + err = nouveau_bo_new(nvdev2, NOUVEAU_BO_GART, 0, 4096, NULL, &bo); > + if (!err) > +...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...uot;, version->name); >> + printf(" Date: %s\n", version->date); >> + printf(" Description: %s\n", version->desc); >> + >> + drmFreeVersion(version); >> + } >> + >> + err = nouveau_device_wrap(fd, 0, &nvdev); >> + if (!err) >> + err = nouveau_device_wrap(fd2, 0, &nvdev2); >> + if (err < 0) >> + return 1; >> + >> + err = nouveau_bo_new(nvdev2, NOUVEAU_BO_GART, 0, 4096, NULL, &bo); >> +...
2015 Nov 26
0
[libdrm 05/13] nouveau: add interfaces to query information about supported classes
...reak; + } + + return sclass - *psclass; +} + drm_private void abi16_delete(struct nouveau_object *obj) { diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check index 7330170..38b6ec5 100755 --- a/nouveau/nouveau-symbol-check +++ b/nouveau/nouveau-symbol-check @@ -33,8 +33,11 @@ nouveau_device_wrap nouveau_getparam nouveau_object_del nouveau_object_find +nouveau_object_mclass nouveau_object_mthd nouveau_object_new +nouveau_object_sclass_get +nouveau_object_sclass_put nouveau_pushbuf_bufctx nouveau_pushbuf_data nouveau_pushbuf_del diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c inde...
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
...uveau.c | 108 +++++++++++++++++++++++++++++++++++++++++++----------- nouveau/private.h | 3 +- 2 files changed, 89 insertions(+), 22 deletions(-) diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index ee7893b..75dfb0e 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -85,6 +85,12 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) if (!nvdev) return -ENOMEM; + ret = pthread_mutex_init(&nvdev->lock, NULL); + if (ret) { + free(nvdev); + return ret; + } + nvdev->base.fd = fd; ver = drmGetVersion(fd); @@ -161,6 +167,7 @@ nouveau_device_del(struct nou...
2013 Jul 22
0
[RFC PATCH] Support running nested in a Mir compositor
...nt err; int ret; @@ -712,8 +832,11 @@ static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn) busid = XNFprintf("pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func); #endif + if (!xorgMir) + ret = nouveau_device_open(busid, &pNv->dev); + else + ret = nouveau_device_wrap(xmir_get_drm_fd(busid), 0, &pNv->dev); - ret = nouveau_device_open(busid, &pNv->dev); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] Failed to open DRM device for %s: %d\n", @@ -723,6 +846,9 @@ static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn) } fr...
2015 Nov 26
9
[mesa 1/9] nouveau: bump required libdrm version to 2.4.66
From: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4016871..c02ee61 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ LIBDRM_RADEON_REQUIRED=2.4.56 LIBDRM_AMDGPU_REQUIRED=2.4.63 LIBDRM_INTEL_REQUIRED=2.4.61