Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src More SL-C7x0/860 support for Xorg server usage:
details: https://anonhg.NetBSD.org/src/rev/b617d32cd95d
branches: trunk
changeset: 773628:b617d32cd95d
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Feb 10 11:25:42 2012 +0000
description:
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@
diffstat:
distrib/sets/lists/xserver/md.zaurus | 6 +-
external/mit/xorg/etc/etc.zaurus/Makefile.inc | 4 +-
external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 | 57 ++++++++++
external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0 | 57 ++++++++++
external/mit/xorg/etc/etc.zaurus/xorg.conf.sample | 57 ----------
sys/arch/zaurus/dev/w100lcd.c | 115 +++++++++++++++++++++-
6 files changed, 233 insertions(+), 63 deletions(-)
diffs (truncated from 355 to 300 lines):
diff -r 81978319ceb4 -r b617d32cd95d distrib/sets/lists/xserver/md.zaurus
--- a/distrib/sets/lists/xserver/md.zaurus Fri Feb 10 09:17:49 2012 +0000
+++ b/distrib/sets/lists/xserver/md.zaurus Fri Feb 10 11:25:42 2012 +0000
@@ -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
diff -r 81978319ceb4 -r b617d32cd95d external/mit/xorg/etc/etc.zaurus/Makefile.inc
--- a/external/mit/xorg/etc/etc.zaurus/Makefile.inc Fri Feb 10 09:17:49 2012 +0000
+++ b/external/mit/xorg/etc/etc.zaurus/Makefile.inc Fri Feb 10 11:25:42 2012 +0000
@@ -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
diff -r 81978319ceb4 -r b617d32cd95d external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 Fri Feb 10 11:25:42 2012 +0000
@@ -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
diff -r 81978319ceb4 -r b617d32cd95d external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0 Fri Feb 10 11:25:42 2012 +0000
@@ -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
diff -r 81978319ceb4 -r b617d32cd95d external/mit/xorg/etc/etc.zaurus/xorg.conf.sample
--- a/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample Fri Feb 10 09:17:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-# $NetBSD: xorg.conf.sample,v 1.1 2011/05/21 11:38:52 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
diff -r 81978319ceb4 -r b617d32cd95d sys/arch/zaurus/dev/w100lcd.c
--- a/sys/arch/zaurus/dev/w100lcd.c Fri Feb 10 09:17:49 2012 +0000
+++ b/sys/arch/zaurus/dev/w100lcd.c Fri Feb 10 11:25:42 2012 +0000
@@ -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 @@
#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 @@
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 @@
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) {
Home |
Main Index |
Thread Index |
Old Index