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
35e1acd8
Commit
35e1acd8
authored
Feb 22, 2005
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Check the bridge is in 3.0 mode, not the graphic card.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
4708e0d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+1
-1
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+4
-3
No files found.
drivers/char/agp/agp.h
View file @
35e1acd8
...
@@ -255,7 +255,7 @@ void *agp_generic_alloc_page(void);
...
@@ -255,7 +255,7 @@ void *agp_generic_alloc_page(void);
void
agp_generic_destroy_page
(
void
*
addr
);
void
agp_generic_destroy_page
(
void
*
addr
);
void
agp_free_key
(
int
key
);
void
agp_free_key
(
int
key
);
int
agp_num_entries
(
void
);
int
agp_num_entries
(
void
);
u32
agp_collect_device_status
(
u32
mode
,
u32
command
);
u32
agp_collect_device_status
(
struct
agp_bridge_data
*
bridge
,
u32
mode
,
u32
command
);
void
agp_device_command
(
u32
command
,
int
agp_v3
);
void
agp_device_command
(
u32
command
,
int
agp_v3
);
int
agp_3_5_enable
(
struct
agp_bridge_data
*
bridge
);
int
agp_3_5_enable
(
struct
agp_bridge_data
*
bridge
);
void
global_cache_flush
(
void
);
void
global_cache_flush
(
void
);
...
...
drivers/char/agp/generic.c
View file @
35e1acd8
...
@@ -522,13 +522,14 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
...
@@ -522,13 +522,14 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
/**
/**
* agp_collect_device_status - determine correct agp_cmd from various agp_stat's
* 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.
* @requested_mode: requested agp_stat from userspace (Typically from X)
* @requested_mode: requested agp_stat from userspace (Typically from X)
* @bridge_agpstat: current agp_stat from AGP bridge.
* @bridge_agpstat: current agp_stat from AGP bridge.
*
*
* This function will hunt for an AGP graphics card, and try to match
* This function will hunt for an AGP graphics card, and try to match
* the requested mode to the capabilities of both the bridge and the card.
* the requested mode to the capabilities of both the bridge and the card.
*/
*/
u32
agp_collect_device_status
(
u32
requested_mode
,
u32
bridge_agpstat
)
u32
agp_collect_device_status
(
struct
agp_bridge_data
*
bridge
,
u32
requested_mode
,
u32
bridge_agpstat
)
{
{
struct
pci_dev
*
device
=
NULL
;
struct
pci_dev
*
device
=
NULL
;
u8
cap_ptr
=
0
;
u8
cap_ptr
=
0
;
...
@@ -566,7 +567,7 @@ u32 agp_collect_device_status(u32 requested_mode, u32 bridge_agpstat)
...
@@ -566,7 +567,7 @@ u32 agp_collect_device_status(u32 requested_mode, u32 bridge_agpstat)
bridge_agpstat
&=
~
AGPSTAT_FW
;
bridge_agpstat
&=
~
AGPSTAT_FW
;
/* Check to see if we are operating in 3.0 mode */
/* Check to see if we are operating in 3.0 mode */
pci_read_config_dword
(
device
,
cap_ptr
+
AGPSTAT
,
&
agp3
);
pci_read_config_dword
(
agp_bridge
->
dev
,
cap_ptr
+
AGPSTAT
,
&
agp3
);
if
(
agp3
&
AGPSTAT_MODE_3_0
)
{
if
(
agp3
&
AGPSTAT_MODE_3_0
)
{
agp_v3_parse_one
(
&
requested_mode
,
&
bridge_agpstat
,
&
vga_agpstat
);
agp_v3_parse_one
(
&
requested_mode
,
&
bridge_agpstat
,
&
vga_agpstat
);
}
else
{
}
else
{
...
@@ -631,7 +632,7 @@ void agp_generic_enable(u32 requested_mode)
...
@@ -631,7 +632,7 @@ void agp_generic_enable(u32 requested_mode)
pci_read_config_dword
(
agp_bridge
->
dev
,
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
PCI_AGP_STATUS
,
&
bridge_agpstat
);
agp_bridge
->
capndx
+
PCI_AGP_STATUS
,
&
bridge_agpstat
);
bridge_agpstat
=
agp_collect_device_status
(
requested_mode
,
bridge_agpstat
);
bridge_agpstat
=
agp_collect_device_status
(
agp_bridge
,
requested_mode
,
bridge_agpstat
);
if
(
bridge_agpstat
==
0
)
if
(
bridge_agpstat
==
0
)
/* Something bad happened. FIXME: Return error code? */
/* Something bad happened. FIXME: Return error code? */
return
;
return
;
...
...
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