* [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...).
@ 2018-11-05 23:01 Eric Anholt
2018-11-06 2:18 ` Zhou, David(ChunMing)
0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2018-11-05 23:01 UTC (permalink / raw)
To: dri-devel; +Cc: linux-kernel, Eric Anholt, Chunming Zhou, Christian König
This broke rendering on V3D, where we almost always have a 0
in-syncobj.
Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9")
Cc: Chunming Zhou <david1.zhou@amd.com>
Cc: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/drm_syncobj.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 4dca5f7e8c4b..da8175d9c6ff 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -443,7 +443,8 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
int ret;
ret = drm_syncobj_search_fence(syncobj, point, flags, fence);
- drm_syncobj_put(syncobj);
+ if (syncobj)
+ drm_syncobj_put(syncobj);
return ret;
}
EXPORT_SYMBOL(drm_syncobj_find_fence);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...).
2018-11-05 23:01 [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...) Eric Anholt
@ 2018-11-06 2:18 ` Zhou, David(ChunMing)
2018-11-06 9:10 ` Koenig, Christian
0 siblings, 1 reply; 4+ messages in thread
From: Zhou, David(ChunMing) @ 2018-11-06 2:18 UTC (permalink / raw)
To: Eric Anholt, dri-devel; +Cc: linux-kernel, Koenig, Christian
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
> -----Original Message-----
> From: Eric Anholt <eric@anholt.net>
> Sent: Tuesday, November 06, 2018 7:01 AM
> To: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org; Eric Anholt <eric@anholt.net>; Zhou,
> David(ChunMing) <David1.Zhou@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>
> Subject: [PATCH] drm/syncobj: Fix oops on
> drm_syncobj_find_fence(file_priv, 0, ...).
>
> This broke rendering on V3D, where we almost always have a 0 in-syncobj.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9")
> Cc: Chunming Zhou <david1.zhou@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/drm_syncobj.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_syncobj.c
> b/drivers/gpu/drm/drm_syncobj.c index 4dca5f7e8c4b..da8175d9c6ff 100644
> --- a/drivers/gpu/drm/drm_syncobj.c
> +++ b/drivers/gpu/drm/drm_syncobj.c
> @@ -443,7 +443,8 @@ int drm_syncobj_find_fence(struct drm_file
> *file_private,
> int ret;
>
> ret = drm_syncobj_search_fence(syncobj, point, flags, fence);
> - drm_syncobj_put(syncobj);
> + if (syncobj)
> + drm_syncobj_put(syncobj);
> return ret;
> }
> EXPORT_SYMBOL(drm_syncobj_find_fence);
> --
> 2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...).
2018-11-06 2:18 ` Zhou, David(ChunMing)
@ 2018-11-06 9:10 ` Koenig, Christian
2018-11-06 10:30 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Koenig, Christian @ 2018-11-06 9:10 UTC (permalink / raw)
To: Zhou, David(ChunMing), Eric Anholt, dri-devel; +Cc: linux-kernel
Acked-by: Christian König <christian.koenig@amd.com>
Should I push it to drm-misc-next?
Christian.
Am 06.11.18 um 03:18 schrieb Zhou, David(ChunMing):
> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
>
>> -----Original Message-----
>> From: Eric Anholt <eric@anholt.net>
>> Sent: Tuesday, November 06, 2018 7:01 AM
>> To: dri-devel@lists.freedesktop.org
>> Cc: linux-kernel@vger.kernel.org; Eric Anholt <eric@anholt.net>; Zhou,
>> David(ChunMing) <David1.Zhou@amd.com>; Koenig, Christian
>> <Christian.Koenig@amd.com>
>> Subject: [PATCH] drm/syncobj: Fix oops on
>> drm_syncobj_find_fence(file_priv, 0, ...).
>>
>> This broke rendering on V3D, where we almost always have a 0 in-syncobj.
>>
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9")
>> Cc: Chunming Zhou <david1.zhou@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> ---
>> drivers/gpu/drm/drm_syncobj.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_syncobj.c
>> b/drivers/gpu/drm/drm_syncobj.c index 4dca5f7e8c4b..da8175d9c6ff 100644
>> --- a/drivers/gpu/drm/drm_syncobj.c
>> +++ b/drivers/gpu/drm/drm_syncobj.c
>> @@ -443,7 +443,8 @@ int drm_syncobj_find_fence(struct drm_file
>> *file_private,
>> int ret;
>>
>> ret = drm_syncobj_search_fence(syncobj, point, flags, fence);
>> - drm_syncobj_put(syncobj);
>> + if (syncobj)
>> + drm_syncobj_put(syncobj);
>> return ret;
>> }
>> EXPORT_SYMBOL(drm_syncobj_find_fence);
>> --
>> 2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...).
2018-11-06 9:10 ` Koenig, Christian
@ 2018-11-06 10:30 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-11-06 10:30 UTC (permalink / raw)
To: Koenig, Christian
Cc: Zhou, David(ChunMing), Eric Anholt, dri-devel, linux-kernel
On Tue, Nov 06, 2018 at 09:10:55AM +0000, Koenig, Christian wrote:
> Acked-by: Christian König <christian.koenig@amd.com>
>
> Should I push it to drm-misc-next?
Yeah.
This should have broken an igt somewhere ... would be good to double check
whether that's true and why it wasn't caught. From a quick look i915
doesn't use this interface (it uses drm_syncobj_find, which isn't broken
like this), only amdgpu and v3d use this.
I guess an in-kernel unit test for these driver interfaces is what we need
here.
-Daniel
>
> Christian.
>
> Am 06.11.18 um 03:18 schrieb Zhou, David(ChunMing):
> > Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
> >
> >> -----Original Message-----
> >> From: Eric Anholt <eric@anholt.net>
> >> Sent: Tuesday, November 06, 2018 7:01 AM
> >> To: dri-devel@lists.freedesktop.org
> >> Cc: linux-kernel@vger.kernel.org; Eric Anholt <eric@anholt.net>; Zhou,
> >> David(ChunMing) <David1.Zhou@amd.com>; Koenig, Christian
> >> <Christian.Koenig@amd.com>
> >> Subject: [PATCH] drm/syncobj: Fix oops on
> >> drm_syncobj_find_fence(file_priv, 0, ...).
> >>
> >> This broke rendering on V3D, where we almost always have a 0 in-syncobj.
> >>
> >> Signed-off-by: Eric Anholt <eric@anholt.net>
> >> Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9")
> >> Cc: Chunming Zhou <david1.zhou@amd.com>
> >> Cc: Christian König <christian.koenig@amd.com>
> >> ---
> >> drivers/gpu/drm/drm_syncobj.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_syncobj.c
> >> b/drivers/gpu/drm/drm_syncobj.c index 4dca5f7e8c4b..da8175d9c6ff 100644
> >> --- a/drivers/gpu/drm/drm_syncobj.c
> >> +++ b/drivers/gpu/drm/drm_syncobj.c
> >> @@ -443,7 +443,8 @@ int drm_syncobj_find_fence(struct drm_file
> >> *file_private,
> >> int ret;
> >>
> >> ret = drm_syncobj_search_fence(syncobj, point, flags, fence);
> >> - drm_syncobj_put(syncobj);
> >> + if (syncobj)
> >> + drm_syncobj_put(syncobj);
> >> return ret;
> >> }
> >> EXPORT_SYMBOL(drm_syncobj_find_fence);
> >> --
> >> 2.19.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-06 10:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 23:01 [PATCH] drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...) Eric Anholt
2018-11-06 2:18 ` Zhou, David(ChunMing)
2018-11-06 9:10 ` Koenig, Christian
2018-11-06 10:30 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).