framebuffer: fix computation of alignment bits
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 3 Jul 2012 16:14:39 +0000 (18:14 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 3 Jul 2012 16:14:39 +0000 (18:14 +0200)
milkymist/framebuffer/__init__.py

index 89e74a864502e17fb715d54d368daf85dcea6167..929656412d77d109ee53ff763b4856a6797462fc 100644 (file)
@@ -224,7 +224,7 @@ class FakeDMA(Actor):
 class Framebuffer:
        def __init__(self, address, asmiport):
                asmi_bits = asmiport.hub.aw
-               alignment_bits = bits_for(asmiport.hub.dw//8)
+               alignment_bits = bits_for(asmiport.hub.dw//8) - 1
                length_bits = _hbits + _vbits + 2 - alignment_bits
                pack_factor = asmiport.hub.dw//_bpp
                packed_pixels = structuring.pack_layout(_pixel_layout, pack_factor)