summaryrefslogtreecommitdiff
path: root/hw/kdrive/fbdev/fbdev.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-03-10 17:17:26 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-04-18 13:10:26 +0200
commit0e808110df216649e05503baecd06cd5a3e50421 (patch)
treea026b866de825a8279debc9f2dbde03500555650 /hw/kdrive/fbdev/fbdev.c
parentcfd10576812c36f5844805eb95ed1f2d093d1691 (diff)
Xfbdev: Reject unsupported frame buffer types
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/kdrive/fbdev/fbdev.c')
-rw-r--r--hw/kdrive/fbdev/fbdev.c75
1 files changed, 50 insertions, 25 deletions
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index ebbfeb9ca..f31635d29 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -402,33 +402,58 @@ 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;
- break;
- case RR_Rotate_270:
- if (useYX)
- update = shadowUpdateRotate16_270YX;
- else
- update = shadowUpdateRotate16_270;
- break;
- default:
- update = shadowUpdateRotate16;
- break;
+ 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 = shadowUpdateRotatePacked;
- else
- update = shadowUpdatePacked;
+ update = shadowUpdatePacked;
+ break;
+
+ case FB_TYPE_PLANES:
+ FatalError("Bitplanes are not yet supported\n");
+ break;
+
+ case FB_TYPE_INTERLEAVED_PLANES:
+ FatalError("Interleaved bitplanes are not yet supported\n");
+ 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);
}