Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1128/8

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Handle Voodoo 3dfx card.
 [rsc] --rw-rw-r-- M 374841 glenda sys 3833 Nov 28 17:52 sys/src/9/pc/vga3dfx.c
 [rsc] --rw-rw-r-- M 374841 glenda sys 13797 Nov 28 17:52 sys/src/9/pc/screen.c
	/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/screen.c:454,459 - 
	/n/sourcesdump/2005/1129/plan9/sys/src/9/pc/screen.c:454,465
	  	 * Scan for largest memory region on card.
	  	 * Some S3 cards (e.g. Savage) have enormous
	  	 * mmio regions (but even larger frame buffers).
	+ 	 * Some 3dfx cards (e.g., Voodoo3) have mmio
	+ 	 * buffers the same size as the frame buffer,
	+ 	 * but only the frame buffer is marked as
	+ 	 * prefetchable (bar&8).  If a card doesn't fit
	+ 	 * into these heuristics, its driver will have to
	+ 	 * call vgalinearaddr directly.
	  	 */
	  	best = -1;
	  	for(i=0; i<nelem(p->mem); i++){
	/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/screen.c:461,467 - 
	/n/sourcesdump/2005/1129/plan9/sys/src/9/pc/screen.c:467,475
	  			continue;
	  		if(p->mem[i].size < 640*480)	/* not big enough */
	  			continue;
	- 		if(best==-1 || p->mem[i].size > p->mem[best].size)
	+ 		if(best==-1 
	+ 		|| p->mem[i].size > p->mem[best].size 
	+ 		|| (p->mem[i].size == p->mem[best].size && (p->mem[i].bar&8)))
	  			best = i;
	  	}
	  	if(best >= 0){
 [rsc] --rw-rw-r-- M 374841 glenda sys 3833 Nov 28 17:52 sys/src/9/pc/vga3dfx.c


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.