intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix current fb blocking for page flip.
@ 2010-10-21  9:55 Chia-I Wu
  2010-10-21 10:09 ` Chris Wilson
  2010-10-21 16:18 ` Jesse Barnes
  0 siblings, 2 replies; 7+ messages in thread
From: Chia-I Wu @ 2010-10-21  9:55 UTC (permalink / raw)
  To: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

Hi list,

According to the doc for page_flip, intel_crtc_page_flip should

   ... block all rendering to the current fb until the flip has
   completed.

I am not entirely sure, but it seems that it is
work->old_fb_obj->pending_flip that needs to be incremented instead of
work->pending_flip_obj->pending_flip.  This patch does fix the
rendering artifacts with my Android on i915 project.  Any thought?

-- 
olv@LunarG.com

[-- Attachment #2: 0001-drm-i915-Fix-current-fb-blocking-for-page-flip.patch --]
[-- Type: text/x-diff, Size: 1351 bytes --]

From fd72d779b84d70bac104d5d46541e3ac1ced6f35 Mon Sep 17 00:00:00 2001
From: Chia-I Wu <olvaffe@gmail.com>
Date: Thu, 21 Oct 2010 16:39:14 +0800
Subject: [PATCH] drm/i915: Fix current fb blocking for page flip.

Block execbuffer for the fb to be flipped away, not the one that is to
be flipped in.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
---
 drivers/gpu/drm/i915/intel_display.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9792285..41bf75a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4928,7 +4928,7 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
 
 	spin_unlock_irqrestore(&dev->event_lock, flags);
 
-	obj_priv = to_intel_bo(work->pending_flip_obj);
+	obj_priv = to_intel_bo(work->old_fb_obj);
 
 	/* Initial scanout buffer will have a 0 pending flip count */
 	if ((atomic_read(&obj_priv->pending_flip) == 0) ||
@@ -5031,8 +5031,10 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	if (ret)
 		goto cleanup_objs;
 
-	obj_priv = to_intel_bo(obj);
+	obj_priv = to_intel_bo(work->old_fb_obj);
 	atomic_inc(&obj_priv->pending_flip);
+
+	obj_priv = to_intel_bo(obj);
 	work->pending_flip_obj = obj;
 
 	if (IS_GEN3(dev) || IS_GEN2(dev)) {
-- 
1.7.1


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-21 18:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21  9:55 [PATCH] drm/i915: Fix current fb blocking for page flip Chia-I Wu
2010-10-21 10:09 ` Chris Wilson
2010-10-21 16:18 ` Jesse Barnes
2010-10-21 17:49   ` Chia-I Wu
2010-10-21 17:52     ` Jesse Barnes
2010-10-21 18:15     ` Kristian Høgsberg
2010-10-21 18:41       ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).