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
Kirill Smelkov
linux
Commits
1b13cadf
Commit
1b13cadf
authored
Feb 22, 2005
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Introduce routine to check current operating mode of agp bridge.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
b108855a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+17
-11
No files found.
drivers/char/agp/generic.c
View file @
1b13cadf
...
...
@@ -589,6 +589,20 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
}
}
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_collect_device_status - determine correct agp_cmd from various agp_stat's
* @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
...
...
@@ -603,7 +617,6 @@ u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode
struct
pci_dev
*
device
=
NULL
;
u8
cap_ptr
=
0
;
u32
vga_agpstat
;
u32
agp3
;
while
(
!
cap_ptr
)
{
device
=
pci_get_class
(
PCI_CLASS_DISPLAY_VGA
,
device
);
...
...
@@ -636,12 +649,10 @@ 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 */
pci_read_config_dword
(
agp_bridge
->
dev
,
cap_ptr
+
AGPSTAT
,
&
agp3
);
if
(
agp3
&
AGPSTAT_MODE_3_0
)
{
if
(
check_bridge_mode
(
agp_bridge
->
dev
))
agp_v3_parse_one
(
&
requested_mode
,
&
bridge_agpstat
,
&
vga_agpstat
);
}
else
{
else
agp_v2_parse_one
(
&
requested_mode
,
&
bridge_agpstat
,
&
vga_agpstat
);
}
pci_dev_put
(
device
);
return
bridge_agpstat
;
...
...
@@ -689,7 +700,6 @@ EXPORT_SYMBOL(get_agp_version);
void
agp_generic_enable
(
u32
requested_mode
)
{
u32
bridge_agpstat
,
temp
;
u32
agp3
;
get_agp_version
(
agp_bridge
);
...
...
@@ -710,11 +720,7 @@ void agp_generic_enable(u32 requested_mode)
/* Do AGP version specific frobbing. */
if
(
agp_bridge
->
major_version
>=
3
)
{
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
AGPSTAT
,
&
agp3
);
/* Check to see if we are operating in 3.0 mode */
if
(
agp3
&
AGPSTAT_MODE_3_0
)
{
if
(
check_bridge_mode
(
agp_bridge
->
dev
))
{
/* If we have 3.5, we can do the isoch stuff. */
if
(
agp_bridge
->
minor_version
>=
5
)
agp_3_5_enable
(
agp_bridge
);
...
...
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