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
c1ef3a2f
Commit
c1ef3a2f
authored
May 20, 2003
by
Dave Jones
Committed by
Dave Jones
May 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Sanity check (and fix up broken) AGP modes when in AGP 3.0 mode.
parent
1b47caf5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+25
-1
No files found.
drivers/char/agp/generic.c
View file @
c1ef3a2f
...
...
@@ -419,7 +419,31 @@ static void agp_v3_parse_one(u32 *mode, u32 *cmd, u32 *tmp)
if
(
!
((
*
cmd
&
AGPSTAT_FW
)
&&
(
*
tmp
&
AGPSTAT_FW
)
&&
(
*
mode
&
AGPSTAT_FW
)))
*
cmd
&=
~
AGPSTAT_FW
;
/* Set speed. */
/*
* Set speed.
* Check for invalid speeds. This can happen when applications
* written before the AGP 3.0 standard pass AGP2.x modes to AGP3 hardware
*/
if
(
*
mode
&
AGPSTAT_MODE_3_0
)
{
/*
* Caller hasn't a clue what its doing. We are in 3.0 mode,
* have been passed a 3.0 mode, but with 2.x speed bits set.
* AGP2.x 4x -> AGP3.0 4x.
*/
if
(
*
mode
&
AGPSTAT2_4X
)
{
*
mode
&=
~
AGPSTAT2_4X
;
*
mode
|=
AGPSTAT3_4X
;
}
}
else
{
/*
* The caller doesn't know what they are doing. We are in 3.0 mode,
* but have been passed an AGP 2.x mode.
* Convert AGP 1x,2x,4x -> AGP 3.0 4x.
*/
*
mode
&=
~
(
AGPSTAT2_4X
|
AGPSTAT2_2X
|
AGPSTAT2_1X
);
*
mode
|=
AGPSTAT3_4X
;
}
if
(
!
((
*
cmd
&
AGPSTAT3_8X
)
&&
(
*
tmp
&
AGPSTAT3_8X
)
&&
(
*
mode
&
AGPSTAT3_8X
)))
*
cmd
&=
~
AGPSTAT3_8X
;
...
...
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