Re: [PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux