From: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
To: xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 2/2] Correct BO allocation alignment
Date: Wed, 10 Sep 2014 14:09:09 -0700 [thread overview]
Message-ID: <1410383349-27678-3-git-send-email-keithp@keithp.com> (raw)
In-Reply-To: <1410383349-27678-1-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
BO allocations for pixmaps must be aligned to the tile height, but at
some point the code was changed to align them to twice the tile
height. This overallocates pixmaps, wasting memory, but more
importantly, for buffers allocated by DRM and shared through DRI3, the
stricter alignment check causes sharing to fail.
>From reading through the history of the code and related bugs, it
seems like this change was part of a set of changes trying to address
what turned out to be a kernel regression. Reverting this change
solves the DRI3 problem and saves a bit of memory for pixmap
allocations.
Signed-off-by: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
---
src/uxa/intel_uxa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c
index d33eca5..4ce6eae 100644
--- a/src/uxa/intel_uxa.c
+++ b/src/uxa/intel_uxa.c
@@ -206,7 +206,7 @@ intel_uxa_compute_size(struct intel_screen_private *intel,
tile_height = 8;
else
tile_height = 32;
- aligned_h = ALIGN(h, 2*tile_height);
+ aligned_h = ALIGN(h, tile_height);
*stride = intel_get_fence_pitch(intel,
ALIGN(pitch, 512),
@@ -768,7 +768,7 @@ free_priv:
else
height = 32;
- height = ALIGN(pixmap->drawable.height, 2*height);
+ height = ALIGN(pixmap->drawable.height, height);
size = intel_get_fence_size(intel, priv->stride * height);
} else
size = priv->stride * pixmap->drawable.height;
--
2.0.1
_______________________________________________
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
next prev parent reply other threads:[~2014-09-10 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 21:09 [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA Keith Packard
[not found] ` <1410383349-27678-1-git-send-email-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2014-09-10 21:09 ` [PATCH 1/2] Do not clear pending kernel events on mode switch Keith Packard
2014-09-10 21:09 ` Keith Packard [this message]
2014-09-11 6:37 ` [PATCH 0/2 xf86-video-intel] Two DRI3/Present bug fixes for UXA Chris Wilson
[not found] ` <20140911063716.GB28332-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2014-09-11 6:47 ` [Intel-gfx] " Jasper St. Pierre
2014-09-11 6:52 ` Chris Wilson
2014-09-11 19:53 ` [Intel-gfx] " Keith Packard
[not found] ` <86r3ziorwl.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2014-09-13 8:28 ` Chris Wilson
[not found] ` <20140913082824.GM16043-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2014-09-13 17:31 ` Keith Packard
2014-09-12 19:13 ` Kenneth Graunke
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=1410383349-27678-3-git-send-email-keithp@keithp.com \
--to=keithp-an4hjg94kolqt0dzr+alfa@public.gmane.org \
--cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.