Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-28 Thread Samuel Pitoiset



On 10/26/2015 01:44 PM, Julien Isorce wrote:



On 25 October 2015 at 21:38, Samuel Pitoiset 
> wrote:



Do you need someone to push this patch?


Yes please


Pushed.





___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-26 Thread Julien Isorce
On 25 October 2015 at 21:38, Samuel Pitoiset 
wrote:

>
> Do you need someone to push this patch?
>

Yes please
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-25 Thread Samuel Pitoiset



On 10/22/2015 01:02 AM, Julien Isorce wrote:
Sorry this patch should not have gone in the v2 since it has been 
already reviewed by Emil. But thx for your review.
I experienced the crash when testing patch 5/7 of this patch series, 
around "resource = pscreen->resource_from_handle" in the new 
vaCreateSurface2 function. Just passing a wrong fd.


I checked your remark for nv50 and nv30 and they don't make this step. 
From what I can see, nvc0 re-use nv50_miptree_from_handle from nv50 
but still has its own nvc0_miptree_vtbl. But that's just a guess :)


ACK.
Thanks for your answer.

Do you need someone to push this patch?



Cheers
Julien

On 20 October 2015 at 18:04, samuel.pitoiset 
> wrote:


Is there a particular situation where nv50_miptree_from_handle()
fails? And did you check nv50?

Anyway, this patch is:
Reviewed-by: Samuel Pitoiset >

On 20/10/2015 18:34, Julien Isorce wrote:

Signed-off-by: Julien Isorce >
---
  src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
index 12b5a02..15c803c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
@@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen
* screen,
 } else {
struct pipe_resource *res =
nv50_miptree_from_handle(screen,
 templ, whandle);
-  nv04_resource(res)->vtbl = _miptree_vtbl;
+  if (res)
+ nv04_resource(res)->vtbl = _miptree_vtbl;
return res;
 }
  }


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org 
http://lists.freedesktop.org/mailman/listinfo/mesa-dev




___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-21 Thread Julien Isorce
Sorry this patch should not have gone in the v2 since it has been already
reviewed by Emil. But thx for your review.
I experienced the crash when testing patch 5/7 of this patch series, around
"resource = pscreen->resource_from_handle" in the new vaCreateSurface2
function. Just passing a wrong fd.

I checked your remark for nv50 and nv30 and they don't make this step. From
what I can see, nvc0 re-use nv50_miptree_from_handle from nv50 but still
has its own nvc0_miptree_vtbl. But that's just a guess :)

Cheers
Julien

On 20 October 2015 at 18:04, samuel.pitoiset 
wrote:

> Is there a particular situation where nv50_miptree_from_handle() fails?
> And did you check nv50?
>
> Anyway, this patch is:
> Reviewed-by: Samuel Pitoiset 
>
> On 20/10/2015 18:34, Julien Isorce wrote:
>
>> Signed-off-by: Julien Isorce 
>> ---
>>   src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
>> b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
>> index 12b5a02..15c803c 100644
>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
>> @@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,
>>  } else {
>> struct pipe_resource *res = nv50_miptree_from_handle(screen,
>>  templ,
>> whandle);
>> -  nv04_resource(res)->vtbl = _miptree_vtbl;
>> +  if (res)
>> + nv04_resource(res)->vtbl = _miptree_vtbl;
>> return res;
>>  }
>>   }
>>
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-20 Thread Julien Isorce
Signed-off-by: Julien Isorce 
---
 src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
index 12b5a02..15c803c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
@@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,
} else {
   struct pipe_resource *res = nv50_miptree_from_handle(screen,
templ, whandle);
-  nv04_resource(res)->vtbl = _miptree_vtbl;
+  if (res)
+ nv04_resource(res)->vtbl = _miptree_vtbl;
   return res;
}
 }
-- 
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-20 Thread samuel.pitoiset
Is there a particular situation where nv50_miptree_from_handle() fails? 
And did you check nv50?


Anyway, this patch is:
Reviewed-by: Samuel Pitoiset 

On 20/10/2015 18:34, Julien Isorce wrote:

Signed-off-by: Julien Isorce 
---
  src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
index 12b5a02..15c803c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
@@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,
 } else {
struct pipe_resource *res = nv50_miptree_from_handle(screen,
 templ, whandle);
-  nv04_resource(res)->vtbl = _miptree_vtbl;
+  if (res)
+ nv04_resource(res)->vtbl = _miptree_vtbl;
return res;
 }
  }


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev