[patch] exa: fix pitch handling in ModifyPixmapHeader
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Apr 17 02:23:49 PDT 2008
https://bugs.freedesktop.org/show_bug.cgi?id=15509
The issue is seen when large virtual screen set and do rotation.
Rotate shadow pixmap got large pitch which exceed hw limit (8k),
I tried to set maxPitchPixel/Bytes but it still failed to guard for
me.
The problem is current exaModifyPixmapHeader totally ignores
'devKind', and exaSetAccelBlock only looks exa pixmap private fb_pitch,
which is not available for home-made pixmap like rotate_pixmap.
Following patch trys to fix case like this.
---
diff --git a/exa/exa.c b/exa/exa.c
index 81dc3e2..3369c3a 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -386,6 +386,9 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
if (pExaPixmap) {
pExaPixmap->sys_ptr = pPixData;
+ if (pExaPixmap->fb_pitch == 0)
+ pExaPixmap->fb_pitch = devKind;
+
exaSetAccelBlock(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
}
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the xorg
mailing list