Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c346816a
Commit
c346816a
authored
Jul 10, 2003
by
Dave Jones
Committed by
Dave Jones
Jul 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Ignore multiple K8 GARTS on UP.
parent
02c3658d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
13 deletions
+40
-13
drivers/char/agp/amd-k8-agp.c
drivers/char/agp/amd-k8-agp.c
+40
-13
No files found.
drivers/char/agp/amd-k8-agp.c
View file @
c346816a
...
...
@@ -246,14 +246,36 @@ struct agp_bridge_driver amd_8151_driver = {
.
agp_destroy_page
=
agp_generic_destroy_page
,
};
#ifdef CONFIG_SMP
static
int
cache_nbs
(
void
)
{
struct
pci_dev
*
loop_dev
=
NULL
;
int
i
=
0
;
/* cache pci_devs of northbridges. */
while
((
loop_dev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
loop_dev
))
!=
NULL
)
{
if
(
loop_dev
->
bus
->
number
==
0
&&
PCI_FUNC
(
loop_dev
->
devfn
)
==
3
&&
PCI_SLOT
(
loop_dev
->
devfn
)
>=
24
&&
PCI_SLOT
(
loop_dev
->
devfn
)
<=
31
)
{
hammers
[
i
++
]
=
loop_dev
;
nr_garts
=
i
;
if
(
i
==
MAX_HAMMER_GARTS
)
return
-
1
;
}
}
return
0
;
}
#endif
static
int
__init
agp_amdk8_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
{
struct
agp_bridge_data
*
bridge
;
struct
pci_dev
*
loop_dev
=
NULL
;
u8
rev_id
;
u8
cap_ptr
;
int
i
=
0
;
char
*
revstring
=
" "
;
cap_ptr
=
pci_find_capability
(
pdev
,
PCI_CAP_ID_AGP
);
...
...
@@ -303,24 +325,29 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev,
/* Fill in the mode register */
pci_read_config_dword
(
pdev
,
bridge
->
capndx
+
PCI_AGP_STATUS
,
&
bridge
->
mode
);
/* cache pci_devs of northbridges. */
#ifdef CONFIG_SMP
if
(
cache_nbs
()
==
-
1
)
{
agp_put_bridge
(
bridge
);
return
-
ENOMEM
;
}
#else
{
struct
pci_dev
*
loop_dev
=
NULL
;
while
((
loop_dev
=
pci_find_device
(
PCI_ANY_ID
,
PCI_ANY_ID
,
loop_dev
))
!=
NULL
)
{
if
(
loop_dev
->
bus
->
number
==
0
&&
PCI_FUNC
(
loop_dev
->
devfn
)
==
3
&&
PCI_SLOT
(
loop_dev
->
devfn
)
>=
24
&&
PCI_SLOT
(
loop_dev
->
devfn
)
<=
31
)
{
hammers
[
i
++
]
=
loop_dev
;
nr_garts
=
i
;
if
(
i
==
MAX_HAMMER_GARTS
)
goto
out_free
;
PCI_SLOT
(
loop_dev
->
devfn
)
==
24
&&
PCI_FUNC
(
loop_dev
->
devfn
)
==
3
)
{
/* For UP, we only care about the first GART. */
hammers
[
0
]
=
loop_dev
;
nr_garts
=
1
;
break
;
}
}
}
#endif
pci_set_drvdata
(
pdev
,
bridge
);
return
agp_add_bridge
(
bridge
);
out_free:
agp_put_bridge
(
bridge
);
return
-
ENOMEM
;
}
static
void
__devexit
agp_amdk8_remove
(
struct
pci_dev
*
pdev
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment