1
mirror of https://github.com/mpv-player/mpv synced 2025-02-15 13:54:30 +01:00

Ignore disabled cards. (Jon Burgess <jburgess@uklinux.net>)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9768 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ranma 2003-03-31 00:14:36 +00:00
parent 3518a6dff2
commit e25e1515c0
8 changed files with 31 additions and 3 deletions

View File

@ -24,10 +24,12 @@ extern "C" {
#define MAX_PCI_DEVICES_PER_BUS 32
#define MAX_PCI_DEVICES 64
#define PCI_MULTIFUNC_DEV 0x80
#define PCI_COMMAND_IO 0x1 /* Enable response to I/O space */
typedef struct pciinfo_s
{
int bus,card,func; /* PCI/AGP bus:card:func */
unsigned short command; /* Device control register */
unsigned short vendor,device; /* Card vendor+device ID */
unsigned base0,base1,base2,baserom; /* Memory and I/O base addresses */
// unsigned base0_limit, base1_limit, base2_limit, baserom_limit;

View File

@ -504,6 +504,7 @@ static void identify_card(struct pci_config_reg *pcr, int idx)
pci_lst[idx].bus = pcibus ;
pci_lst[idx].card = pcicard ;
pci_lst[idx].func = pcifunc ;
pci_lst[idx].command = pcr->_status_command & 0xFFFF;
pci_lst[idx].vendor = pcr->_vendor ;
pci_lst[idx].device = pcr->_device ;
pci_lst[idx].base0 = 0xFFFFFFFF ;

View File

@ -16,11 +16,11 @@ int main( void )
}
else
{
printf(" Bus:card:func vend:dev base0 :base1 :base2 :baserom\n");
printf(" Bus:card:func vend:dev command base0 :base1 :base2 :baserom\n");
for(i=0;i<num_pci;i++)
printf("%04X:%04X:%04X %04X:%04X %08X:%08X:%08X:%08X\n"
printf("%04X:%04X:%04X %04X:%04X %04X %08X:%08X:%08X:%08X\n"
,lst[i].bus,lst[i].card,lst[i].func
,lst[i].vendor,lst[i].device
,lst[i].vendor,lst[i].device,lst[i].command
,lst[i].base0,lst[i].base1,lst[i].base2,lst[i].baserom);
}
return EXIT_SUCCESS;

View File

@ -183,6 +183,11 @@ int vixProbe(int verbose, int force)
dname = pci_device_name(VENDOR_TRIDENT, lst[i].device);
dname = dname ? dname : "Unknown chip";
printf("[cyberblade] Found chip: %s\n", dname);
if ((lst[i].command & PCI_COMMAND_IO) == 0)
{
printf("[cyberblade] Device is disabled, ignoring\n");
continue;
}
cyberblade_cap.device_id = lst[i].device;
err = 0;
memcpy(&pci_info, &lst[i], sizeof(pciinfo_t));

View File

@ -421,6 +421,11 @@ int vixProbe(int verbose,int force)
dname = pci_device_name(VENDOR_ATI,lst[i].device);
dname = dname ? dname : "Unknown chip";
printf("[mach64] Found chip: %s\n",dname);
if ((lst[i].command & PCI_COMMAND_IO) == 0)
{
printf("[mach64] Device is disabled, ignoring\n");
continue;
}
if(force > PROBE_NORMAL)
{
printf("[mach64] Driver was forced. Was found %sknown chip\n",idx == -1 ? "un" : "");

View File

@ -1196,6 +1196,11 @@ int vixProbe(int verbose,int force)
i, lst[i].vendor, lst[i].device);
if (lst[i].vendor == VENDOR_MATROX)
{
if ((lst[i].command & PCI_COMMAND_IO) == 0)
{
printf("[mga] Device is disabled, ignoring\n");
continue;
}
switch(lst[i].device)
{
case DEVICE_MATROX_MGA_G550_AGP:

View File

@ -112,6 +112,11 @@ int vixProbe(int verbose, int force)
dname = pci_device_name(VENDOR_3DLABS, lst[i].device);
dname = dname ? dname : "Unknown chip";
printf("[pm3] Found chip: %s\n", dname);
if ((lst[i].command & PCI_COMMAND_IO) == 0)
{
printf("[pm3] Device is disabled, ignoring\n");
continue;
}
pm3_cap.device_id = lst[i].device;
err = 0;
memcpy(&pci_info, &lst[i], sizeof(pciinfo_t));

View File

@ -925,6 +925,11 @@ int vixProbe( int verbose,int force )
dname = pci_device_name(VENDOR_ATI,lst[i].device);
dname = dname ? dname : "Unknown chip";
printf(RADEON_MSG" Found chip: %s\n",dname);
if ((lst[i].command & PCI_COMMAND_IO) == 0)
{
printf("[radeon] Device is disabled, ignoring\n");
continue;
}
#ifndef RAGE128
if(idx != -1)
{