Displaying 20 results from an estimated 32 matches for "nouveau_device_del".
2017 Jun 07
5
[Bug 101335] New: build failure: nouveau_screen.c:105:8: error: implicit declaration of function ‘nouveau_drm_new’;
...ouveau_drm_new’; did you mean ‘nouveau_bo_new’?
[-Werror=implicit-function-declaration]
ret = nouveau_drm_new(dri_screen->fd, &screen->drm);
^~~~~~~~~~~~~~~
nouveau_bo_new
nouveau_screen.c:111:8: error: implicit declaration of function
‘nouveau_device_new’; did you mean ‘nouveau_device_del’?
[-Werror=implicit-function-declaration]
ret = nouveau_device_new(&screen->drm->client, NV_DEVICE,
^~~~~~~~~~~~~~~~~~
nouveau_device_del
nouveau_screen.c:111:39: error: dereferencing pointer to incomplete type
‘struct nouveau_drm’
ret = nouveau_device_new(&screen-...
2015 Nov 26
0
[libdrm 07/13] nouveau: stack legacy nouveau_device on top of nouveau_drm
...er->version_minor << 8) |
- ver->version_patchlevel;
- drmFreeVersion(ver);
-
- if ( dev->drm_version != 0x00000010 &&
- (dev->drm_version < 0x01000000 ||
- dev->drm_version >= 0x02000000)) {
+ ret = nouveau_drm_new(fd, &drm);
+ if (ret) {
nouveau_device_del(&dev);
- return -EINVAL;
+ return ret;
}
+ drm->nvif = false;
+
+ nvdev->base.object.parent = &drm->client;
+ nvdev->base.object.oclass = NOUVEAU_DEVICE_CLASS;
+ nvdev->base.object.length = ~0;
+ nvdev->base.fd = drm->fd;
+ nvdev->base.drm_version = drm->drm_v...
2015 Dec 07
2
[mesa v2 5/9] nouveau: fix screen creation failure paths
...base.context_create)
> goto err;
>
> /* Use dupfd in hash table, to avoid errors if the original fd gets
> @@ -130,10 +130,14 @@ nouveau_drm_screen_create(int fd)
> return &screen->base;
>
> err:
> - if (dev)
> - nouveau_device_del(&dev);
> - else if (dupfd >= 0)
> - close(dupfd);
> + if (screen) {
> + screen->base.destroy(&screen->base);
> + } else {
> + if (dev)
> + nouveau_device_del(&dev);
> +...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...-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_device **pdev)
if (nvdev->close)
drmClose(nvdev->base.fd);
free(nvdev->client);
+ pthread_mutex_destroy(&nvdev->lock);
free(nvdev);
*pdev = NULL;
}
@@ -191,6 +198,8 @@ nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)...
2015 Dec 07
1
[mesa v2 5/9] nouveau: fix screen creation failure paths
...>>> /* Use dupfd in hash table, to avoid errors if the original fd gets
>>> @@ -130,10 +130,14 @@ nouveau_drm_screen_create(int fd)
>>> return &screen->base;
>>>
>>> err:
>>> - if (dev)
>>> - nouveau_device_del(&dev);
>>> - else if (dupfd >= 0)
>>> - close(dupfd);
>>> + if (screen) {
>>> + screen->base.destroy(&screen->base);
>>> + } else {
>>> + if (dev)
>>> +...
2014 Jun 19
1
[PATCH] nouveau: dup fd before passing it to device
...tical) screen would now have a reference to the closed fd. We
+ * avoid this by duplicating the original fd.
+ */
+ ret = nouveau_device_wrap(dup(fd), 1, &dev);
if (ret)
goto err;
@@ -115,6 +123,8 @@ nouveau_drm_screen_create(int fd)
return &screen->base;
err:
+ if (dev)
+ nouveau_device_del(&dev);
pipe_mutex_unlock(nouveau_screen_mutex);
return NULL;
}
--
1.8.5.5
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
2015 Nov 27
13
[mesa v2 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
2015 Dec 16
11
[mesa v3 1/9] nouveau: bump required libdrm version to 2.4.66
From: Ben Skeggs <bskeggs at redhat.com>
v2. forgot bump for non-gallium driver
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b6680d0..965c6f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,8 +72,8 @@ LIBDRM_REQUIRED=2.4.60
2015 Nov 27
0
[mesa v2 5/9] nouveau: fix screen creation failure paths
...eate(int fd)
}
screen = init(dev);
- if (!screen)
+ if (!screen || !screen->base.context_create)
goto err;
/* Use dupfd in hash table, to avoid errors if the original fd gets
@@ -130,10 +130,14 @@ nouveau_drm_screen_create(int fd)
return &screen->base;
err:
- if (dev)
- nouveau_device_del(&dev);
- else if (dupfd >= 0)
- close(dupfd);
+ if (screen) {
+ screen->base.destroy(&screen->base);
+ } else {
+ if (dev)
+ nouveau_device_del(&dev);
+ else if (dupfd >= 0)
+ close(dupfd);
+ }
pipe_mutex_unlock(nouveau_screen_mutex);
return NULL;
}
--
2.6.3
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 Dec 07
0
[mesa v2 5/9] nouveau: fix screen creation failure paths
...goto err;
>>
>> /* Use dupfd in hash table, to avoid errors if the original fd gets
>> @@ -130,10 +130,14 @@ nouveau_drm_screen_create(int fd)
>> return &screen->base;
>>
>> err:
>> - if (dev)
>> - nouveau_device_del(&dev);
>> - else if (dupfd >= 0)
>> - close(dupfd);
>> + if (screen) {
>> + screen->base.destroy(&screen->base);
>> + } else {
>> + if (dev)
>> + nouveau_devi...
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
2014 Jul 31
1
[libdrm PATCH 1/3] nouveau: Only export public functions.
...rn 0;
}
-int
+drm_public int
nouveau_device_open(const char *busid, struct nouveau_device **pdev)
{
int ret = -ENODEV, fd = drmOpen("nouveau", busid);
@@ -159,7 +159,7 @@ nouveau_device_open(const char *busid, struct nouveau_device **pdev)
return ret;
}
-void
+drm_public void
nouveau_device_del(struct nouveau_device **pdev)
{
struct nouveau_device_priv *nvdev = nouveau_device(*pdev);
@@ -173,7 +173,7 @@ nouveau_device_del(struct nouveau_device **pdev)
}
}
-int
+drm_public int
nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value)
{
struct drm_nouveau_get...
2012 Nov 01
5
[PATCH 0/4] nouveau: xserver 1.13 compat fixes
Here are a few patches adding some missing functions in
NvPlatformProbe, which iirc is being used as of xserver 1.13
First patch adds a nouveau_kernel_mode_enabled helper, similar
to xf86-video-radeon
Second and third use the function in Nv{Pci,Platform}Probe
And last one ensures we can still use ZaphodHead and relative
head positioning via xorg.conf
The coding style may be a bit off, despite my
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...+ if (!err)
+ err = nouveau_bo_set_prime(bo, &import_fd);
+
+ if (!err) {
+ pthread_create(&t1, NULL, openclose, nvdev);
+ pthread_create(&t2, NULL, openclose, nvdev);
+ }
+
+ pthread_join(t1, NULL);
+ pthread_join(t2, NULL);
+
+ close(import_fd);
+ nouveau_bo_ref(NULL, &bo);
+
+ nouveau_device_del(&nvdev2);
+ nouveau_device_del(&nvdev);
+ close(fd2);
+ close(fd);
+
+ if (failed)
+ fprintf(stderr, "DRM_IOCTL_GEM_CLOSE failed with EINVAL,\n"
+ "race in opening/closing bo is likely.\n");
+
+ return failed;
+}
diff --git a/xf86atomic.h b/xf86atomic.h
index 8c4b696...
2013 Feb 16
8
Bugfix + dri1 cleanup patches
Had those patches living in my local tree for a while now.
Here is a respin on top of latest master
Patch 1: regression fix, preventing the ddx from loading if kernel
module is not loaded
Patches 2-5: Completely nuke dri1, make dri2 hard dependency
Patches 6-7: Assist people with first-time build of nouveau
Git complains about whitespace errors in patch 7, which for the sake
of me I cannot
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 ++++++++++++++
2015 Nov 26
0
[libdrm 06/13] nouveau: introduce object to represent the kernel client
...+++++++++++++++++
nouveau/nouveau.h | 19 +++++++++++++++++++
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
@@ -1...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...mp;t1, NULL, openclose, nvdev);
> + pthread_create(&t2, NULL, openclose, nvdev);
> + }
> +
> + pthread_join(t1, NULL);
> + pthread_join(t2, NULL);
> +
> + close(import_fd);
> + nouveau_bo_ref(NULL, &bo);
> +
> + nouveau_device_del(&nvdev2);
> + nouveau_device_del(&nvdev);
> + close(fd2);
> + close(fd);
> +
> + if (failed)
> + fprintf(stderr, "DRM_IOCTL_GEM_CLOSE failed with EINVAL,\n"
> + "race in opening/closing b...