Upgrade to 0.5.3, and add support for the GM965 chipset.

ok maintainer, sturm@
This commit is contained in:
kettenis 2007-09-17 12:14:11 +00:00
parent c1386052dd
commit 0b92ed4403
3 changed files with 108 additions and 70 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.3 2007/09/15 20:04:18 merdely Exp $
# $OpenBSD: Makefile,v 1.4 2007/09/17 12:14:11 kettenis Exp $
ONLY_FOR_ARCHS= i386 amd64
COMMENT= change resolution on available vbios modes for i8x5/9x5
DISTNAME= 915resolution-0.5.2
PKGNAME= ${DISTNAME}p0
DISTNAME= 915resolution-0.5.3
PKGNAME= ${DISTNAME}
CATEGORIES= x11
HOMEPAGE= http://www.geocities.com/stomljen/

View File

@ -1,5 +1,5 @@
MD5 (915resolution-0.5.2.tar.gz) = o0QeVmLF/x4A3JfeRIfo+A==
RMD160 (915resolution-0.5.2.tar.gz) = cis1KoP0Hw6YIu1OCW6AZPI53ME=
SHA1 (915resolution-0.5.2.tar.gz) = nybrG3KMoLLSjJSCB7A0pJtHcIk=
SHA256 (915resolution-0.5.2.tar.gz) = mIJ91a21/7XkFbKyg2QDP/wXN5ZVUFHvUpg+xd93ttQ=
SIZE (915resolution-0.5.2.tar.gz) = 21183
MD5 (915resolution-0.5.3.tar.gz) = 7Sh3eKU9AsMaempSvBRikQ==
RMD160 (915resolution-0.5.3.tar.gz) = pAbGgQu/z5TFNS6hsekXivQHhYk=
SHA1 (915resolution-0.5.3.tar.gz) = N3oy0z8Zh63zcjQcjGZk1Wc9qbg=
SHA256 (915resolution-0.5.3.tar.gz) = tkyrg0teQQvKVV3J245p9i9vAklpQvNf9KaPPyfxtUI=
SIZE (915resolution-0.5.3.tar.gz) = 22583

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
--- 915resolution.c.orig Thu Feb 2 15:28:34 2006
+++ 915resolution.c Sat Mar 31 17:23:15 2007
$OpenBSD: patch-915resolution_c,v 1.3 2007/09/17 12:14:11 kettenis Exp $
--- 915resolution.c.orig Sun Apr 15 12:46:56 2007
+++ 915resolution.c Wed Sep 12 20:47:21 2007
@@ -22,7 +22,24 @@
#include <string.h>
#include <sys/mman.h>
@ -26,7 +26,22 @@ $OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
#include <unistd.h>
#include <assert.h>
@@ -161,7 +178,7 @@ typedef struct {
@@ -56,12 +73,12 @@ typedef unsigned int cardinal;
typedef enum {
CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM,
- CT_946GZ, CT_G965, CT_Q965
+ CT_946GZ, CT_G965, CT_Q965, CT_GM965
} chipset_type;
char * chipset_type_names[] = {
"UNKNOWN", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM",
- "946GZ", "G965", "Q965"
+ "946GZ", "G965", "Q965", "GM965"
};
typedef enum {
@@ -165,7 +182,7 @@ typedef struct {
void initialize_system(char * filename) {
if (!filename) {
@ -35,7 +50,7 @@ $OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
perror("Unable to obtain the proper IO permissions");
exit(2);
}
@@ -169,7 +186,7 @@ void initialize_system(char * filename)
@@ -173,7 +190,7 @@ void initialize_system(char * filename) {
}
cardinal get_chipset_id(void) {
@ -44,7 +59,18 @@ $OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
return inl(0xcfc);
}
@@ -330,6 +347,7 @@ vbios_map * open_vbios(char * filename,
@@ -225,6 +242,10 @@ chipset_type get_chipset(cardinal id) {
type = CT_Q965;
break;
+ case 0x2a008086:
+ type = CT_GM965;
+ break;
+
default:
type = CT_UNKWN;
break;
@@ -350,6 +371,7 @@ vbios_map * open_vbios(char * filename, chipset_type f
}
}
@ -52,7 +78,7 @@ $OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
/*
* check if we have ATI Radeon
*/
@@ -378,6 +396,7 @@ vbios_map * open_vbios(char * filename,
@@ -398,6 +420,7 @@ vbios_map * open_vbios(char * filename, chipset_type f
close_vbios(map);
exit(2);
}
@ -60,60 +86,72 @@ $OpenBSD: patch-915resolution_c,v 1.2 2007/03/31 15:32:20 sturm Exp $
/*
* Figure out where the mode table is
@@ -476,11 +495,11 @@ void unlock_vbios(vbios_map * map) {
case CT_UNKWN:
break;
case CT_855GM:
- outl(0x8000005a, 0xcf8);
+ OUTL(0x8000005a, 0xcf8);
map->b1 = inb(0xcfe);
- outl(0x8000005a, 0xcf8);
- outb(0x33, 0xcfe);
+ OUTL(0x8000005a, 0xcf8);
+ OUTB(0x33, 0xcfe);
break;
case CT_845G:
case CT_865G:
@@ -488,13 +507,13 @@ void unlock_vbios(vbios_map * map) {
case CT_915GM:
case CT_945G:
case CT_945GM:
- outl(0x80000090, 0xcf8);
+ OUTL(0x80000090, 0xcf8);
map->b1 = inb(0xcfd);
map->b2 = inb(0xcfe);
- outl(0x80000090, 0xcf8);
- outb(0x33, 0xcfd);
- outb(0x33, 0xcfe);
+ OUTL(0x80000090, 0xcf8);
+ OUTB(0x33, 0xcfd);
+ OUTB(0x33, 0xcfe);
break;
}
@@ -496,11 +519,11 @@ void unlock_vbios(vbios_map * map) {
break;
case CT_830:
case CT_855GM:
- outl(0x8000005a, 0xcf8);
+ OUTL(0x8000005a, 0xcf8);
map->b1 = inb(0xcfe);
- outl(0x8000005a, 0xcf8);
- outb(0x33, 0xcfe);
+ OUTL(0x8000005a, 0xcf8);
+ OUTB(0x33, 0xcfe);
break;
case CT_845G:
case CT_865G:
@@ -511,13 +534,14 @@ void unlock_vbios(vbios_map * map) {
case CT_946GZ:
case CT_G965:
case CT_Q965:
- outl(0x80000090, 0xcf8);
+ case CT_GM965:
+ OUTL(0x80000090, 0xcf8);
map->b1 = inb(0xcfd);
map->b2 = inb(0xcfe);
- outl(0x80000090, 0xcf8);
- outb(0x33, 0xcfd);
- outb(0x33, 0xcfe);
+ OUTL(0x80000090, 0xcf8);
+ OUTB(0x33, 0xcfd);
+ OUTB(0x33, 0xcfe);
break;
}
@@ -526,8 +545,8 @@ void relock_vbios(vbios_map * map) {
case CT_UNKWN:
break;
case CT_855GM:
- outl(0x8000005a, 0xcf8);
- outb(map->b1, 0xcfe);
+ OUTL(0x8000005a, 0xcf8);
+ OUTB(map->b1, 0xcfe);
break;
case CT_845G:
case CT_865G:
@@ -535,9 +554,9 @@ void relock_vbios(vbios_map * map) {
case CT_915GM:
case CT_945G:
case CT_945GM:
- outl(0x80000090, 0xcf8);
- outb(map->b1, 0xcfd);
- outb(map->b2, 0xcfe);
+ OUTL(0x80000090, 0xcf8);
+ OUTB(map->b1, 0xcfd);
+ OUTB(map->b2, 0xcfe);
break;
}
@@ -539,8 +563,8 @@ void relock_vbios(vbios_map * map) {
break;
case CT_830:
case CT_855GM:
- outl(0x8000005a, 0xcf8);
- outb(map->b1, 0xcfe);
+ OUTL(0x8000005a, 0xcf8);
+ OUTB(map->b1, 0xcfe);
break;
case CT_845G:
case CT_865G:
@@ -551,9 +575,10 @@ void relock_vbios(vbios_map * map) {
case CT_946GZ:
case CT_G965:
case CT_Q965:
- outl(0x80000090, 0xcf8);
- outb(map->b1, 0xcfd);
- outb(map->b2, 0xcfe);
+ case CT_GM965:
+ OUTL(0x80000090, 0xcf8);
+ OUTB(map->b1, 0xcfd);
+ OUTB(map->b2, 0xcfe);
break;
}
@@ -811,6 +836,9 @@ int parse_args(int argc, char *argv[], char ** filenam
}
else if (!strcmp(argv[index], "Q965")) {
*forced_chipset = CT_Q965;
+ }
+ else if (!strcmp(argv[index], "GM965")) {
+ *forced_chipset = CT_GM965;
}
else {
*forced_chipset = CT_UNKWN;