[Mplayer-cvslog] CVS: main/vidix/drivers radeon_vid.c,1.53,1.54
Alex Beregszaszi
alex at mplayerhq.hu
Sun Dec 22 15:59:59 CET 2002
Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv24161
Modified Files:
radeon_vid.c
Log Message:
the long awaited pink screen + shift fix for radeon, based on patch by Svante Signell <svante.signell at telia.com>, Carl (mlist.mplayer.users at urs.us) and Nick Kurshve <nickolsk at yandex.ru>
Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- radeon_vid.c 20 Nov 2002 15:48:34 -0000 1.53
+++ radeon_vid.c 22 Dec 2002 14:59:41 -0000 1.54
@@ -23,13 +23,17 @@
#define X_ADJUST 0
#else
#define RADEON_MSG "Radeon_vid:"
-#define X_ADJUST (!IsR200 ? 8 : 0)
+#define X_ADJUST (is_shift_required ? 8 : 0)
#ifndef RADEON
#define RADEON
#endif
#endif
static int __verbose = 0;
+#ifdef RADEON
+static int rage_ckey_model=0;
+static int is_shift_required;
+#endif
typedef struct bes_registers_s
{
@@ -927,6 +931,30 @@
printf(RADEON_MSG" Video memory = %uMb\n",radeon_ram_size/0x100000);
err = mtrr_set_type(pci_info.base0,radeon_ram_size,MTRR_TYPE_WRCOMB);
if(!err) printf(RADEON_MSG" Set write-combining type of video memory\n");
+
+#ifdef RADEON
+ switch(def_cap.device_id)
+ {
+ case DEVICE_ATI_RADEON_QW:
+ case DEVICE_ATI_RADEON_MOBILITY_M6:
+ case DEVICE_ATI_RADEON_MOBILITY_M62:
+ case DEVICE_ATI_RADEON_MOBILITY_M63:
+ case DEVICE_ATI_RADEON_MOBILITY_M64:
+ rage_ckey_model=1;
+ is_shift_required=1;
+ break;
+ case DEVICE_ATI_RADEON_QD:
+ case DEVICE_ATI_RADEON_QE:
+ case DEVICE_ATI_RADEON_QF:
+ case DEVICE_ATI_RADEON_QG:
+ case DEVICE_ATI_RADEON_VE_QY:
+ case DEVICE_ATI_RADEON_VE_QZ:
+ is_shift_required=1;
+ break;
+ default: break;
+ }
+#endif
+
if(__verbose > 1) radeon_vid_dump_regs();
return 0;
}
@@ -1678,7 +1706,11 @@
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|GRAPHIC_KEY_FN_EQ|CMP_MIX_AND;
+ 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;
#endif
}
else
More information about the MPlayer-cvslog
mailing list