Displaying 20 results from an estimated 24 matches for "nouveau_client_new".
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...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)
int id = 0, i, ret = -ENOMEM;
uint32_t *clients;
+ pthread_mutex_lock(&nvdev->lock);
+
for (i = 0; i < nvdev->nr_client; i++) {
id = ffs(nvdev->client[i]) - 1;
if (id >= 0)
@@ -199,7 +208,7 @@ nouveau_clie...
2014 Mar 26
2
nouveau.c
Hi, I am inspecting the file nouveau.c...
In the function nouveau_client_new there is the
following:
for (i = 0; i < nvdev->nr_client; i++) {
but "nr_client" has no previous assignment
so it has scrambled data. Is this expected behaviour
or am I missing something (the most probable :)?
And someone please tell me where do I find that ffs function.
Thanks...
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...= 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)
int id = 0, i, ret = -ENOMEM;
uint32_t *clients;
+ pthread_mutex_lock(&nvdev->lock);
+
for (i = 0; i < nvdev->nr_client; i++) {
id = ffs(nvdev->client[i]) - 1;
if (id >= 0)
@@ -199,7 +208,7 @@ nouvea...
2015 Dec 16
0
[libdrm v3 13/14] nouveau: clean up nouveau.h, noting deprecated members/functions
...ruct nouveau_device *, uint64_t param, uint64_t value);
+
+/* deprecated */
+int nouveau_device_wrap(int fd, int close, struct nouveau_device **);
+int nouveau_device_open(const char *busid, struct nouveau_device **);
struct nouveau_client {
struct nouveau_device *device;
int id;
};
-int nouveau_client_new(struct nouveau_device *, struct nouveau_client **);
+int nouveau_client_new(struct nouveau_device *, struct nouveau_client **);
void nouveau_client_del(struct nouveau_client **);
union nouveau_bo_config {
@@ -182,22 +134,27 @@ struct nouveau_bo {
union nouveau_bo_config config;
};
-int no...
2015 Dec 07
2
[mesa v2 5/9] nouveau: fix screen creation failure paths
..._screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
> data, size, &screen->channel);
> if (ret)
> return ret;
> - screen->drm = nouveau_drm(&dev->object);
> - screen->device = dev;
>
> ret = nouveau_client_new(screen->device, &screen->client);
> if (ret)
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> index ea29811..854f70c 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers...
2015 Dec 07
1
[mesa v2 5/9] nouveau: fix screen creation failure paths
...au_device *dev)
>>> data, size, &screen->channel);
>>> if (ret)
>>> return ret;
>>> - screen->drm = nouveau_drm(&dev->object);
>>> - screen->device = dev;
>>>
>>> ret = nouveau_client_new(screen->device, &screen->client);
>>> if (ret)
>>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>>> index ea29811..854f70c 100644
>>> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen....
2015 Nov 27
0
[mesa v2 5/9] nouveau: fix screen creation failure paths
...list.
@@ -175,8 +181,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
data, size, &screen->channel);
if (ret)
return ret;
- screen->drm = nouveau_drm(&dev->object);
- screen->device = dev;
ret = nouveau_client_new(screen->device, &screen->client);
if (ret)
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index ea29811..854f70c 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen...
2015 Dec 07
0
[mesa v2 5/9] nouveau: fix screen creation failure paths
...screen *screen, struct nouveau_device *dev)
>> data, size, &screen->channel);
>> if (ret)
>> return ret;
>> - screen->drm = nouveau_drm(&dev->object);
>> - screen->device = dev;
>>
>> ret = nouveau_client_new(screen->device, &screen->client);
>> if (ret)
>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>> index ea29811..854f70c 100644
>> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>> +++ b...
2014 Jul 31
1
[libdrm PATCH 1/3] nouveau: Only export public functions.
...am, uint64_t *value)
return ret;
}
-int
+drm_public int
nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value)
{
struct drm_nouveau_setparam r = { param, value };
return drmCommandWrite(dev->fd, DRM_NOUVEAU_SETPARAM, &r, sizeof(r));
}
-int
+drm_public int
nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
{
struct nouveau_device_priv *nvdev = nouveau_device(dev);
@@ -229,7 +229,7 @@ unlock:
return ret;
}
-void
+drm_public void
nouveau_client_del(struct nouveau_client **pclient)
{
struct nouveau_client_priv *pcli = nouveau_clien...
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 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 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
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 ++++++++++++++
2013 Jun 29
0
[PATCH] nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
..._mpg12_bs_init(dec->mpeg12_bs, &dec->base);
> + dec->base.decode_bitstream = nv84_decoder_decode_bitstream_mpeg12;
> + }
> + } else {
> + goto fail;
Seems to be handled already by - if (!is_h264 && !is_mpeg12)...
> + }
> +
> + ret = nouveau_client_new(screen->device, &dec->client);
> + if (ret)
> + goto fail;
Is there any particular reason for using a variable to store the return
value through this functions? Me thinks it can be safely purged, making
the code a bit cleaner
> +
> + if (is_h264) {
> + ret =...
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
2013 Jun 29
2
[PATCH] nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
...nv84_decoder_decode_bitstream_mpeg12;
>> + }
>> + } else {
>> + goto fail;
> Seems to be handled already by - if (!is_h264 && !is_mpeg12)...
Yes. But I disliked relying on that, so I decided to leave it in.
>
>> + }
>> +
>> + ret = nouveau_client_new(screen->device, &dec->client);
>> + if (ret)
>> + goto fail;
> Is there any particular reason for using a variable to store the return
> value through this functions? Me thinks it can be safely purged, making
> the code a bit cleaner
It was like that in nvc0_v...
2013 Jun 30
0
[PATCH] nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
...gt; + }
>>> + } else {
>>> + goto fail;
>> Seems to be handled already by - if (!is_h264 && !is_mpeg12)...
>
> Yes. But I disliked relying on that, so I decided to leave it in.
>
>>
>>> + }
>>> +
>>> + ret = nouveau_client_new(screen->device, &dec->client);
>>> + if (ret)
>>> + goto fail;
>> Is there any particular reason for using a variable to store the return
>> value through this functions? Me thinks it can be safely purged, making
>> the code a bit cleaner
>
&...
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 ++++++++++++++
2013 Jun 27
4
[PATCH] nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
...eg12_bs = CALLOC_STRUCT(vl_mpg12_bs);
+ if (!dec->mpeg12_bs)
+ goto fail;
+ vl_mpg12_bs_init(dec->mpeg12_bs, &dec->base);
+ dec->base.decode_bitstream = nv84_decoder_decode_bitstream_mpeg12;
+ }
+ } else {
+ goto fail;
+ }
+
+ ret = nouveau_client_new(screen->device, &dec->client);
+ if (ret)
+ goto fail;
+
+ if (is_h264) {
+ ret = nouveau_object_new(&screen->device->object, 0,
+ NOUVEAU_FIFO_CHANNEL_CLASS,
+ &nv04_data, sizeof(nv04_data), &dec-...
2013 Jun 30
0
[PATCH v2] nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
...eg12_bs = CALLOC_STRUCT(vl_mpg12_bs);
+ if (!dec->mpeg12_bs)
+ goto fail;
+ vl_mpg12_bs_init(dec->mpeg12_bs, &dec->base);
+ dec->base.decode_bitstream = nv84_decoder_decode_bitstream_mpeg12;
+ }
+ } else {
+ goto fail;
+ }
+
+ ret = nouveau_client_new(screen->device, &dec->client);
+ if (ret)
+ goto fail;
+
+ if (is_h264) {
+ ret = nouveau_object_new(&screen->device->object, 0,
+ NOUVEAU_FIFO_CHANNEL_CLASS,
+ &nv04_data, sizeof(nv04_data), &dec-...