File u_Fix-crash-when-EXA-accel-mode-is-enabled.patch of Package xf86-video-mga

From: Egbert Eich <eich@freedesktop.org>
Date: Wed May 7 21:23:25 2014 +0200
Subject: [PATCH]Fix crash when EXA accel mode is enabled
Patch-mainline: to be upstreamed
Git-commit: 6888cea8b8b5e542929f3e785f8407bfcf32633a
Git-repo: ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga
References: bnc#876940
Signed-off-by: Egbert Eich <eich@suse.com>

Signed-off-by: Egbert Eich <eich@freedesktop.org>
---
 src/mga_exa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mga_exa.c b/src/mga_exa.c
index 69ffa16..8543be4 100644
--- a/src/mga_exa.c
+++ b/src/mga_exa.c
@@ -729,7 +729,7 @@ mgaDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
 {
     PMGA(pSrc);
 
-    char *src = (char *) exaGetPixmapFirstPixel(pSrc);
+    char *src = (char *) pMga->FbBase + exaGetPixmapOffset(pSrc);
     int src_pitch = exaGetPixmapPitch(pSrc);
 
     int cpp = (pSrc->drawable.bitsPerPixel + 7) / 8;
openSUSE Build Service is sponsored by