Displaying 9 results from an estimated 9 matches for "nouveau_bo_make_glob".
Did you mean:
nouveau_bo_make_global
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...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);
+ if (!nvbo->head.next)
+ DRMLISTADD(&nvbo->head, &nvdev->bo_list);
+ pthread_mutex_unlock(&a...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...p;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);
> + if (!nvbo->head.next)
Something looks...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...gt; >> *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);
> >> +...
2015 Feb 25
3
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...gt;>>> }
> >>>> @@ -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(&a...
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 2/2] nouveau: Do not add most bo's to the global bo list.
...ad_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);
>> + if (!nvbo->head.ne...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...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);
>&...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...t;>>>> @@ -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);
>>>>>> + pthrea...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
While I've closed off most races in a previous patch, a small race still existed
where importing then unreffing cound cause an invalid bo. Add a test for this case.
Racing sequence fixed:
- thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock.
- thread 2 increases refcount to 1.
- thread 2 decreases refcount to zero, blocks on acquiring nvdev->lock.
At this