plan 9 kernel history: overview | file list | diff list

1992/0812/ss/screen.c (diff list | history)

1992/0811/sys/src/9/ss/screen.c:26,371992/0812/sys/src/9/ss/screen.c:26,39 (short | long | prev | next)
1992/0810    
 
struct screens 
1990/1223    
{ 
1992/0810    
	ulong	type; 
1992/0812    
	char	*type; 
1992/0810    
	int	x; 
	int	y; 
	int	ld; 
}screens[] = { 
	{ 0xFE010104, 1152, 900, 0 }, 
1992/0812    
	{ "bwtwo", 1152, 900, 0 }, 
	{ "cgsix", 1152, 900, 3 }, 
	{ "cgthree", 1152, 900, 3 }, 
1990/1223    
	0 
}; 
 
1992/0811/sys/src/9/ss/screen.c:38,491992/0812/sys/src/9/ss/screen.c:40,52
1991/1228    
Lock screenlock; 
 
1990/1223    
void 
screeninit(void) 
1992/0812    
screeninit(char *str) 
1990/1223    
{ 
1992/0810    
	struct screens *s; 
1992/0812    
	ulong n; 
1992/0810    
 
	for(s=screens; s->type; s++) 
		if(s->type == conf.monitor) 
1992/0812    
		if(strcmp(s->type, str) == 0) 
1992/0810    
			goto found; 
	/* default is 0th element of table */ 
	if(conf.monitor){ 
1992/0811/sys/src/9/ss/screen.c:54,621992/0812/sys/src/9/ss/screen.c:57,66
1992/0810    
	return; 
 
    found: 
	gscreen.base = (ulong*)SCREENSEGM; 
	gscreen.zero = 0; 
	gscreen.width = (s->x<<s->ld)/32; 
1992/0812    
	gscreen.width = (s->x<<s->ld)/(8*sizeof(ulong)); 
	n = sizeof(ulong) * gscreen.width * s->y; 
	gscreen.base = (ulong*)kmapregion(DISPLAYRAM, n, PTENOCACHE|PTEIO); 
1992/0810    
	gscreen.ldepth = s->ld; 
	gscreen.r = Rect(0, 0, s->x, s->y); 
	gscreen.clipr = gscreen.r; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)