On Mon, 2019-04-22 at 20:12 +0000, Deepak Singh Rawat wrote: > Minor nits below, otherwise > > Reviewed-by: Deepak Rawat <drawat@xxxxxxxxxx> > > On Fri, 2019-04-12 at 09:04 -0700, Thomas Hellstrom wrote: > > Similar to write-coherent resources, make sure that from the user- > > space > > point of view, GPU rendered contents is automatically available for > > reading by the CPU. > > > > Signed-off-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx> > > --- > > > > + while (cur) { > > + struct vmw_resource *cur_res = > > + container_of(cur, struct vmw_resource, > > mob_node); > > + > > + if (cur_res->backup_offset >= res_end) { > > + cur = cur->rb_left; > > + } else if (cur_res->backup_offset + cur_res- > > > backup_size <= > > + res_start) { > > + cur = cur->rb_right; > > + } else { > > + found = cur_res; > > I didn't looked into how RB tree works but do you need to break the > loop when resource is found? No, here we will continue looking for a resource with even lower starting offset. I'll add a comment about that. Thanks, Thomas _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel