From: zhigang.gong@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] intel_dri: Fixed a buffer leak when enable glamor.
Date: Thu, 12 Jul 2012 18:47:50 +0800 [thread overview]
Message-ID: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com> (raw)
From: Zhigang Gong <zhigang.gong@linux.intel.com>
We need to put current front_buffer to back buffer thus we
don't need to create a new back buffer next time. This behaviou
should be the same with or without glamor. Previous code
incorrectly discard the previous front_buffer and cause a
big buffer leak problem.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
---
src/intel_dri.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/intel_dri.c b/src/intel_dri.c
index ed5078e..0405937 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -1023,9 +1023,10 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel,
priv = info->front->driverPrivate;
/* Exchange the current front-buffer with the fresh bo */
+
+ intel->back_buffer = intel->front_buffer;
+ drm_intel_bo_reference(intel->back_buffer);
if (!(intel->uxa_flags & UXA_USE_GLAMOR)) {
- intel->back_buffer = intel->front_buffer;
- drm_intel_bo_reference(intel->back_buffer);
intel_set_pixmap_bo(priv->pixmap, new_back);
drm_intel_bo_unreference(new_back);
}
--
1.7.4.4
next reply other threads:[~2012-07-12 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 10:47 zhigang.gong [this message]
2012-07-12 10:47 ` [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor zhigang.gong
2012-07-12 12:11 ` 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=1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com \
--to=zhigang.gong@linux.intel.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