[Mplayer-cvslog] CVS: main/vidix/drivers radeon_vid.c,1.65,1.66

Arpi of Ize arpi at mplayerhq.hu
Fri Jan 10 21:38:54 CET 2003


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv7389

Modified Files:
	radeon_vid.c 
Log Message:
patch which removes the rage_ckey_model fix and updates
the card detection (which should fix ve card).
also replaces big if()'s by switch-case.
James Stembridge <jstembridge at gmx.net>


Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- radeon_vid.c	9 Jan 2003 18:28:56 -0000	1.65
+++ radeon_vid.c	10 Jan 2003 20:38:37 -0000	1.66
@@ -35,7 +35,6 @@
 
 static int __verbose = 0;
 #ifdef RADEON
-static int rage_ckey_model=0;
 static int is_shift_required = 0;
 #endif
 
@@ -923,40 +922,67 @@
 #ifndef RAGE128	
 	if(idx != -1)
 	{
-	     if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QD ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QE ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QF ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QG ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_VE_QY ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_VE_QZ ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M7||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M72||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M6||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M62) RadeonFamily = 100;
-	     if(ati_card_ids[idx] == DEVICE_ATI_RADEON_RV200_QW ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_RV200_QX) RadeonFamily = 150;
-	     if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_BB ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QH ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QI ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QJ ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QK ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QL ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QH2 ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QI2 ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QJ2 ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QK2) RadeonFamily = 200;
-	     if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_ID ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IE ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IF ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IG ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LD ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LE ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LF ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LG) RadeonFamily = 250;
-	     if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_ND ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NE ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NF ||
-		ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NG) RadeonFamily = 300;
+          switch(ati_card_ids[idx]) {
+            /* Original radeon */
+            case DEVICE_ATI_RADEON_R100_QD:
+            case DEVICE_ATI_RADEON_R100_QE:
+            case DEVICE_ATI_RADEON_R100_QF:
+            case DEVICE_ATI_RADEON_R100_QG:
+              RadeonFamily = 100;
+              break;
+              
+            /* Radeon VE / Radeon Mobility */
+            case DEVICE_ATI_RADEON_VE_QY:
+            case DEVICE_ATI_RADEON_VE_QZ:
+            case DEVICE_ATI_RADEON_MOBILITY_M6:
+            case DEVICE_ATI_RADEON_MOBILITY_M62:
+              RadeonFamily = 120;
+              break;
+              
+            /* Radeon 7500 / Radeon Mobility 7500 */
+            case DEVICE_ATI_RADEON_RV200_QW:
+            case DEVICE_ATI_RADEON_RV200_QX: 
+            case DEVICE_ATI_RADEON_MOBILITY_M7:
+            case DEVICE_ATI_RADEON_MOBILITY_M72:
+              RadeonFamily = 150;
+              break;
+              
+            /* Radeon 8500 */
+            case DEVICE_ATI_RADEON_R200_BB:
+            case DEVICE_ATI_RADEON_R200_QH:
+            case DEVICE_ATI_RADEON_R200_QI:
+            case DEVICE_ATI_RADEON_R200_QJ:
+            case DEVICE_ATI_RADEON_R200_QK:
+            case DEVICE_ATI_RADEON_R200_QL:
+            case DEVICE_ATI_RADEON_R200_QH2:
+            case DEVICE_ATI_RADEON_R200_QI2:
+            case DEVICE_ATI_RADEON_R200_QJ2:
+            case DEVICE_ATI_RADEON_R200_QK2:
+              RadeonFamily = 200;
+              break;
+              
+            /* Radeon 9000 */
+            case DEVICE_ATI_RADEON_R250_ID:
+            case DEVICE_ATI_RADEON_R250_IE:
+            case DEVICE_ATI_RADEON_R250_IF:
+            case DEVICE_ATI_RADEON_R250_IG:
+            case DEVICE_ATI_RADEON_R250_LD:
+            case DEVICE_ATI_RADEON_R250_LE:
+            case DEVICE_ATI_RADEON_R250_LF:
+            case DEVICE_ATI_RADEON_R250_LG:
+              RadeonFamily = 250;
+              break;
+              
+            /* Radeon 9700 */
+            case DEVICE_ATI_RADEON_R300_ND:
+            case DEVICE_ATI_RADEON_R300_NE:
+            case DEVICE_ATI_RADEON_R300_NF:
+            case DEVICE_ATI_RADEON_R300_NG:
+              RadeonFamily = 300;
+              break;
+            default:
+              break;
+          }
 	}
 #endif
 	if(force > PROBE_NORMAL)
@@ -1014,6 +1040,7 @@
   switch(RadeonFamily)
     {
     case 100:
+    case 120:
     case 150:
     case 250:
       is_shift_required=1;
@@ -1021,17 +1048,6 @@
     default:
       break;
     }
-
-  switch(def_cap.device_id)
-    {
-    case DEVICE_ATI_RADEON_MOBILITY_M7:
-    case DEVICE_ATI_RADEON_MOBILITY_M72:
-    case DEVICE_ATI_RADEON_MOBILITY_M62:
-      rage_ckey_model=1;
-    default:
-//	printf(RADEON_MSG" Warning! Probably colorkeying isn't working correct!\n");
-	break;
-    }
 #endif
 
   if(__verbose > 1) radeon_vid_dump_regs();
@@ -1123,7 +1139,7 @@
     OUTREG(OV0_AUTO_FLIP_CNTL, 0);   /* maybe */
     OUTREG(OV0_FILTER_CNTL, FILTER_HARDCODED_COEF);
 #ifdef RADEON
-    OUTREG(OV0_KEY_CNTL, rage_ckey_model ? GRAPHIC_KEY_FN_NE : GRAPHIC_KEY_FN_EQ);
+    OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_EQ);
 #else
     OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_NE);
 #endif
@@ -1807,11 +1823,7 @@
 	besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_NE|CMP_MIX_AND;
 #else
 	besr.graphics_key_msk=besr.graphics_key_clr;
-	besr.ckey_cntl = VIDEO_KEY_FN_TRUE|CMP_MIX_AND;
-	if(rage_ckey_model)
-	    besr.ckey_cntl |= GRAPHIC_KEY_FN_NE;
-	else
-	    besr.ckey_cntl |= GRAPHIC_KEY_FN_EQ;
+	besr.ckey_cntl = VIDEO_KEY_FN_TRUE|CMP_MIX_AND|GRAPHIC_KEY_FN_EQ;
 #endif
     }
     else



More information about the MPlayer-cvslog mailing list