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@gmx.net>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8877 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-01-10 20:38:37 +00:00
parent 3e4bd26969
commit 3f4df9f674
1 changed files with 64 additions and 52 deletions

View File

@ -35,7 +35,6 @@
static int __verbose = 0; static int __verbose = 0;
#ifdef RADEON #ifdef RADEON
static int rage_ckey_model=0;
static int is_shift_required = 0; static int is_shift_required = 0;
#endif #endif
@ -923,40 +922,67 @@ int vixProbe( int verbose,int force )
#ifndef RAGE128 #ifndef RAGE128
if(idx != -1) if(idx != -1)
{ {
if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QD || switch(ati_card_ids[idx]) {
ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QE || /* Original radeon */
ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QF || case DEVICE_ATI_RADEON_R100_QD:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R100_QG || case DEVICE_ATI_RADEON_R100_QE:
ati_card_ids[idx] == DEVICE_ATI_RADEON_VE_QY || case DEVICE_ATI_RADEON_R100_QF:
ati_card_ids[idx] == DEVICE_ATI_RADEON_VE_QZ || case DEVICE_ATI_RADEON_R100_QG:
ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M7|| RadeonFamily = 100;
ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M72|| break;
ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M6||
ati_card_ids[idx] == DEVICE_ATI_RADEON_MOBILITY_M62) RadeonFamily = 100; /* Radeon VE / Radeon Mobility */
if(ati_card_ids[idx] == DEVICE_ATI_RADEON_RV200_QW || case DEVICE_ATI_RADEON_VE_QY:
ati_card_ids[idx] == DEVICE_ATI_RADEON_RV200_QX) RadeonFamily = 150; case DEVICE_ATI_RADEON_VE_QZ:
if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_BB || case DEVICE_ATI_RADEON_MOBILITY_M6:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QH || case DEVICE_ATI_RADEON_MOBILITY_M62:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QI || RadeonFamily = 120;
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QJ || break;
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QK ||
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QL || /* Radeon 7500 / Radeon Mobility 7500 */
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QH2 || case DEVICE_ATI_RADEON_RV200_QW:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QI2 || case DEVICE_ATI_RADEON_RV200_QX:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QJ2 || case DEVICE_ATI_RADEON_MOBILITY_M7:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R200_QK2) RadeonFamily = 200; case DEVICE_ATI_RADEON_MOBILITY_M72:
if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_ID || RadeonFamily = 150;
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IE || break;
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IF ||
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_IG || /* Radeon 8500 */
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LD || case DEVICE_ATI_RADEON_R200_BB:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LE || case DEVICE_ATI_RADEON_R200_QH:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LF || case DEVICE_ATI_RADEON_R200_QI:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R250_LG) RadeonFamily = 250; case DEVICE_ATI_RADEON_R200_QJ:
if(ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_ND || case DEVICE_ATI_RADEON_R200_QK:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NE || case DEVICE_ATI_RADEON_R200_QL:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NF || case DEVICE_ATI_RADEON_R200_QH2:
ati_card_ids[idx] == DEVICE_ATI_RADEON_R300_NG) RadeonFamily = 300; 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 #endif
if(force > PROBE_NORMAL) if(force > PROBE_NORMAL)
@ -1014,6 +1040,7 @@ int vixInit( void )
switch(RadeonFamily) switch(RadeonFamily)
{ {
case 100: case 100:
case 120:
case 150: case 150:
case 250: case 250:
is_shift_required=1; is_shift_required=1;
@ -1021,17 +1048,6 @@ int vixInit( void )
default: default:
break; 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 #endif
if(__verbose > 1) radeon_vid_dump_regs(); if(__verbose > 1) radeon_vid_dump_regs();
@ -1123,7 +1139,7 @@ static void radeon_vid_stop_video( void )
OUTREG(OV0_AUTO_FLIP_CNTL, 0); /* maybe */ OUTREG(OV0_AUTO_FLIP_CNTL, 0); /* maybe */
OUTREG(OV0_FILTER_CNTL, FILTER_HARDCODED_COEF); OUTREG(OV0_FILTER_CNTL, FILTER_HARDCODED_COEF);
#ifdef RADEON #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 #else
OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_NE); OUTREG(OV0_KEY_CNTL, GRAPHIC_KEY_FN_NE);
#endif #endif
@ -1807,11 +1823,7 @@ static void set_gr_key( void )
besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_NE|CMP_MIX_AND; besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_NE|CMP_MIX_AND;
#else #else
besr.graphics_key_msk=besr.graphics_key_clr; besr.graphics_key_msk=besr.graphics_key_clr;
besr.ckey_cntl = VIDEO_KEY_FN_TRUE|CMP_MIX_AND; besr.ckey_cntl = VIDEO_KEY_FN_TRUE|CMP_MIX_AND|GRAPHIC_KEY_FN_EQ;
if(rage_ckey_model)
besr.ckey_cntl |= GRAPHIC_KEY_FN_NE;
else
besr.ckey_cntl |= GRAPHIC_KEY_FN_EQ;
#endif #endif
} }
else else