lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources
Date
On Mon, 2019-04-22 at 20:12 +0000, Deepak Singh Rawat wrote:
> Minor nits below, otherwise
>
> Reviewed-by: Deepak Rawat <drawat@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@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

\
 
 \ /
  Last update: 2019-04-24 11:26    [W:0.052 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site