Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1876
b: refs/heads/master
c: 66bb8bf
h: refs/heads/master
v: v3
  • Loading branch information
David Mosberger authored and Dave Jones committed Jun 7, 2005
1 parent aa72691 commit 20793f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07eee78ea8ba2d0b7b20551c35a3e7dd158d50bb
refs/heads/master: 66bb8bf8b235ba4d37fda14375827864977c6a3e
19 changes: 3 additions & 16 deletions trunk/drivers/char/agp/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,6 @@ int agp_num_entries(void)
EXPORT_SYMBOL_GPL(agp_num_entries);


static int check_bridge_mode(struct pci_dev *dev)
{
u32 agp3;
u8 cap_ptr;

cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP);
pci_read_config_dword(dev, cap_ptr+AGPSTAT, &agp3);
if (agp3 & AGPSTAT_MODE_3_0)
return 1;
return 0;
}


/**
* agp_copy_info - copy bridge state information
*
Expand All @@ -328,7 +315,7 @@ int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info)
info->version.minor = bridge->version->minor;
info->chipset = SUPPORTED;
info->device = bridge->dev;
if (check_bridge_mode(bridge->dev))
if (bridge->mode & AGPSTAT_MODE_3_0)
info->mode = bridge->mode & ~AGP3_RESERVED_MASK;
else
info->mode = bridge->mode & ~AGP2_RESERVED_MASK;
Expand Down Expand Up @@ -661,7 +648,7 @@ u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode
bridge_agpstat &= ~AGPSTAT_FW;

/* Check to see if we are operating in 3.0 mode */
if (check_bridge_mode(agp_bridge->dev))
if (agp_bridge->mode & AGPSTAT_MODE_3_0)
agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);
else
agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat);
Expand Down Expand Up @@ -732,7 +719,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)

/* Do AGP version specific frobbing. */
if (bridge->major_version >= 3) {
if (check_bridge_mode(bridge->dev)) {
if (bridge->mode & AGPSTAT_MODE_3_0) {
/* If we have 3.5, we can do the isoch stuff. */
if (bridge->minor_version >= 5)
agp_3_5_enable(bridge);
Expand Down

0 comments on commit 20793f1

Please sign in to comment.