View | Details | Raw Unified | Return to bug 112922
Collapse All | Expand All

(-)915resolution/Makefile (-4 / +13 lines)
Lines 5-12 Link Here
5
# $FreeBSD: ports/sysutils/915resolution/Makefile,v 1.5 2006/11/05 09:57:49 lawrance Exp $
5
# $FreeBSD: ports/sysutils/915resolution/Makefile,v 1.5 2006/11/05 09:57:49 lawrance Exp $
6
6
7
PORTNAME=	915resolution
7
PORTNAME=	915resolution
8
PORTVERSION=	0.5.2
8
PORTVERSION=	0.5.3
9
PORTREVISION=	1
9
PORTREVISION=	0
10
PORTEPOCH=	1
10
PORTEPOCH=	1
11
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
12
MASTER_SITES=	http://www.geocities.com/stomljen/ \
12
MASTER_SITES=	http://www.geocities.com/stomljen/ \
Lines 16-23 Link Here
16
MAINTAINER=	MrL0Lz@gmail.com
16
MAINTAINER=	MrL0Lz@gmail.com
17
COMMENT=	Resolution tool for Intel i915 video cards
17
COMMENT=	Resolution tool for Intel i915 video cards
18
18
19
PLIST_FILES=	bin/915resolution
19
USE_RC_SUBR=	915resolution.sh
20
20
ALL_TARGET=	915resolution
21
ALL_TARGET=	915resolution
22
PLIST_FILES=	sbin/915resolution
23
PORTDOCS=	README.txt chipset_info.txt
21
24
22
ONLY_FOR_ARCHS=	i386
25
ONLY_FOR_ARCHS=	i386
23
26
Lines 32-37 Link Here
32
		${CC} ${CFLAGS} 915resolution.c -o 915resolution
35
		${CC} ${CFLAGS} 915resolution.c -o 915resolution
33
36
34
do-install:
37
do-install:
35
	${INSTALL_PROGRAM} ${WRKSRC}/915resolution ${PREFIX}/bin
38
	${INSTALL_PROGRAM} ${WRKSRC}/915resolution ${PREFIX}/sbin
39
.if !defined(NOPORTDOCS)
40
	${INSTALL} -o ${DOCOWN} -g ${DOCGRP} -m ${BINMODE} -d ${DOCSDIR}
41
.for f in ${PORTDOCS}
42
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
43
.endfor
44
.endif
36
45
37
.include <bsd.port.post.mk>
46
.include <bsd.port.post.mk>
(-)915resolution/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (915resolution-0.5.2.tar.gz) = a3441e5662c5ff1e00dc97de4487e8f8
1
MD5 (915resolution-0.5.3.tar.gz) = ed287778a53d02c31a7a6a52bc146291
2
SHA256 (915resolution-0.5.2.tar.gz) = 98827dd5adb5ffb5e415b2b28364033ffc173796555051ef52983ec5df77b6d4
2
SHA256 (915resolution-0.5.3.tar.gz) = b64cab834b5e410bca555dc9db8e69f62f6f02496942f35ff4a68f3f27f1b542
3
SIZE (915resolution-0.5.2.tar.gz) = 21183
3
SIZE (915resolution-0.5.3.tar.gz) = 22583
(-)915resolution/files/915resolution.sh.in (+44 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: $
4
#
5
6
# PROVIDE: i915resolution
7
# REQUIRE: mountcritremote
8
# BEFORE:  SERVERS
9
# KEYWORD: nojail
10
11
# Define these i915resolution_* variables in one of these files:
12
#	/etc/rc.conf
13
#	/etc/rc.conf.local
14
#	/etc/rc.conf.d/i915resolution
15
#
16
# DO NOT CHANGE THESE DEFAULT VALUES HERE
17
#
18
i915resolution_enable=${i915resolution_enable:-"NO"}	# Enable hacking VBIOS resolution (YES/NO)
19
i915resolution_modes=${i915resolution_modes:-"3c 4d 5c"}# Space separated list of modes to set
20
i915resolution_width=${i915resolution_width:-"1920"}	# the horisontal resolution in pixels
21
i915resolution_hight=${i915resolution_hight:-"1080"}	# the vertical resolution in pixels
22
23
. %%RC_SUBR%%
24
25
name="i915resolution"
26
rcvar=`set_rcvar`
27
command="%%PREFIX%%/sbin/915resolution"
28
start_cmd="${name}_start"
29
stop_cmd=":"
30
status_cmd="${command} -l"
31
extra_commands="status"
32
33
i915resolution_start()
34
{
35
	local mode
36
37
	${status_cmd} | grep '^Chipset:'
38
	for mode in ${i915resolution_modes}; do
39
		${command} ${mode} ${i915resolution_width} ${i915resolution_hight} | tail -n 1
40
	done
41
}
42
43
load_rc_config $name
44
run_rc_command "$1"
(-)915resolution/files/patch-915resolution.c (-59 / +59 lines)
Lines 1-5 Link Here
1
--- 915resolution.c.orig	Fri Feb  3 01:28:34 2006
1
--- 915resolution.c.orig	Sun Apr 15 06:46:56 2007
2
+++ 915resolution.c	Sun Oct 15 20:39:56 2006
2
+++ 915resolution.c	Sun Apr 15 06:46:56 2007
3
@@ -21,8 +21,10 @@
3
@@ -21,8 +21,10 @@
4
 #define __USE_GNU
4
 #define __USE_GNU
5
 #include <string.h>
5
 #include <string.h>
Lines 12-18 Link Here
12
 #include <unistd.h>
12
 #include <unistd.h>
13
 #include <assert.h>
13
 #include <assert.h>
14
 
14
 
15
@@ -161,7 +163,8 @@
15
@@ -165,7 +167,8 @@
16
 void initialize_system(char * filename) {
16
 void initialize_system(char * filename) {
17
 
17
 
18
     if (!filename) {
18
     if (!filename) {
Lines 22-28 Link Here
22
             perror("Unable to obtain the proper IO permissions");
22
             perror("Unable to obtain the proper IO permissions");
23
             exit(2);
23
             exit(2);
24
         }
24
         }
25
@@ -169,7 +172,7 @@
25
@@ -173,7 +176,7 @@
26
 }
26
 }
27
 
27
 
28
 cardinal get_chipset_id(void) {
28
 cardinal get_chipset_id(void) {
Lines 31-90 Link Here
31
     return inl(0xcfc);
31
     return inl(0xcfc);
32
 }
32
 }
33
 
33
 
34
@@ -476,11 +479,11 @@
34
@@ -496,11 +499,11 @@
35
         case CT_UNKWN:
35
         break;
36
             break;
36
     case CT_830:
37
         case CT_855GM:
37
     case CT_855GM:
38
-            outl(0x8000005a, 0xcf8);
38
-        outl(0x8000005a, 0xcf8);
39
+            OUTL(0x8000005a, 0xcf8);
39
+        OUTL(0x8000005a, 0xcf8);
40
             map->b1 = inb(0xcfe);
40
         map->b1 = inb(0xcfe);
41
             
41
         
42
-            outl(0x8000005a, 0xcf8);
42
-        outl(0x8000005a, 0xcf8);
43
-            outb(0x33, 0xcfe);
43
-        outb(0x33, 0xcfe);
44
+            OUTL(0x8000005a, 0xcf8);
44
+        OUTL(0x8000005a, 0xcf8);
45
+            OUTB(0x33, 0xcfe);
45
+        OUTB(0x33, 0xcfe);
46
             break;
46
         break;
47
         case CT_845G:
47
     case CT_845G:
48
         case CT_865G:
48
     case CT_865G:
49
@@ -488,13 +491,13 @@
49
@@ -511,13 +514,13 @@
50
         case CT_915GM:
50
     case CT_946GZ:
51
         case CT_945G:
51
     case CT_G965:
52
         case CT_945GM:
52
     case CT_Q965:
53
-            outl(0x80000090, 0xcf8);
53
-        outl(0x80000090, 0xcf8);
54
+            OUTL(0x80000090, 0xcf8);
54
+        OUTL(0x80000090, 0xcf8);
55
             map->b1 = inb(0xcfd);
55
         map->b1 = inb(0xcfd);
56
             map->b2 = inb(0xcfe);
56
         map->b2 = inb(0xcfe);
57
             
57
         
58
-            outl(0x80000090, 0xcf8);
58
-        outl(0x80000090, 0xcf8);
59
-            outb(0x33, 0xcfd);
59
-        outb(0x33, 0xcfd);
60
-            outb(0x33, 0xcfe);
60
-        outb(0x33, 0xcfe);
61
+            OUTL(0x80000090, 0xcf8);
61
+        OUTL(0x80000090, 0xcf8);
62
+            OUTB(0x33, 0xcfd);
62
+        OUTB(0x33, 0xcfd);
63
+            OUTB(0x33, 0xcfe);
63
+        OUTB(0x33, 0xcfe);
64
             break;
64
         break;
65
         }
66
     }
65
     }
67
@@ -526,8 +529,8 @@
66
 
68
         case CT_UNKWN:
67
@@ -539,8 +542,8 @@
69
             break;
68
         break;
70
         case CT_855GM:
69
     case CT_830:
71
-            outl(0x8000005a, 0xcf8);
70
     case CT_855GM:
72
-            outb(map->b1, 0xcfe);
71
-        outl(0x8000005a, 0xcf8);
73
+            OUTL(0x8000005a, 0xcf8);
72
-        outb(map->b1, 0xcfe);
74
+            OUTB(map->b1, 0xcfe);
73
+        OUTL(0x8000005a, 0xcf8);
75
             break;
74
+        OUTB(map->b1, 0xcfe);
76
         case CT_845G:
75
         break;
77
         case CT_865G:
76
     case CT_845G:
78
@@ -535,9 +538,9 @@
77
     case CT_865G:
79
         case CT_915GM:
78
@@ -551,9 +554,9 @@
80
         case CT_945G:
79
     case CT_946GZ:
81
         case CT_945GM:
80
     case CT_G965:
82
-            outl(0x80000090, 0xcf8);
81
     case CT_Q965:
83
-            outb(map->b1, 0xcfd);
82
-        outl(0x80000090, 0xcf8);
84
-            outb(map->b2, 0xcfe);
83
-        outb(map->b1, 0xcfd);
85
+            OUTL(0x80000090, 0xcf8);
84
-        outb(map->b2, 0xcfe);
86
+            OUTB(map->b1, 0xcfd);
85
+        OUTL(0x80000090, 0xcf8);
87
+            OUTB(map->b2, 0xcfe);
86
+        OUTB(map->b1, 0xcfd);
88
             break;
87
+        OUTB(map->b2, 0xcfe);
89
         }
88
         break;
90
     }
89
     }
90

Return to bug 112922