Module Name: src
Committed By: tsutsui
Date: Fri Feb 10 11:25:43 UTC 2012
Modified Files:
src/distrib/sets/lists/xserver: md.zaurus
src/external/mit/xorg/etc/etc.zaurus: Makefile.inc
src/sys/arch/zaurus/dev: w100lcd.c
Added Files:
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0
Removed Files:
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.sample
Log Message:
More SL-C7x0/860 support for Xorg server usage:
- pull touchpanel adjustment ioctls to w100lcd.c for SL-C7x0/860
from zlcd.c for SL-C1000/3x00
- add sample xorg.conf for C7x0/860 (which have hardware screen rotation)
- rename old xorg.conf.sample for C1000/C3x00 to xorg.conf.C3x00
- adjust md set list
Ok releng@ nonaka@
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/xserver/md.zaurus
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/etc/etc.zaurus/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0
cvs rdiff -u -r1.1 -r0 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/w100lcd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/xserver/md.zaurus
diff -u src/distrib/sets/lists/xserver/md.zaurus:1.8 src/distrib/sets/lists/xserver/md.zaurus:1.9
--- src/distrib/sets/lists/xserver/md.zaurus:1.8 Wed Aug 3 01:43:26 2011
+++ src/distrib/sets/lists/xserver/md.zaurus Fri Feb 10 11:25:42 2012
@@ -1,5 +1,7 @@
-# $NetBSD: md.zaurus,v 1.8 2011/08/03 01:43:26 mrg Exp $
-./etc/X11/xorg.conf.sample -unknown- xorg
+# $NetBSD: md.zaurus,v 1.9 2012/02/10 11:25:42 tsutsui Exp $
+./etc/X11/xorg.conf.sample -unknown- obsolete
+./etc/X11/xorg.conf.C3x00 -unknown- xorg
+./etc/X11/xorg.conf.C7x0 -unknown- xorg
./usr/X11R7/bin/X -unknown- xorg
./usr/X11R7/bin/Xorg -unknown- xorg
./usr/X11R7/bin/cvt -unknown- xorg
Index: src/external/mit/xorg/etc/etc.zaurus/Makefile.inc
diff -u src/external/mit/xorg/etc/etc.zaurus/Makefile.inc:1.2 src/external/mit/xorg/etc/etc.zaurus/Makefile.inc:1.3
--- src/external/mit/xorg/etc/etc.zaurus/Makefile.inc:1.2 Sun May 22 16:08:48 2011
+++ src/external/mit/xorg/etc/etc.zaurus/Makefile.inc Fri Feb 10 11:25:43 2012
@@ -1,3 +1,3 @@
-# $NetBSD: Makefile.inc,v 1.2 2011/05/22 16:08:48 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2012/02/10 11:25:43 tsutsui Exp $
-XORGCONF_FILES= etc.${MACHINE}/xorg.conf.sample
+XORGCONF_FILES= etc.${MACHINE}/xorg.conf.C3x00 etc.${MACHINE}/xorg.conf.C7x0
Index: src/sys/arch/zaurus/dev/w100lcd.c
diff -u src/sys/arch/zaurus/dev/w100lcd.c:1.1 src/sys/arch/zaurus/dev/w100lcd.c:1.2
--- src/sys/arch/zaurus/dev/w100lcd.c:1.1 Sun Jan 29 10:12:42 2012
+++ src/sys/arch/zaurus/dev/w100lcd.c Fri Feb 10 11:25:42 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: w100lcd.c,v 1.1 2012/01/29 10:12:42 tsutsui Exp $ */
+/* $NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $ */
/*
* Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved.
* Written by Hiroyuki Bessho for Genetec Corporation.
@@ -39,7 +39,7 @@
* LCD on/off switch and backlight brightness are done in lcdctl.c.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.1 2012/01/29 10:12:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v
#include <dev/rasops/rasops.h>
#include <dev/wsfont/wsfont.h>
+#include <dev/hpc/hpcfbio.h>
+
#include <arm/xscale/pxa2x0var.h>
#include <zaurus/dev/w100var.h>
@@ -188,6 +190,9 @@ static int
w100lcd_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
struct lwp *l)
{
+ struct w100_softc *sc = (struct w100_softc *)v;
+ struct hpcfb_fbconf *fbconf;
+ struct hpcfb_dspconf *dspconf;
int res = EINVAL;
switch (cmd) {
@@ -197,6 +202,112 @@ w100lcd_ioctl(void *v, void *vs, u_long
res = lcdctl_param(cmd, (struct wsdisplay_param *)data);
break;
#endif
+ case HPCFBIO_GCONF:
+ fbconf = (struct hpcfb_fbconf *)data;
+ if (fbconf->hf_conf_index != 0 &&
+ fbconf->hf_conf_index != HPCFB_CURRENT_CONFIG) {
+ break;
+ }
+
+ fbconf->hf_conf_index = 0;
+ fbconf->hf_nconfs = 1;
+ fbconf->hf_class = HPCFB_CLASS_RGBCOLOR;
+ strlcpy(fbconf->hf_name, "Sharp Zaurus frame buffer",
+ sizeof(fbconf->hf_name));
+ strlcpy(fbconf->hf_conf_name, "default",
+ sizeof(fbconf->hf_conf_name));
+ fbconf->hf_width = sc->display_width;
+ fbconf->hf_height = sc->display_height;
+ fbconf->hf_baseaddr = (u_long)sc->active->buf_va;
+ fbconf->hf_offset = 0;
+ fbconf->hf_bytes_per_line = sc->display_width *
+ sc->active->depth / 8;
+ fbconf->hf_nplanes = 1;
+ fbconf->hf_bytes_per_plane = sc->display_width *
+ sc->display_height * sc->active->depth / 8;
+ fbconf->hf_pack_width = sc->active->depth;
+ fbconf->hf_pixels_per_pack = 1;
+ fbconf->hf_pixel_width = sc->active->depth;
+ fbconf->hf_access_flags = (0
+ | HPCFB_ACCESS_BYTE
+ | HPCFB_ACCESS_WORD
+ | HPCFB_ACCESS_DWORD);
+ fbconf->hf_order_flags = 0;
+ fbconf->hf_reg_offset = 0;
+
+ fbconf->hf_class_data_length = sizeof(struct hf_rgb_tag);
+ fbconf->hf_u.hf_rgb.hf_flags = 0;
+ fbconf->hf_u.hf_rgb.hf_red_width = 5;
+ fbconf->hf_u.hf_rgb.hf_red_shift = 11;
+ fbconf->hf_u.hf_rgb.hf_green_width = 6;
+ fbconf->hf_u.hf_rgb.hf_green_shift = 5;
+ fbconf->hf_u.hf_rgb.hf_blue_width = 5;
+ fbconf->hf_u.hf_rgb.hf_blue_shift = 0;
+ fbconf->hf_u.hf_rgb.hf_alpha_width = 0;
+ fbconf->hf_u.hf_rgb.hf_alpha_shift = 0;
+
+ fbconf->hf_ext_size = 0;
+ fbconf->hf_ext_data = NULL;
+
+ res = 0;
+ break;
+
+ case HPCFBIO_SCONF:
+ fbconf = (struct hpcfb_fbconf *)data;
+ if (fbconf->hf_conf_index != 0 &&
+ fbconf->hf_conf_index != HPCFB_CURRENT_CONFIG) {
+ break;
+ }
+ /* nothing to do because we have only one configuration */
+ res = 0;
+ break;
+
+ case HPCFBIO_GDSPCONF:
+ dspconf = (struct hpcfb_dspconf *)data;
+ if ((dspconf->hd_unit_index != 0 &&
+ dspconf->hd_unit_index != HPCFB_CURRENT_UNIT) ||
+ (dspconf->hd_conf_index != 0 &&
+ dspconf->hd_conf_index != HPCFB_CURRENT_CONFIG)) {
+ break;
+ }
+
+ dspconf->hd_unit_index = 0;
+ dspconf->hd_nunits = 1;
+ dspconf->hd_class = HPCFB_DSP_CLASS_COLORLCD;
+ strlcpy(dspconf->hd_name, "Sharp Zaurus LCD",
+ sizeof(dspconf->hd_name));
+ dspconf->hd_op_flags = 0;
+ dspconf->hd_conf_index = 0;
+ dspconf->hd_nconfs = 1;
+ strlcpy(dspconf->hd_conf_name, "default",
+ sizeof(dspconf->hd_conf_name));
+ dspconf->hd_width = sc->display_width;
+ dspconf->hd_height = sc->display_height;
+ dspconf->hd_xdpi = HPCFB_DSP_DPI_UNKNOWN;
+ dspconf->hd_ydpi = HPCFB_DSP_DPI_UNKNOWN;
+
+ res = 0;
+ break;
+
+ case HPCFBIO_SDSPCONF:
+ dspconf = (struct hpcfb_dspconf *)data;
+ if ((dspconf->hd_unit_index != 0 &&
+ dspconf->hd_unit_index != HPCFB_CURRENT_UNIT) ||
+ (dspconf->hd_conf_index != 0 &&
+ dspconf->hd_conf_index != HPCFB_CURRENT_CONFIG)) {
+ break;
+ }
+ /*
+ * nothing to do
+ * because we have only one unit and one configuration
+ */
+ res = 0;
+ break;
+
+ case HPCFBIO_GOP:
+ case HPCFBIO_SOP:
+ /* curently not implemented... */
+ break;
default:
break;
Added files:
Index: src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00
diff -u /dev/null src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00:1.1
--- /dev/null Fri Feb 10 11:25:43 2012
+++ src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 Fri Feb 10 11:25:43 2012
@@ -0,0 +1,57 @@
+# $NetBSD: xorg.conf.C3x00,v 1.1 2012/02/10 11:25:43 tsutsui Exp $
+
+Section "ServerLayout"
+ Identifier "wsfb"
+ Screen 0 "Screen0" 0 0
+ InputDevice "TouchScreen0" "CorePointer"
+ InputDevice "Keyboard0" "CoreKeyboard"
+EndSection
+
+Section "Files"
+# FontPath "/usr/pkg/lib/X11/fonts/TTF/"
+EndSection
+
+Section "InputDevice"
+ Identifier "Keyboard0"
+ Driver "kbd"
+ Option "XkbModel" "sl-c3x00"
+EndSection
+
+Section "InputDevice"
+ Identifier "TouchScreen0"
+ Driver "ws"
+
+ Option "device" "/dev/wsmouse"
+ Option "ZAxisMapping" "4 5"
+
+ Option "MinX" "0"
+ Option "MaxX" "479"
+ Option "MinY" "0"
+ Option "MaxY" "639"
+
+ Option "Rotate" "CW"
+EndSection
+
+Section "Device"
+ Identifier "Wsdisplay0"
+ Driver "wsfb"
+
+ Option "Rotate" "CW"
+EndSection
+
+Section "Monitor"
+ Identifier "Monitor"
+ VendorName "Sharp"
+ ModelName "Zaurus"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Wsdisplay0"
+ Monitor "Monitor"
+ DefaultDepth 16
+
+ SubSection "Display"
+ Depth 16
+ EndSubSection
+EndSection
Index: src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0
diff -u /dev/null src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0:1.1
--- /dev/null Fri Feb 10 11:25:43 2012
+++ src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0 Fri Feb 10 11:25:43 2012
@@ -0,0 +1,57 @@
+# $NetBSD: xorg.conf.C7x0,v 1.1 2012/02/10 11:25:43 tsutsui Exp $
+
+Section "ServerLayout"
+ Identifier "wsfb"
+ Screen 0 "Screen0" 0 0
+ InputDevice "TouchScreen0" "CorePointer"
+ InputDevice "Keyboard0" "CoreKeyboard"
+EndSection
+
+Section "Files"
+# FontPath "/usr/pkg/lib/X11/fonts/TTF/"
+EndSection
+
+Section "InputDevice"
+ Identifier "Keyboard0"
+ Driver "kbd"
+ Option "XkbModel" "sl-c3x00"
+EndSection
+
+Section "InputDevice"
+ Identifier "TouchScreen0"
+ Driver "ws"
+
+ Option "device" "/dev/wsmouse"
+ Option "ZAxisMapping" "4 5"
+
+ Option "MinX" "0"
+ Option "MaxX" "639"
+ Option "MinY" "0"
+ Option "MaxY" "479"
+
+# Option "Rotate" "CW"
+EndSection
+
+Section "Device"
+ Identifier "Wsdisplay0"
+ Driver "wsfb"
+
+# Option "Rotate" "CW"
+EndSection
+
+Section "Monitor"
+ Identifier "Monitor"
+ VendorName "Sharp"
+ ModelName "Zaurus"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Wsdisplay0"
+ Monitor "Monitor"
+ DefaultDepth 16
+
+ SubSection "Display"
+ Depth 16
+ EndSubSection
+EndSection