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
f458c23a
Commit
f458c23a
authored
Jan 13, 2003
by
Bjorn Helgaas
Committed by
Dave Jones
Jan 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGP] Print AGP version & mode when programming devices.
parent
e2373e27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
drivers/char/agp/amd-k8-agp.c
drivers/char/agp/amd-k8-agp.c
+3
-10
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+9
-2
drivers/char/agp/sworks-agp.c
drivers/char/agp/sworks-agp.c
+1
-1
No files found.
drivers/char/agp/amd-k8-agp.c
View file @
f458c23a
...
...
@@ -382,9 +382,6 @@ static void agp_x86_64_agp_enable(u32 mode)
* Ok, here we have a AGP device. Disable impossible
* settings, and adjust the readqueue to the minimum.
*/
printk
(
KERN_INFO
"AGP: Setting up AGPv3 capable device at %d:%d:%d
\n
"
,
device
->
bus
->
number
,
PCI_FUNC
(
device
->
devfn
),
PCI_SLOT
(
device
->
devfn
));
pci_read_config_dword
(
device
,
cap_ptr
+
4
,
&
scratch
);
/* adjust RQ depth */
...
...
@@ -402,15 +399,11 @@ static void agp_x86_64_agp_enable(u32 mode)
if
(
!
((
command
&
0x10
)
&&
(
scratch
&
0x10
)
&&
(
mode
&
0x10
)))
command
&=
~
0x10
;
if
(
!
((
command
&
2
)
&&
(
scratch
&
2
)
&&
(
mode
&
2
)))
{
if
(
!
((
command
&
2
)
&&
(
scratch
&
2
)
&&
(
mode
&
2
)))
command
&=
~
2
;
/* 8x */
printk
(
KERN_INFO
"AGP: Putting device into 8x mode
\n
"
);
}
if
(
!
((
command
&
1
)
&&
(
scratch
&
1
)
&&
(
mode
&
1
)))
{
if
(
!
((
command
&
1
)
&&
(
scratch
&
1
)
&&
(
mode
&
1
)))
command
&=
~
1
;
/* 4x */
printk
(
KERN_INFO
"AGP: Putting device into 4x mode
\n
"
);
}
}
}
/*
...
...
@@ -433,7 +426,7 @@ static void agp_x86_64_agp_enable(u32 mode)
* command registers.
*/
agp_device_command
(
command
);
agp_device_command
(
command
,
1
);
}
...
...
drivers/char/agp/generic.c
View file @
f458c23a
...
...
@@ -314,15 +314,22 @@ int agp_unbind_memory(agp_memory * curr)
/* Generic Agp routines - Start */
void
agp_device_command
(
u32
command
)
void
agp_device_command
(
u32
command
,
int
agp_v3
)
{
struct
pci_dev
*
device
;
int
mode
;
mode
=
command
&
0x7
;
if
(
agp_v3
)
mode
*=
4
;
pci_for_each_dev
(
device
)
{
u8
agp
=
pci_find_capability
(
device
,
PCI_CAP_ID_AGP
);
if
(
!
agp
)
continue
;
printk
(
KERN_INFO
PFX
"Putting AGP V%d device at %s into %dx mode
\n
"
,
agp_v3
?
3
:
2
,
device
->
slot_name
,
mode
);
pci_write_config_dword
(
device
,
agp
+
8
,
command
);
}
}
...
...
@@ -409,7 +416,7 @@ void agp_generic_agp_enable(u32 mode)
* command registers.
*/
agp_device_command
(
command
);
agp_device_command
(
command
,
0
);
}
int
agp_generic_create_gatt_table
(
void
)
...
...
drivers/char/agp/sworks-agp.c
View file @
f458c23a
...
...
@@ -496,7 +496,7 @@ static void serverworks_agp_enable(u32 mode)
* command registers.
*/
agp_device_command
(
command
);
agp_device_command
(
command
,
0
);
}
static
int
__init
serverworks_setup
(
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