[PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources
Thomas Hellstrom
thellstrom at vmware.com
Wed Apr 24 09:26:15 UTC 2019
On Mon, 2019-04-22 at 20:12 +0000, Deepak Singh Rawat wrote:
> Minor nits below, otherwise
>
> Reviewed-by: Deepak Rawat <drawat at vmware.com>
>
> 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 at vmware.com>
> > ---
> >
> > + 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
More information about the dri-devel
mailing list