Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix current fb blocking for flipping.
@ 2010-10-21  9:32 Chia-I Wu
  2010-10-21 16:56 ` Jesse Barnes
  0 siblings, 1 reply; 3+ messages in thread
From: Chia-I Wu @ 2010-10-21  9:32 UTC (permalink / raw)
  To: intel-gfx

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 |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5e21b31..2e8cf7d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4664,7 +4664,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) ||
@@ -4729,6 +4729,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	work->dev = crtc->dev;
 	intel_fb = to_intel_framebuffer(crtc->fb);
 	work->old_fb_obj = intel_fb->obj;
+	obj_priv = to_intel_bo(intel_fb->obj);
+	atomic_inc(&obj_priv->pending_flip);
 	INIT_WORK(&work->work, intel_unpin_work_fn);
 
 	/* We borrow the event spin lock for protecting unpin_work */
@@ -4770,7 +4772,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	i915_gem_object_flush_write_domain(obj);
 	drm_vblank_get(dev, intel_crtc->pipe);
 	obj_priv = to_intel_bo(obj);
-	atomic_inc(&obj_priv->pending_flip);
 	work->pending_flip_obj = obj;
 
 	if (intel_crtc->plane)
-- 
1.7.1

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

* Re: [PATCH] drm/i915: fix current fb blocking for flipping.
  2010-10-21  9:32 [PATCH] drm/i915: fix current fb blocking for flipping Chia-I Wu
@ 2010-10-21 16:56 ` Jesse Barnes
  2010-10-21 17:32   ` Chia-I Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2010-10-21 16:56 UTC (permalink / raw)
  To: Chia-I Wu; +Cc: intel-gfx

On Thu, 21 Oct 2010 17:32:30 +0800
Chia-I Wu <olvaffe@gmail.com> wrote:

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

I think we want to block rendering on both?  Otherwise we could display
partial drawing in the new buffer.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915: fix current fb blocking for flipping.
  2010-10-21 16:56 ` Jesse Barnes
@ 2010-10-21 17:32   ` Chia-I Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Chia-I Wu @ 2010-10-21 17:32 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Oct 22, 2010 at 12:56 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Thu, 21 Oct 2010 17:32:30 +0800
> Chia-I Wu <olvaffe@gmail.com> wrote:
>
>> Block execbuffer for the fb to be flipped away, not the one that is to
>> be flipped in.
> I think we want to block rendering on both?  Otherwise we could display
> partial drawing in the new buffer.
I sent the wrong patch accidentally.  Please ignore this one.

-- 
olv@LunarG.com

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21  9:32 [PATCH] drm/i915: fix current fb blocking for flipping Chia-I Wu
2010-10-21 16:56 ` Jesse Barnes
2010-10-21 17:32   ` Chia-I Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox