Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Jason Ekstrand
On Thu, Aug 10, 2017 at 4:00 AM, Chris Wilson wrote: > Quoting Jason Ekstrand (2017-08-10 00:53:00) > > On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson > wrote: > > However, this installs the proxy into syncobj->fence with the result > > that any concurrent wait also become a WAIT_FOR_SUBMI

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Christian König
Am 10.08.2017 um 16:32 schrieb Jason Ekstrand: On Thu, Aug 10, 2017 at 5:26 AM, Christian König mailto:deathsim...@vodafone.de>> wrote: Am 10.08.2017 um 01:53 schrieb Jason Ekstrand: On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson mailto:ch...@chris-wilson.co.uk>> wrote: Quot

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Jason Ekstrand
On Thu, Aug 10, 2017 at 5:26 AM, Christian König wrote: > Am 10.08.2017 um 01:53 schrieb Jason Ekstrand: > > On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson > wrote: > >> Quoting Chris Wilson (2017-08-09 18:57:44) >> > So we are taking a snapshot here. It looks like this could have been >> > done u

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Christian König
Am 09.08.2017 um 23:31 schrieb Chris Wilson: Quoting Jason Ekstrand (2017-08-09 18:00:54) +static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs, + uint32_t count, + uint32_

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Christian König
Am 10.08.2017 um 01:53 schrieb Jason Ekstrand: On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson > wrote: Quoting Chris Wilson (2017-08-09 18:57:44) > So we are taking a snapshot here. It looks like this could have been > done using a dma_fence_array + dma

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-10 Thread Chris Wilson
Quoting Jason Ekstrand (2017-08-10 00:53:00) > On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson wrote: > However, this installs the proxy into syncobj->fence with the result > that any concurrent wait also become a WAIT_FOR_SUBMIT. The behaviour > of drm_syncobj is then quite inconsistent,

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Jason Ekstrand
On Wed, Aug 9, 2017 at 3:41 PM, Chris Wilson wrote: > Quoting Chris Wilson (2017-08-09 18:57:44) > > So we are taking a snapshot here. It looks like this could have been > > done using a dma_fence_array + dma_fence_proxy for capturing the future > > fence. > > A quick sketch of this idea looks li

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Chris Wilson
Quoting Chris Wilson (2017-08-09 18:57:44) > So we are taking a snapshot here. It looks like this could have been > done using a dma_fence_array + dma_fence_proxy for capturing the future > fence. A quick sketch of this idea looks like: void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Jason Ekstrand
On Wed, Aug 9, 2017 at 2:31 PM, Chris Wilson wrote: > Quoting Jason Ekstrand (2017-08-09 18:00:54) > > +static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj > **syncobjs, > > + uint32_t count, > > +

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Chris Wilson
Quoting Jason Ekstrand (2017-08-09 18:00:54) > +static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj > **syncobjs, > + uint32_t count, > + uint32_t flags, > +

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Jason Ekstrand
On Wed, Aug 9, 2017 at 11:25 AM, Christian König wrote: > Am 09.08.2017 um 19:57 schrieb Chris Wilson: > >> Quoting Jason Ekstrand (2017-08-09 18:00:54) >> >>> Vulkan VkFence semantics require that the application be able to perform >>> a CPU wait on work which may not yet have been submitted. T

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Christian König
Am 09.08.2017 um 19:57 schrieb Chris Wilson: Quoting Jason Ekstrand (2017-08-09 18:00:54) Vulkan VkFence semantics require that the application be able to perform a CPU wait on work which may not yet have been submitted. This is perfectly safe because the CPU wait has a timeout which will get t

Re: [PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Chris Wilson
Quoting Jason Ekstrand (2017-08-09 18:00:54) > Vulkan VkFence semantics require that the application be able to perform > a CPU wait on work which may not yet have been submitted. This is > perfectly safe because the CPU wait has a timeout which will get > triggered eventually if no work is ever s

[PATCH] drm/syncobj: Allow wait for submit and signal behavior (v2)

2017-08-09 Thread Jason Ekstrand
Vulkan VkFence semantics require that the application be able to perform a CPU wait on work which may not yet have been submitted. This is perfectly safe because the CPU wait has a timeout which will get triggered eventually if no work is ever submitted. This behavior is advantageous for multi-th