50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
$NetBSD: patch-aa,v 1.2 2003/08/13 13:58:57 mrg Exp $
|
|
|
|
--- atitvout.c.orig 2002-09-17 05:37:08.000000000 +1000
|
|
+++ atitvout.c 2003-08-13 23:53:57.000000000 +1000
|
|
@@ -17,7 +17,13 @@
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
+#ifdef __linux__
|
|
#include <sys/io.h>
|
|
+#endif
|
|
+#ifdef __NetBSD__
|
|
+#include <sys/types.h>
|
|
+#include <machine/sysarch.h>
|
|
+#endif
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
|
|
@@ -98,8 +104,21 @@
|
|
return 0;
|
|
}
|
|
|
|
+#ifdef __linux__
|
|
ioperm(0, 1024, 1);
|
|
iopl(3);
|
|
+#endif
|
|
+#ifdef __NetBSD__
|
|
+ {
|
|
+#define FF 0xFFFFFFFF
|
|
+#define FF8 FF, FF, FF, FF, FF, FF, FF, FF
|
|
+ u_long map[] = { FF8, FF8, FF8, FF8 };
|
|
+#undef FF
|
|
+#undef FF8
|
|
+ i386_set_ioperm(map);
|
|
+ }
|
|
+ i386_iopl(3);
|
|
+#endif
|
|
|
|
if (!LRMI_init()) {
|
|
fprintf(stderr, "Could not initialise LRMI.\n");
|
|
@@ -118,6 +137,8 @@
|
|
} else {
|
|
if (strncmp(oem, "ATI MACH64", 10) == 0)
|
|
radeon = 0;
|
|
+ else if (strcmp(oem, "ATI MOBILITY RADEON 9000") == 0)
|
|
+ radeon = 0;
|
|
else if (strncmp(oem, "ATI RAGE128", 11) == 0)
|
|
radeon = 1;
|
|
/* Note: Also it's possible to have here 'RG6' for first radeons */
|