changeset 25369:6f8d4937dd98

remove useless code parts synchronized with vidix.sf.net r325
author ben
date Fri, 14 Dec 2007 18:25:06 +0000
parents 8362d7605961
children 6ca7e3c62a5a
files vidix/savage_vid.c
diffstat 1 files changed, 0 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/savage_vid.c	Fri Dec 14 18:19:50 2007 +0000
+++ b/vidix/savage_vid.c	Fri Dec 14 18:25:06 2007 +0000
@@ -593,15 +593,6 @@
 
 		enable_app_io ();
 
-    /* Unlock extended registers. */
-
-	/* FIXME: it looks like mmaped io is broken with vgaout16  */
-    VGAOUT16(vgaCRIndex, 0x4838 );
-    VGAOUT16(vgaCRIndex, 0xa039);
-    VGAOUT16(0x3c4, 0x0608);
-
-		
-	
     VGAOUT8( vgaCRIndex, EXT_MISC_CTRL2 );
 
     if( S3_SAVAGE_MOBILE_SERIES(info->chip.arch) )
@@ -729,13 +720,6 @@
     unsigned short vgaCRIndex = 0x3d0 + 4;
     unsigned short vgaCRReg = 0x3d0 + 5;
 
-
-    /* Unlock extended registers. */
-
-    VGAOUT16(vgaCRIndex, 0x4838);
-    VGAOUT16(vgaCRIndex, 0xa039);
-    VGAOUT16(0x3c4, 0x0608);
-
     VGAOUT8( vgaCRIndex, EXT_MISC_CTRL2 );
     if( S3_SAVAGE_MOBILE_SERIES(info->chip.arch)  ||
         (info->chip.arch == S3_SUPERSAVAGE) ||
@@ -883,15 +867,6 @@
   val = VGAIN8 (0x3cc);
   VGAOUT8 (0x3c2, val | 0x01);
 
-  if (info->chip.arch >= S3_SAVAGE4)
-	{
-		VGAOUT8 (0x3d4, 0x40);
-		val = VGAIN8 (0x3d5);
-		VGAOUT8 (0x3d5, val | 1);
-	}
-
-
-
   /* unprotect CRTC[0-7] */
   VGAOUT8(vgaCRIndex, 0x11);
   tmp = VGAIN8(vgaCRReg);
@@ -904,17 +879,6 @@
   VGAOUT16(vgaCRIndex, 0xa039);
   VGAOUT16(0x3c4, 0x0608);
 
-  VGAOUT8(vgaCRIndex, 0x40);
-  tmp = VGAIN8(vgaCRReg);
-  VGAOUT8(vgaCRReg, tmp & ~0x01);
-
-  /* unlock sys regs */
-  VGAOUT8(vgaCRIndex, 0x38);
-  VGAOUT8(vgaCRReg, 0x48);
-
-  /* Unlock system registers. */
-  VGAOUT16(vgaCRIndex, 0x4838);
-
   /* Next go on to detect amount of installed ram */
 
   VGAOUT8(vgaCRIndex, 0x36);            /* for register CR36 (CONFG_REG1), */
@@ -972,24 +936,6 @@
   VGAOUT8 (0x3d5, cr66 & ~0x02); */ // clear reset flag
  /* udelay (10000); */
 
-	/* This maps framebuffer @6MB, thus 2MB are left for video. */
-	if (info->chip.arch == S3_SAVAGE3D) {
-		info->video_base = map_phys_mem(pci_info.base0, info->chip.fbsize);
-		info->picture_offset = 1024*768* 4 * ((info->chip.fbsize > 4194304)?2:1);
-	}
-	else {
-		info->video_base = map_phys_mem(pci_info.base1, info->chip.fbsize);
-		info->picture_offset = info->chip.fbsize - FRAMEBUFFER_SIZE;
-//			info->picture_offset = 1024*1024* 4 * 2;
-	}
-	if ( info->video_base == NULL){
-		printf("errno = %s\n",  strerror(errno));
-		return -1; 
-	}
-
-
-	info->picture_base = (uint32_t) info->video_base + info->picture_offset;
-
 	if ( info->chip.arch == S3_SAVAGE3D ){
 		mtrr = mtrr_set_type(pci_info.base0, info->chip.fbsize, MTRR_TYPE_WRCOMB);
 	}