mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Deepak Singh Rawat <drawat@vmware.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources
Date: Wed, 24 Apr 2019 09:26:15 +0000	[thread overview]
Message-ID: <24023a79de1acee5147dd9b1e061d6df008047ab.camel@vmware.com> (raw)
In-Reply-To: <9181c812a226eaeff5efd96f9f8936bdf37b23e1.camel@vmware.com>

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


  reply	other threads:[~2019-04-24  9:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 16:04 [PATCH 0/9] Emulated coherent graphics memory Thomas Hellstrom
2019-04-12 16:04 ` [PATCH 1/9] mm: Allow the [page|pfn]_mkwrite callbacks to drop the mmap_sem Thomas Hellstrom
2019-04-12 18:52   ` Ralph Campbell
2019-04-13 15:11   ` Souptick Joarder
2019-04-17 10:58     ` Thomas Hellstrom
2019-04-17 13:00       ` Souptick Joarder
2019-04-12 16:04 ` [PATCH 2/9] mm: Add an apply_to_pfn_range interface Thomas Hellstrom
2019-04-12 18:52   ` Ralph Campbell
2019-04-12 21:07   ` Jerome Glisse
2019-04-13  8:34     ` Thomas Hellstrom
2019-04-16 14:46       ` Jerome Glisse
2019-04-17  9:15         ` Thomas Hellstrom
2019-04-17 14:28           ` Jerome Glisse
2019-04-12 16:04 ` [PATCH 3/9] mm: Add write-protect and clean utilities for address space ranges Thomas Hellstrom
2019-04-12 18:52   ` Ralph Campbell
2019-04-13  8:40     ` Thomas Hellstrom
2019-04-12 16:04 ` [PATCH 4/9] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct Thomas Hellstrom
2019-04-13 18:39   ` Koenig, Christian
2019-04-12 16:04 ` [PATCH 5/9] drm/ttm: TTM fault handler helpers Thomas Hellstrom
2019-04-15  6:34   ` Christian König
2019-04-17 10:53     ` Thomas Hellstrom
2019-04-12 16:04 ` [PATCH 6/9] drm/vmwgfx: Implement an infrastructure for write-coherent resources Thomas Hellstrom
2019-04-22 18:54   ` Deepak Singh Rawat
2019-04-24  9:10     ` Thomas Hellstrom
2019-04-12 16:04 ` [PATCH 7/9] drm/vmwgfx: Use an RBtree instead of linked list for MOB resources Thomas Hellstrom
2019-04-22 19:15   ` Deepak Singh Rawat
2019-04-12 16:04 ` [PATCH 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources Thomas Hellstrom
2019-04-22 20:12   ` Deepak Singh Rawat
2019-04-24  9:26     ` Thomas Hellstrom [this message]
2019-04-12 16:04 ` [PATCH 9/9] drm/vmwgfx: Add surface dirty-tracking callbacks Thomas Hellstrom
2019-04-23  2:51   ` Deepak Singh Rawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24023a79de1acee5147dd9b1e061d6df008047ab.camel@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=Linux-graphics-maintainer@vmware.com \
    --cc=drawat@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®