mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	stable@kernel.org
Subject: [PATCH 2/2] drm/i915: properly clflush pwrites to phys objects
Date: Tue, 29 Nov 2011 16:09:29 +0100	[thread overview]
Message-ID: <1322579369-26954-2-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1322579369-26954-1-git-send-email-daniel.vetter@ffwll.ch>

Usually results in (rare) cursor corruptions on platforms
requiring physically addressed cursors.

Note to the stable team: This requires the drm core patch
"drm: add helper to clflush a virtual address range" which
creates the helper used here.

Tested-and-reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: stable@kernel.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35460
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=21442
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 39459d2..e395a7d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4123,6 +4123,7 @@ i915_gem_phys_pwrite(struct drm_device *dev,
 			return -EFAULT;
 	}
 
+	drm_clflush_virt_range(vaddr, args->size);
 	intel_gtt_chipset_flush();
 	return 0;
 }
-- 
1.7.7.3


  reply	other threads:[~2011-11-29 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 15:09 [PATCH 1/2] drm: add helper to clflush a virtual address range Daniel Vetter
2011-11-29 15:09 ` Daniel Vetter [this message]
2011-11-29 15:35   ` [PATCH 2/2] drm/i915: properly clflush pwrites to phys objects Chris Wilson
2011-11-29 16:16     ` Daniel Vetter
2011-11-29 17:22       ` 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=1322579369-26954-2-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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®