[Openchrome-devel] xf86-video-openchrome: src/via_dri.c
James Simmons
jsimmons at kemper.freedesktop.org
Wed Feb 11 13:45:05 PST 2015
src/via_dri.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4b1143d1cb9820bbf2d4907032262d3452801c5e
Author: James Simmons <jsimmons at infradead.org>
Date: Wed Feb 11 14:42:42 2015 -0700
The function viaDRIFBMemcpy really wants dst to be 16byte-aligned
there. And that's not ->driOffScreenMem (which you've guaranteed
to be aligned), that's ->driOffScreenSave, which comes from malloc().
On 32bit host it's not guaranteed to yield 128bit-aligned pointer.
That's where the "[drm:via_build_sg_info] *ERROR* Invalid DRM bitblt
alignment." kernel whinge is coming from.
Signed-off-by: Al Viro <viro at ZenIV.linux.org.uk>
Acked-by: James Simmons <jsimmons at infradead.org>
diff --git a/src/via_dri.c b/src/via_dri.c
index 2f21a2b..f119b3d 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -916,7 +916,7 @@ viaDRIOffscreenSave(ScrnInfoPtr pScrn)
if (pVia->driOffScreenSave) {
void *dst, *src = drm_bo_map(pScrn, pVia->driOffScreenMem);
- dst = pVia->driOffScreenSave;
+ dst = (void *) ALIGN_TO((unsigned long) pVia->driOffScreenSave, 16);
if ((pVia->drmVerMajor == 2) && (pVia->drmVerMinor >= 8)) {
err = viaDRIFBMemcpy(pVia->drmmode.fd, pVia->driOffScreenMem, dst, FALSE);
if (!err)
More information about the Openchrome-devel
mailing list