<div dir="ltr"><div>s/it external/it's external/</div><div><br></div><div>Otherwise, the description looks good.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 7, 2023 at 6:08 PM Matthew Brost <<a href="mailto:matthew.brost@intel.com">matthew.brost@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, May 05, 2023 at 02:40:40PM -0400, Rodrigo Vivi wrote:<br>
> On Mon, May 01, 2023 at 05:17:03PM -0700, Matthew Brost wrote:<br>
> > Not needed and causes some issues with bulk LRU moves.<br>
> <br>
> I'm confused with this explanation and the code below.<br>
> could you please provide a bit more wording here?<br>
> <br>
<br>
We only need to try to lock a BO if it external as non-external BOs<br>
share the dma-resv with the already locked VM. Trying to lock<br>
non-external BOs caused an issue (list corruption) in an uncoming patch<br>
which adds bulk LRU move. Since this code isn't needed, remove it.<br>
<br>
^^^ How about this.<br>
<br>
> > <br>
> > Signed-off-by: Matthew Brost <<a href="mailto:mattthew.brost@intel.com" target="_blank">mattthew.brost@intel.com</a>><br>
> > ---<br>
> > drivers/gpu/drm/xe/xe_vm.c | 8 +++++---<br>
> > 1 file changed, 5 insertions(+), 3 deletions(-)<br>
> > <br>
> > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c<br>
> > index 272f0f7f24fe..6c427ff92c44 100644<br>
> > --- a/drivers/gpu/drm/xe/xe_vm.c<br>
> > +++ b/drivers/gpu/drm/xe/xe_vm.c<br>
> > @@ -2064,9 +2064,11 @@ static int vm_bind_ioctl(struct xe_vm *vm, struct xe_vma *vma,<br>
> > */<br>
> > xe_bo_get(vbo);<br>
> > <br>
> > - <a href="http://tv_bo.bo" rel="noreferrer" target="_blank">tv_bo.bo</a> = &vbo->ttm;<br>
> > - tv_bo.num_shared = 1;<br>
> > - list_add(&tv_bo.head, &objs);<br>
> > + if (!vbo->vm) {<br>
> > + <a href="http://tv_bo.bo" rel="noreferrer" target="_blank">tv_bo.bo</a> = &vbo->ttm;<br>
> > + tv_bo.num_shared = 1;<br>
> > + list_add(&tv_bo.head, &objs);<br>
> > + }<br>
> > }<br>
> > <br>
> > again:<br>
> > -- <br>
> > 2.34.1<br>
> > <br>
</blockquote></div>