Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- hw/kdrive/fbdev/fbdev.c | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 40747fe..95f64cb 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -319,6 +319,21 @@ fbdevWindowLinear(ScreenPtr pScreen, return (CARD8 *) priv->fb + row * priv->fix.line_length + offset; } +static void * +fbdevWindowAfb(ScreenPtr pScreen, + CARD32 row, + CARD32 offset, int mode, CARD32 *size, void *closure) +{ + KdScreenPriv(pScreen); + FbdevPriv *priv = pScreenPriv->card->driver; + + if (!pScreenPriv->enabled) + return 0; + /* offset to next plane */ + *size = priv->var.yres_virtual * priv->fix.line_length; + return (CARD8 *) priv->fb + row * priv->fix.line_length + offset; +} + Bool fbdevMapFramebuffer(KdScreenInfo * screen) { @@ -435,7 +450,20 @@ fbdevSetShadow(ScreenPtr pScreen) break; case FB_TYPE_PLANES: - FatalError("Bitplanes are not yet supported\n"); + window = fbdevWindowAfb; + switch (priv->var.bits_per_pixel) { + case 4: + update = shadowUpdateAfb4; + break; + + case 8: + update = shadowUpdateAfb8; + break; + + default: + FatalError("Bitplanes with bpp %u are not yet supported\n", + priv->var.bits_per_pixel); + } break; case FB_TYPE_INTERLEAVED_PLANES: -- 1.7.0.4 -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1364390451-9656-19-git-send-email-ge...@linux-m68k.org