[MPlayer-cvslog] r22898 - trunk/vidix/nvidia_vid.c
ben
subversion at mplayerhq.hu
Sun Apr 1 22:48:34 CEST 2007
Author: ben
Date: Sun Apr 1 22:48:34 2007
New Revision: 22898
Modified:
trunk/vidix/nvidia_vid.c
Log:
GeForce 6x00 and above are actually referenced as NV40 in X.Org driver (though it doesn't work better right now)
Modified: trunk/vidix/nvidia_vid.c
==============================================================================
--- trunk/vidix/nvidia_vid.c (original)
+++ trunk/vidix/nvidia_vid.c Sun Apr 1 22:48:34 2007
@@ -57,6 +57,7 @@ static vidix_capability_t nvidia_cap = {
#define NV_ARCH_10 0x10
#define NV_ARCH_20 0x20
#define NV_ARCH_30 0x30
+#define NV_ARCH_40 0x40
// since no useful information whatsoever is passed
// to the equalizer functions we need this
@@ -218,93 +219,93 @@ static struct nvidia_cards nvidia_card_i
{DEVICE_NVIDIA_NV37GL_QUADRO_FX,NV_ARCH_30},
{DEVICE_NVIDIA_NV37GL_QUADRO_FX2,NV_ARCH_30},
{DEVICE_NVIDIA_NV38GL_QUADRO_FX,NV_ARCH_30},
- /* FIXME are they different? */
- {DEVICE_NVIDIA_NV40_GEFORCE_6800,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68002,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_2_GEFORCE_6800,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_3,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68003,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68004,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68005,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68006,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68007,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68009,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_680010,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_680011,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_680012,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40GL,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40GL_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40GL_QUADRO_FX2,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_GEFORCE_6800,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_1_GEFORCE_6800,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_2_GEFORCE_6800,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_8_GEFORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_9_GEFORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41_QUADRO_FX2,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_NV40_GEFORCE_6800_GEFORCE,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE2,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_6200,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_62002,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_6600,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_66002,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_66003,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_66004,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_66005,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO2,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO3,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO4,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO5,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_GO6,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43_GEFORCE_6610,NV_ARCH_30},
- {DEVICE_NVIDIA_NV43GL_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_6100_NFORCE,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_6100_NFORCE2,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_6100_NFORCE3,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_6100_NFORCE4,NV_ARCH_30},
- {DEVICE_NVIDIA_C51G_GEFORCE_6100,NV_ARCH_30},
- {DEVICE_NVIDIA_C51PV_GEFORCE_6150,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44_GEFORCE_6200,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44_GEFORCE_62002,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44_GEFORCE_62003,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44_GEFORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44_QUADRO_NVS,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_6200,NV_ARCH_30},
- {DEVICE_NVIDIA_NV44A_GEFORCE_6200,NV_ARCH_30},
- {DEVICE_NVIDIA_NV45GL_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_7200,NV_ARCH_30},
- {DEVICE_NVIDIA_QUADRO_NVS_110M,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_7400,NV_ARCH_30},
- {DEVICE_NVIDIA_QUADRO_NVS_110M2,NV_ARCH_30},
- {DEVICE_NVIDIA_QUADRO_FX_350,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_7300,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_7300_GS,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_7600,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_76002,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_7600_GS,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_QUADRO_FX_560,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_7800,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_78002,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_78003,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_78004,NV_ARCH_30},
- {DEVICE_NVIDIA_G70_GEFORCE_78005,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_7800,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_7900_GTX,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_7900_GT,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_7900_GS,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_7900,NV_ARCH_30},
- {DEVICE_NVIDIA_GEFORCE_GO_79002,NV_ARCH_30},
- {DEVICE_NVIDIA_GE_FORCE_GO,NV_ARCH_30},
- {DEVICE_NVIDIA_G70GL_QUADRO_FX4500,NV_ARCH_30},
- {DEVICE_NVIDIA_G71_QUADRO_FX,NV_ARCH_30},
- {DEVICE_NVIDIA_G71_QUADRO_FX2,NV_ARCH_30}
+ /* NV40: GeForce 6x00 to 7x00 */
+ {DEVICE_NVIDIA_NV40_GEFORCE_6800,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68002,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_2_GEFORCE_6800,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_3,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68003,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68004,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68005,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68006,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68007,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68009,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_680010,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_680011,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_680012,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40GL,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40GL_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40GL_QUADRO_FX2,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_GEFORCE_6800,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_1_GEFORCE_6800,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_2_GEFORCE_6800,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_8_GEFORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_9_GEFORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41_QUADRO_FX2,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV40_GEFORCE_6800_GEFORCE,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE2,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_6200,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_62002,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_6600,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_66002,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_66003,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_66004,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_66005,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO2,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO3,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO4,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO5,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_GO6,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43_GEFORCE_6610,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV43GL_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_6100_NFORCE,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_6100_NFORCE2,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_6100_NFORCE3,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_6100_NFORCE4,NV_ARCH_40},
+ {DEVICE_NVIDIA_C51G_GEFORCE_6100,NV_ARCH_40},
+ {DEVICE_NVIDIA_C51PV_GEFORCE_6150,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44_GEFORCE_6200,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44_GEFORCE_62002,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44_GEFORCE_62003,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44_GEFORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44_QUADRO_NVS,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_6200,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV44A_GEFORCE_6200,NV_ARCH_40},
+ {DEVICE_NVIDIA_NV45GL_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_7200,NV_ARCH_40},
+ {DEVICE_NVIDIA_QUADRO_NVS_110M,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_7400,NV_ARCH_40},
+ {DEVICE_NVIDIA_QUADRO_NVS_110M2,NV_ARCH_40},
+ {DEVICE_NVIDIA_QUADRO_FX_350,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_7300,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_7300_GS,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_7600,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_76002,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_7600_GS,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_QUADRO_FX_560,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_7800,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_78002,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_78003,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_78004,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70_GEFORCE_78005,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_7800,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_7900_GTX,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_7900_GT,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_7900_GS,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_7900,NV_ARCH_40},
+ {DEVICE_NVIDIA_GEFORCE_GO_79002,NV_ARCH_40},
+ {DEVICE_NVIDIA_GE_FORCE_GO,NV_ARCH_40},
+ {DEVICE_NVIDIA_G70GL_QUADRO_FX4500,NV_ARCH_40},
+ {DEVICE_NVIDIA_G71_QUADRO_FX,NV_ARCH_40},
+ {DEVICE_NVIDIA_G71_QUADRO_FX2,NV_ARCH_40}
};
@@ -524,6 +525,7 @@ static void rivatv_enable_PMEDIA (struc
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
+ case NV_ARCH_40:
/* NV_PVIDEO_COLOR_KEY */
info->colorkey = VID_RD32 (info->chip.PVIDEO, 0xB00);
break;
@@ -545,7 +547,8 @@ static void rivatv_overlay_stop (struct
switch (info->chip.arch ) {
case NV_ARCH_10:
case NV_ARCH_20:
- case NV_ARCH_30:
+ case NV_ARCH_30:
+ case NV_ARCH_40:
/* NV_PVIDEO_COLOR_KEY */
/* Xv-Extension-Hack: Restore previously saved value. */
VID_WR32 (info->chip.PVIDEO, 0xB00, info->colorkey);
@@ -624,6 +627,7 @@ static void rivatv_overlay_colorkey (riv
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
+ case NV_ARCH_40:
VID_WR32 (info->chip.PVIDEO, 0xB00, key);
break;
case NV_ARCH_03:
@@ -716,6 +720,7 @@ static void rivatv_overlay_start (struct
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
+ case NV_ARCH_40:
/* NV_PVIDEO_BASE */
VID_WR32 (info->chip.PVIDEO, 0x900 + 0, base + offset);
@@ -725,7 +730,7 @@ static void rivatv_overlay_start (struct
//VID_WR32 (info->chip.PVIDEO, 0x908 + 4, base + size - 1);
/* extra code for NV20 && NV30 architectures */
- if (info->chip.arch == NV_ARCH_20 || info->chip.arch == NV_ARCH_30) {
+ if (info->chip.arch == NV_ARCH_20 || info->chip.arch == NV_ARCH_30 || info->chip.arch == NV_ARCH_40) {
VID_WR32 (info->chip.PVIDEO, 0x800 + 0, base + offset);
//VID_WR32 (info->chip.PVIDEO, 0x800 + 4, base);
VID_WR32 (info->chip.PVIDEO, 0x808 + 0, base + offset + size - 1);
@@ -886,6 +891,7 @@ static int nv_init(void){
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
+ case NV_ARCH_40:
info->chip.lock = rivatv_lock_nv04;
info->chip.fbsize = rivatv_fbsize_nv10 (&info->chip);
info->chip.PRAMIN = (uint32_t *) (info->control_base + 0x00700000);
@@ -907,6 +913,7 @@ static int nv_init(void){
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
+ case NV_ARCH_40:
{
info->video_base = map_phys_mem(pci_info.base1, info->chip.fbsize);
info->picture_offset = info->chip.fbsize - NV04_BES_SIZE;
More information about the MPlayer-cvslog
mailing list