Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-wsfb/dist/src wsfb: add 8bpp plana...
details: https://anonhg.NetBSD.org/xsrc/rev/2cb1727f8999
branches: trunk
changeset: 7142:2cb1727f8999
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue Aug 30 15:09:51 2022 +0000
description:
wsfb: add 8bpp planar support for LUNA using amiga's Afb.
Reviewed on tech-x11@:
https://mail-index.netbsd.org/tech-x11/2022/08/23/msg002311.html
Confirmed on my LUNA-II with 8bpp board.
diffstat:
external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c | 36 +++++++++++++++-----
1 files changed, 27 insertions(+), 9 deletions(-)
diffs (56 lines):
diff -r add966ed8890 -r 2cb1727f8999 external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
--- a/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Tue Aug 30 15:08:49 2022 +0000
+++ b/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Tue Aug 30 15:09:51 2022 +0000
@@ -568,17 +568,31 @@
#if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_LUNA)
if (wstype == WSDISPLAY_TYPE_LUNA) {
/*
- * XXX
* LUNA's color framebuffers support 4bpp or 8bpp
* but they have multiple 1bpp VRAM planes like ancient VGA.
- * For now, Xorg server supports only the first one plane
- * as 1bpp monochrome server.
- *
- * Note OpenBSD/luna88k workarounds this by switching depth
- * and palette settings by WSDISPLAYIO_SETGFXMODE ioctl.
*/
- default_depth = 1;
- bitsperpixel = 1;
+#ifdef HAVE_SHADOW_AFB
+ if (bitsperpixel == 8) {
+ /*
+ * For 8bpp one, we can use the bitplane ops with
+ * shadow update proc as amiga.
+ */
+ fPtr->planarAfb = TRUE;
+ } else
+#endif
+ {
+ /*
+ * For 4bpp one (or there is no planar support),
+ * just use only the first one plane
+ * as 1bpp monochrome server.
+ *
+ * Note OpenBSD/luna88k workarounds this by
+ * switching depth and palette settings by
+ * WSDISPLAYIO_SETGFXMODE ioctl.
+ */
+ default_depth = 1;
+ bitsperpixel = 1;
+ }
}
#endif
#ifdef WSDISPLAY_TYPE_AMIGACC
@@ -1187,7 +1201,11 @@
#if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_LUNA)
if (wstype == WSDISPLAY_TYPE_LUNA) {
ncolors = fPtr->fbi.fbi_subtype.fbi_cmapinfo.cmap_entries;
- if (ncolors > 0) {
+ if (ncolors > 0
+#ifdef HAVE_SHADOW_AFB
+ && !fPtr->planarAfb
+#endif
+ ) {
/*
* Override palette to use 4bpp/8bpp framebuffers as
* monochrome server by using only the first plane.
Home |
Main Index |
Thread Index |
Old Index