diff options
author | marha <marha@users.sourceforge.net> | 2013-06-04 09:07:26 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-06-04 09:48:59 +0200 |
commit | fd2b28971a2afbf54b6cb641aa6a2d5e940a1450 (patch) | |
tree | 1b103a8b2114125ffa8d79827d931aba3744a0d2 /xorg-server/hw/kdrive | |
parent | 62a1ce0583cf41c173f4edb91511430b552e04da (diff) | |
download | vcxsrv-fd2b28971a2afbf54b6cb641aa6a2d5e940a1450.tar.gz vcxsrv-fd2b28971a2afbf54b6cb641aa6a2d5e940a1450.tar.bz2 vcxsrv-fd2b28971a2afbf54b6cb641aa6a2d5e940a1450.zip |
xwininfo fontconfig libX11 libXau libXdmcp libXext mesa libXinerama libxcb libxcb/xcb-proto libfontenc pixman xkbcomp mkfontscale xkeyboard-config git update 4 Jun 2013
xserver commit c21344add2fc589df83b29be5831c36a372201bd
libxcb commit 9ae84ad187e2ba440c40f44b8eb21c82c2fdbf12
libxcb/xcb-proto commit bdfedfa57a13ff805580cfacafc70f9cc55df363
xkeyboard-config commit dad9ade4e83d1ef5a517fcc4cc9ad3a79b47acce
libX11 commit 8496122eb00ce6cd5d2308ee54f64b68c378e455
libXdmcp commit 0b443c1b769b9c9a3b45b4252afe07e18b709ff4
libXext commit d8366afbb0d2e4fbb1e419b1187f490522270bea
libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a
libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff
libXau commit 899790011304c4029e15abf410e49ce7cec17e0a
xkbcomp commit ed582f4fccd4e23abcfba8b3b03649fea6414f44
pixman commit 2acfac5f8e097ee2ae225d986f981b55d65dd152
mkfontscale commit 19e2cb7c6a3ec2c5b1bc0d24866fa685eef0ee13
xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13
fontconfig commit cd9b1033a68816a7acfbba1718ba0aa5888f6ec7
mesa commit 7bafd88c153e395274b632e7eae4bc9fc3aec1d2
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/man/Xephyr.man | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fbdev/fbdev.c | 157 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/fbdev/fbdev.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kdrive.c | 3 |
4 files changed, 137 insertions, 31 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/man/Xephyr.man b/xorg-server/hw/kdrive/ephyr/man/Xephyr.man index ca88ab240..f14f6c864 100644 --- a/xorg-server/hw/kdrive/ephyr/man/Xephyr.man +++ b/xorg-server/hw/kdrive/ephyr/man/Xephyr.man @@ -46,7 +46,7 @@ and the following additional options: sets the screen size. .TP 8 .BI -parent " id" -uses exiting window +uses existing window .I id . If a .BI -screen @@ -59,6 +59,10 @@ set 'cursor acceleration': The host's cursor is reused. This is only really there to aid debugging by avoiding server paints for the cursor. Performance improvement is negligible. +.TP 8 +.B -resizeable +Allow the Xephyr window to be resized, even if not embedded into a parent +window. By default, the Xephyr window has a fixed size. .SH "SIGNALS" Send a SIGUSR1 to the server (e.g. pkill -USR1 Xephyr) to toggle the debugging mode. diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.c b/xorg-server/hw/kdrive/fbdev/fbdev.c index d6fcf1a5f..95f64cbef 100644 --- a/xorg-server/hw/kdrive/fbdev/fbdev.c +++ b/xorg-server/hw/kdrive/fbdev/fbdev.c @@ -30,7 +30,7 @@ extern int KdTsPhyScreen; -char *fbdevDevicePath = NULL; +const char *fbdevDevicePath = NULL; static Bool fbdevInitialize(KdCardInfo * card, FbdevPriv * priv) @@ -206,13 +206,23 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv * scrpriv) depth = priv->var.bits_per_pixel; gray = priv->var.grayscale; + /* Calculate fix.line_length if it's zero */ + if (!priv->fix.line_length) + priv->fix.line_length = (priv->var.xres_virtual * depth + 7) / 8; + switch (priv->fix.visual) { + case FB_VISUAL_MONO01: + case FB_VISUAL_MONO10: + screen->fb.visuals = (1 << StaticGray); + break; case FB_VISUAL_PSEUDOCOLOR: - if (gray) { - screen->fb.visuals = (1 << StaticGray); + screen->fb.visuals = (1 << StaticGray); + if (priv->var.bits_per_pixel == 1) { + /* Override to monochrome, to have preallocated black/white */ + priv->fix.visual = FB_VISUAL_MONO01; + } else if (gray) { /* could also support GrayScale, but what's the point? */ - } - else { + } else { screen->fb.visuals = ((1 << StaticGray) | (1 << GrayScale) | (1 << StaticColor) | @@ -309,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) { @@ -316,7 +341,8 @@ fbdevMapFramebuffer(KdScreenInfo * screen) KdPointerMatrix m; FbdevPriv *priv = screen->card->driver; - if (scrpriv->randr != RR_Rotate_0) + if (scrpriv->randr != RR_Rotate_0 || + priv->fix.type != FB_TYPE_PACKED_PIXELS) scrpriv->shadow = TRUE; else scrpriv->shadow = FALSE; @@ -392,33 +418,88 @@ fbdevSetShadow(ScreenPtr pScreen) window = fbdevWindowLinear; update = 0; - if (scrpriv->randr) - if (priv->var.bits_per_pixel == 16) { - switch (scrpriv->randr) { - case RR_Rotate_90: - if (useYX) - update = shadowUpdateRotate16_90YX; - else - update = shadowUpdateRotate16_90; - break; - case RR_Rotate_180: - update = shadowUpdateRotate16_180; + switch (priv->fix.type) { + case FB_TYPE_PACKED_PIXELS: + if (scrpriv->randr) + if (priv->var.bits_per_pixel == 16) { + switch (scrpriv->randr) { + case RR_Rotate_90: + if (useYX) + update = shadowUpdateRotate16_90YX; + else + update = shadowUpdateRotate16_90; + break; + case RR_Rotate_180: + update = shadowUpdateRotate16_180; + break; + case RR_Rotate_270: + if (useYX) + update = shadowUpdateRotate16_270YX; + else + update = shadowUpdateRotate16_270; + break; + default: + update = shadowUpdateRotate16; + break; + } + } + else + update = shadowUpdateRotatePacked; + else + update = shadowUpdatePacked; + break; + + case FB_TYPE_PLANES: + 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: + if (priv->fix.type_aux == 2) { + switch (priv->var.bits_per_pixel) { + case 4: + update = shadowUpdateIplan2p4; break; - case RR_Rotate_270: - if (useYX) - update = shadowUpdateRotate16_270YX; - else - update = shadowUpdateRotate16_270; + + case 8: + update = shadowUpdateIplan2p8; break; + default: - update = shadowUpdateRotate16; - break; + FatalError("Atari interleaved bitplanes with bpp %u are not yet supported\n", + priv->var.bits_per_pixel); } + } else { + FatalError("Interleaved bitplanes with interleave %u are not yet supported\n", + priv->fix.type_aux); } - else - update = shadowUpdateRotatePacked; - else - update = shadowUpdatePacked; + break; + + case FB_TYPE_TEXT: + FatalError("Text frame buffers are not yet supported\n"); + break; + + case FB_TYPE_VGA_PLANES: + FatalError("VGA planes are not yet supported\n"); + break; + + default: + FatalError("Unsupported frame buffer type %u\n", priv->fix.type); + break; + } + return KdShadowSet(pScreen, scrpriv->randr, update, window); } @@ -573,6 +654,26 @@ fbdevCreateColormap(ColormapPtr pmap) xColorItem *pdefs; switch (priv->fix.visual) { + case FB_VISUAL_MONO01: + pScreen->whitePixel = 0; + pScreen->blackPixel = 1; + pmap->red[0].co.local.red = 65535; + pmap->red[0].co.local.green = 65535; + pmap->red[0].co.local.blue = 65535; + pmap->red[1].co.local.red = 0; + pmap->red[1].co.local.green = 0; + pmap->red[1].co.local.blue = 0; + return TRUE; + case FB_VISUAL_MONO10: + pScreen->blackPixel = 0; + pScreen->whitePixel = 1; + pmap->red[0].co.local.red = 0; + pmap->red[0].co.local.green = 0; + pmap->red[0].co.local.blue = 0; + pmap->red[1].co.local.red = 65535; + pmap->red[1].co.local.green = 65535; + pmap->red[1].co.local.blue = 65535; + return TRUE; case FB_VISUAL_STATIC_PSEUDOCOLOR: pVisual = pmap->pVisual; nent = pVisual->ColormapEntries; diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.h b/xorg-server/hw/kdrive/fbdev/fbdev.h index 0706f4e11..f3f7aeceb 100644 --- a/xorg-server/hw/kdrive/fbdev/fbdev.h +++ b/xorg-server/hw/kdrive/fbdev/fbdev.h @@ -49,7 +49,7 @@ typedef struct _fbdevScrPriv { } FbdevScrPriv; extern KdCardFuncs fbdevFuncs; -extern char *fbdevDevicePath; +extern const char *fbdevDevicePath; Bool fbdevCardInit(KdCardInfo * card); diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c index ab77c23aa..15f9915f2 100644 --- a/xorg-server/hw/kdrive/src/kdrive.c +++ b/xorg-server/hw/kdrive/src/kdrive.c @@ -945,7 +945,8 @@ KdInitScreen(ScreenInfo * pScreenInfo, { KdCardInfo *card = screen->card; - (*card->cfuncs->scrinit) (screen); + if (!(*card->cfuncs->scrinit) (screen)) + FatalError("Screen initialization failed!\n"); if (!card->cfuncs->initAccel) screen->dumb = TRUE; |