summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-01-02 14:04:56 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-01-02 14:04:56 +0000
commitd3ec9b4549a8aaf996e499441cb7360b49c24768 (patch)
treea1329119cf479ca9c6462aadb48489d6ee5aa566
parent22c5e9813525e5b696a415210da9163a41d65b9c (diff)
Revert some bits of previous commit that leaked in by accident.
-rw-r--r--driver/xf86-video-wsfb/src/wsfb_driver.c48
1 files changed, 12 insertions, 36 deletions
diff --git a/driver/xf86-video-wsfb/src/wsfb_driver.c b/driver/xf86-video-wsfb/src/wsfb_driver.c
index 2fe91a03e..ce54d1c19 100644
--- a/driver/xf86-video-wsfb/src/wsfb_driver.c
+++ b/driver/xf86-video-wsfb/src/wsfb_driver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsfb_driver.c,v 1.8 2007/01/02 13:54:05 matthieu Exp $ */
+/* $OpenBSD: wsfb_driver.c,v 1.9 2007/01/02 14:04:55 matthieu Exp $ */
/*
* Copyright (c) 2001 Matthieu Herrb
* All rights reserved.
@@ -43,9 +43,6 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <machine/cpu.h>
#include <dev/wscons/wsconsio.h>
/* all driver need this */
@@ -91,7 +88,7 @@ extern int priv_open_device(const char *);
#define WSFB_DEFAULT_DEV "/dev/ttyC0"
#endif
-#define DEBUG 1
+#define DEBUG 0
#if DEBUG
# define TRACE_ENTER(str) ErrorF("wsfb: " str " %d\n",pScrn->scrnIndex)
@@ -364,8 +361,7 @@ wsfb_mmap(size_t len, off_t off, int fd)
static Bool
WsfbProbe(DriverPtr drv, int flags)
{
- int i, fd, entity, mib[2], allowaperture;
- size_t len;
+ int i, fd, entity;
GDevPtr *devSections;
int numDevSections;
char *dev;
@@ -381,19 +377,6 @@ WsfbProbe(DriverPtr drv, int flags)
&devSections)) <= 0)
return FALSE;
-#ifdef CPU_ALLOWAPERTURE
- mib[0] = CTL_MACHDEP;
- mib[1] = CPU_ALLOWAPERTURE;
- len = sizeof(allowaperture);
- if (sysctl(mib, 2, &allowaperture, &len, NULL, 0) == -1) {
- ErrorF("sysctl: %s\n", strerror(errno));
- return FALSE;
- }
- if (allowaperture > 0) {
- /* Don't attach if aperture driver is active */
- return FALSE;
- }
-#endif
for (i = 0; i < numDevSections; i++) {
ScrnInfoPtr pScrn = NULL;
@@ -424,9 +407,6 @@ WsfbProbe(DriverPtr drv, int flags)
}
xfree(devSections);
TRACE("probe done");
-#if DEBUG
- ErrorF("foundScreen: %d\n", foundScreen);
-#endif
return foundScreen;
}
@@ -530,12 +510,10 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
if (wstype == WSDISPLAY_TYPE_PCIVGA) {
- struct wsdisplay_gfx_mode gfxmode;
-
- gfxmode.depth = pScrn->bitsPerPixel;
/* Set specified mode */
if (pScrn->display->modes != NULL &&
pScrn->display->modes[0] != NULL) {
+ struct wsdisplay_gfx_mode gfxmode;
if (sscanf(pScrn->display->modes[0], "%dx%d",
&gfxmode.width, &gfxmode.height) != 2) {
@@ -544,16 +522,14 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags)
pScrn->display->modes[0]);
return FALSE;
}
- } else {
- gfxmode.width = 1024;
- gfxmode.height = 768;
- }
- if (ioctl(fPtr->fd, WSDISPLAYIO_SETGFXMODE,
- &gfxmode) == -1) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "ioctl WSDISPLAY_SETGFXMODE: %s\n",
- strerror(errno));
- return FALSE;
+ gfxmode.depth = pScrn->bitsPerPixel;
+ if (ioctl(fPtr->fd, WSDISPLAYIO_SETGFXMODE,
+ &gfxmode) == -1) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "ioctl WSDISPLAY_SETGFXMODE: %s\n",
+ strerror(errno));
+ return FALSE;
+ }
}
}
if (ioctl(fPtr->fd, WSDISPLAYIO_GINFO, &fPtr->info) == -1) {