[PATCH 09/10] XXX fb: Use FB_SHIFT == 6 when appropriate

Adam Jackson ajax at redhat.com
Mon Mar 10 08:04:33 PDT 2014


We can't do this for wfb, since the pixman accessor functions are 32
bits wide.  And we should only do this when long is 64 bits, since
otherwise we're on a 32-bit machine and uint64_t would likely be
emulated.

Sadly, while this does build, it does not work.  The root weave looks
correct, but xlogo looks vertically squished and metacity's decs don't
show up at all.  Probably this is related to the pixman caveat above!
So now all you need to do is audit fb for pixman calls and make sure the
strides they use are as if FB_SHIFT was 5.  (And maybe whatever else is
still broken after that's done.)

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 fb/fb.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fb/fb.h b/fb/fb.h
index 206a3bc..02dd843 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -80,8 +80,12 @@
  */
 
 #ifndef FB_SHIFT
+#if !defined(FB_ACCESS_WRAPPER) && __SIZEOF_LONG__ == 8
+#define FB_SHIFT    6
+#else
 #define FB_SHIFT    LOG2_BITMAP_PAD
 #endif
+#endif
 
 #if FB_SHIFT < LOG2_BITMAP_PAD
 #error FB_SHIFT must be >= LOG2_BITMAP_PAD
-- 
1.8.5.3



More information about the xorg-devel mailing list