Re: [Intel-gfx] [PATCH v3] drm/i915: Add interface to reserve fence registers for vGPU

2017-09-04 Thread Chris Wilson
Quoting Zhenyu Wang (2017-09-04 16:04:03)
> On 2017.09.04 11:01:41 +0100, Chris Wilson wrote:
> > Quoting changbin...@intel.com (2017-09-04 09:01:01)
> > > From: Changbin Du 
> > > 
> > > In the past, vGPU alloc fence registers by walking through mm.fence_list
> > > to find fence which pin_count = 0 and vma is empty. vGPU may not find
> > > enough fence registers this way. Because a fence can be bind to vma even
> > > though it is not in using. We have found such failure many times these
> > > days.
> > > 
> > > An option to resolve this issue is that we can force-remove fence from
> > > vma in this case.
> > > 
> > > This patch added two new api to the fence management code:
> > >  - i915_reserve_fence() will try to find a free fence from fence_list
> > >and force-remove vma if need.
> > >  - i915_unreserve_fence() reclaim a reserved fence after vGPU has
> > >finished.
> > > 
> > > With this change, the fence management is more clear to work with vGPU.
> > > GVTg do not need remove fence from fence_list in private.
> > > 
> > > v3: (Chris)
> > >   - Add struct_mutex lock assertion.
> > >   - Only count for unpinned fence.
> > > 
> > > v2: (Chris)
> > >   - Rename the new api for symmetry.
> > >   - Add safeguard to ensure at least 1 fence remained for host display.
> > > 
> > > Signed-off-by: Changbin Du 
> > > Reviewed-by: Chris Wilson 
> > 
> > Anyone want to give an ack/review for the GVT side, and then I'll push.
> 
> Acked-by: Zhenyu Wang 

And pushed.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v3] drm/i915: Add interface to reserve fence registers for vGPU

2017-09-04 Thread Zhenyu Wang
On 2017.09.04 11:01:41 +0100, Chris Wilson wrote:
> Quoting changbin...@intel.com (2017-09-04 09:01:01)
> > From: Changbin Du 
> > 
> > In the past, vGPU alloc fence registers by walking through mm.fence_list
> > to find fence which pin_count = 0 and vma is empty. vGPU may not find
> > enough fence registers this way. Because a fence can be bind to vma even
> > though it is not in using. We have found such failure many times these
> > days.
> > 
> > An option to resolve this issue is that we can force-remove fence from
> > vma in this case.
> > 
> > This patch added two new api to the fence management code:
> >  - i915_reserve_fence() will try to find a free fence from fence_list
> >and force-remove vma if need.
> >  - i915_unreserve_fence() reclaim a reserved fence after vGPU has
> >finished.
> > 
> > With this change, the fence management is more clear to work with vGPU.
> > GVTg do not need remove fence from fence_list in private.
> > 
> > v3: (Chris)
> >   - Add struct_mutex lock assertion.
> >   - Only count for unpinned fence.
> > 
> > v2: (Chris)
> >   - Rename the new api for symmetry.
> >   - Add safeguard to ensure at least 1 fence remained for host display.
> > 
> > Signed-off-by: Changbin Du 
> > Reviewed-by: Chris Wilson 
> 
> Anyone want to give an ack/review for the GVT side, and then I'll push.

Acked-by: Zhenyu Wang 

thanks
-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


signature.asc
Description: PGP signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v3] drm/i915: Add interface to reserve fence registers for vGPU

2017-09-04 Thread Chris Wilson
Quoting changbin...@intel.com (2017-09-04 09:01:01)
> From: Changbin Du 
> 
> In the past, vGPU alloc fence registers by walking through mm.fence_list
> to find fence which pin_count = 0 and vma is empty. vGPU may not find
> enough fence registers this way. Because a fence can be bind to vma even
> though it is not in using. We have found such failure many times these
> days.
> 
> An option to resolve this issue is that we can force-remove fence from
> vma in this case.
> 
> This patch added two new api to the fence management code:
>  - i915_reserve_fence() will try to find a free fence from fence_list
>and force-remove vma if need.
>  - i915_unreserve_fence() reclaim a reserved fence after vGPU has
>finished.
> 
> With this change, the fence management is more clear to work with vGPU.
> GVTg do not need remove fence from fence_list in private.
> 
> v3: (Chris)
>   - Add struct_mutex lock assertion.
>   - Only count for unpinned fence.
> 
> v2: (Chris)
>   - Rename the new api for symmetry.
>   - Add safeguard to ensure at least 1 fence remained for host display.
> 
> Signed-off-by: Changbin Du 
> Reviewed-by: Chris Wilson 

Anyone want to give an ack/review for the GVT side, and then I'll push.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx