From 7d16ee64dbbe1e324294e84ae347a1bd363ea793973569274400ce1168ea0ca5 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 25 Mar 2011 03:34:07 +0000 Subject: [PATCH] - EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch * EXA/mixed: ModifyPixmapHeader pitch fixes. (bnc #678264, bfo #33929) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=339 --- ...yPixmapHeader-pitch-fixes.-bug-33929.patch | 57 +++++++++++++++++++ xorg-x11-server.changes | 7 +++ xorg-x11-server.spec | 2 + 3 files changed, 66 insertions(+) create mode 100644 EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch diff --git a/EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch b/EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch new file mode 100644 index 0000000..faadaf5 --- /dev/null +++ b/EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch @@ -0,0 +1,57 @@ +From 7b3b7efe78dec87c8059ea0d0985f08a97f0633d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Thu, 24 Feb 2011 12:17:57 +0100 +Subject: [PATCH] EXA/mixed: ModifyPixmapHeader pitch fixes. (bug #33929) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If there's a GPU copy and a non-zero devKind was passed in, set the GPU copy +pitch to that instead of to a possibly bogus value derived from the new width. +This is e.g. used by the radeon driver's drmmode_xf86crtc_resize hook, fixes +https://bugs.freedesktop.org/show_bug.cgi?id=33929 . + +On the other hand, the system memory copy doesn't need the pitch to be aligned +beyond the PixmapBytePad of the width. + +Signed-off-by: Michel Dänzer +Acked-by: Cyril Brulebois +Tested-by: Cyril Brulebois +Reported-by: Thierry Vignaud +Tested-by: Thierry Vignaud +Signed-off-by: Keith Packard +(cherry picked from commit 31704510f448706524b7b7085cc4ff0ada7bfe7e) +--- + exa/exa_mixed.c | 9 +++++---- + 1 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c +index 606f1e1..fd1afb2 100644 +--- a/exa/exa_mixed.c ++++ b/exa/exa_mixed.c +@@ -175,8 +175,10 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + depth != pPixmap->drawable.depth || + bitsPerPixel != pPixmap->drawable.bitsPerPixel) { + if (pExaPixmap->driverPriv) { +- exaSetFbPitch(pExaScr, pExaPixmap, +- width, height, bitsPerPixel); ++ if (devKind > 0) ++ pExaPixmap->fb_pitch = devKind; ++ else ++ exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, + width, height, bitsPerPixel); +@@ -187,8 +189,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + if (has_gpu_copy && pExaPixmap->sys_ptr) { + free(pExaPixmap->sys_ptr); + pExaPixmap->sys_ptr = NULL; +- pExaPixmap->sys_pitch = devKind > 0 ? devKind : +- PixmapBytePad(width, depth); ++ pExaPixmap->sys_pitch = PixmapBytePad(width, depth); + DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; +-- +1.7.4.1 + diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 7ab1b22..4cf8c3f 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 25 03:20:58 UTC 2011 - sndirsch@novell.com + +- EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch + * EXA/mixed: ModifyPixmapHeader pitch fixes. (bnc #678264, + bfo #33929) + ------------------------------------------------------------------- Thu Mar 17 16:55:16 UTC 2011 - sndirsch@novell.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index d1a6340..ef7019c 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -124,6 +124,7 @@ Patch224: pad-size-of-system-memory-copy-for-1x1-pixmaps Patch225: xorg-server-stop-cpu-eating.diff Patch226: record-avoid-crash-when-calling-RecordFlushReplyBuff.patch Patch227: Replace-malloc-with-calloc-to-initialize-the-buffers.patch +Patch228: EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch %if %moblin Patch300: moblin-use_preferred_mode_for_all_outputs.diff %endif @@ -259,6 +260,7 @@ popd %patch225 -p1 %patch226 -p1 %patch227 -p1 +%patch228 -p1 %if %moblin %patch300 -p1 %endif