All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Rahul Sharma <rahul.sharma@samsung.com>
Subject: [PATCH v2 1/4] drm: handle compact dma scatter lists in drm_clflush_sg()
Date: Mon, 18 Feb 2013 19:28:01 +0200	[thread overview]
Message-ID: <1361208484-27039-2-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1361208484-27039-1-git-send-email-imre.deak@intel.com>
In-Reply-To: <1360423656-10816-1-git-send-email-imre.deak@intel.com>

So far the assumption was that each scatter list entry contains a single
page. This might not hold in the future, when we'll introduce compact
scatter lists, so prepare for this here.

Reference: http://www.spinics.net/lists/dri-devel/msg33917.html
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/drm_cache.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index a575cb2..bc8edbe 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -105,12 +105,11 @@ drm_clflush_sg(struct sg_table *st)
 {
 #if defined(CONFIG_X86)
 	if (cpu_has_clflush) {
-		struct scatterlist *sg;
-		int i;
+		struct sg_page_iter sg_iter;
 
 		mb();
-		for_each_sg(st->sgl, sg, st->nents, i)
-			drm_clflush_page(sg_page(sg));
+		for_each_sg_page(st->sgl, &sg_iter, st->nents, 0)
+			drm_clflush_page(sg_iter.page);
 		mb();
 
 		return;
-- 
1.7.10.4

  parent reply	other threads:[~2013-02-18 17:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-09 15:27 [PATCH 0/4] drm/i915: handle compact dma scatter lists Imre Deak
2013-02-09 15:27 ` [PATCH 1/4] drm: add helper to walk a dma scatter list a page at a time Imre Deak
2013-02-09 18:56   ` [Intel-gfx] " Daniel Vetter
2013-02-09 22:55     ` Imre Deak
2013-02-09 15:27 ` [PATCH 2/4] drm: handle compact dma scatter lists in drm_clflush_sg() Imre Deak
2013-02-09 15:27 ` [PATCH 3/4] drm/i915: handle walking compact dma scatter lists Imre Deak
2013-02-09 15:50   ` Chris Wilson
2013-02-09 22:51   ` Daniel Vetter
2013-02-09 22:59     ` Imre Deak
2013-02-09 15:27 ` [PATCH 4/4] drm/i915: create compact dma scatter lists for gem objects Imre Deak
2013-02-09 18:59   ` Daniel Vetter
2013-02-09 22:46     ` Imre Deak
2013-02-18 17:28 ` [PATCH v2 0/4] drm/i915: handle compact dma scatter lists Imre Deak
2013-02-18 17:28 ` Imre Deak [this message]
2013-02-18 17:28 ` [PATCH v2 2/4] drm/i915: handle walking " Imre Deak
2013-02-18 17:28 ` [PATCH v2 3/4] drm/i915: create compact dma scatter lists for gem objects Imre Deak
2013-02-18 17:28 ` [PATCH v2 4/4] drm/i915: use for_each_sg_page for setting up the gtt ptes Imre Deak
2013-03-19  9:05   ` Daniel Vetter

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=1361208484-27039-2-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rahul.sharma@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.