From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel: fix fullscreen damage posting on pageflip
Date: Thu, 11 Oct 2012 14:30:29 +1000 [thread overview]
Message-ID: <1349929829-25856-1-git-send-email-airlied@gmail.com> (raw)
From: Dave Airlie <airlied@redhat.com>
While playing with MPX and sw cursor I noticed page flips won't
end up misrendering some bits, so the sw cursor was replacing the
bits on the wrong pixmap.
Fix the damage handling to be correct and append damage before swapping
the pointers and process damage after.
This fixes misrendering with MPX cursors under a fullscreen compositor,
that pageflips.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
src/intel_dri.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 64cb567..867a465 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -725,6 +725,17 @@ static struct intel_pixmap *
intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr front, PixmapPtr back)
{
struct intel_pixmap *new_front, *new_back;
+ RegionRec region;
+
+ /* Post damage on the front buffer so that listeners, such
+ * as DisplayLink know take a copy and shove it over the USB.
+ * also for sw cursors.
+ */
+ region.extents.x1 = region.extents.y1 = 0;
+ region.extents.x2 = front->drawable.width;
+ region.extents.y2 = front->drawable.height;
+ region.data = NULL;
+ DamageRegionAppend(&front->drawable, ®ion);
new_front = intel_get_pixmap_private(back);
new_back = intel_get_pixmap_private(front);
@@ -735,19 +746,7 @@ intel_exchange_pixmap_buffers(struct intel_screen_private *intel, PixmapPtr fron
intel_glamor_exchange_buffers(intel, front, back);
- /* Post damage on the new front buffer so that listeners, such
- * as DisplayLink know take a copy and shove it over the USB.
- */
- {
- RegionRec region;
-
- region.extents.x1 = region.extents.y1 = 0;
- region.extents.x2 = front->drawable.width;
- region.extents.y2 = front->drawable.height;
- region.data = NULL;
- DamageRegionAppend(&front->drawable, ®ion);
- DamageRegionProcessPending(&front->drawable);
- }
+ DamageRegionProcessPending(&front->drawable);
return new_front;
}
--
1.7.12.1
next reply other threads:[~2012-10-11 4:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 4:30 Dave Airlie [this message]
2012-10-11 7:53 ` [PATCH] intel: fix fullscreen damage posting on pageflip Chris Wilson
2012-10-11 8:12 ` Dave Airlie
2012-10-11 8:26 ` Chris Wilson
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=1349929829-25856-1-git-send-email-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=intel-gfx@lists.freedesktop.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