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
c33584a3
Commit
c33584a3
authored
Mar 24, 2003
by
Dave Jones
Committed by
Dave Jones
Mar 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Kill agp_generic_agp_3_0_enable, fold into agp_generic_agp_enable()
parent
fc42ba91
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
48 deletions
+30
-48
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+1
-1
drivers/char/agp/generic-3.0.c
drivers/char/agp/generic-3.0.c
+2
-30
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+25
-10
drivers/char/agp/i7x05-agp.c
drivers/char/agp/i7x05-agp.c
+1
-6
drivers/char/agp/via-agp.c
drivers/char/agp/via-agp.c
+1
-1
No files found.
drivers/char/agp/agp.h
View file @
c33584a3
...
...
@@ -381,7 +381,6 @@ struct agp_driver {
/* Generic routines. */
void
agp_generic_agp_enable
(
u32
mode
);
void
agp_generic_agp_3_0_enable
(
u32
mode
);
int
agp_generic_create_gatt_table
(
void
);
int
agp_generic_free_gatt_table
(
void
);
agp_memory
*
agp_create_memory
(
int
scratch_pages
);
...
...
@@ -399,5 +398,6 @@ int agp_register_driver (struct agp_driver *drv);
int
agp_unregister_driver
(
struct
agp_driver
*
drv
);
u32
agp_collect_device_status
(
u32
mode
,
u32
command
);
void
agp_device_command
(
u32
command
,
int
agp_v3
);
int
agp_3_0_node_enable
(
u32
mode
,
u32
minor
);
#endif
/* _AGP_BACKEND_PRIV_H */
drivers/char/agp/generic-3.0.c
View file @
c33584a3
...
...
@@ -319,7 +319,7 @@ static int agp_3_0_nonisochronous_node_enable(struct agp_3_0_dev *dev_list, unsi
* Fully configure and enable an AGP 3.0 host bridge and all the devices
* lying behind it.
*/
static
int
agp_3_0_node_enable
(
u32
mode
,
u32
minor
)
int
agp_3_0_node_enable
(
u32
mode
,
u32
minor
)
{
struct
pci_dev
*
td
=
agp_bridge
->
dev
,
*
dev
;
u8
bus_num
,
mcapndx
;
...
...
@@ -518,33 +518,5 @@ static int agp_3_0_node_enable(u32 mode, u32 minor)
return
ret
;
}
/*
* Entry point to AGP 3.0 host bridge init. Check to see if we
* have an AGP 3.0 device operating in 3.0 mode. Call
* agp_3_0_node_enable or agp_generic_agp_enable if we don't
* (AGP 3.0 devices are required to operate as AGP 2.0 devices
* when not using 3.0 electricals.
*/
void
agp_generic_agp_3_0_enable
(
u32
mode
)
{
u32
ncapid
,
major
,
minor
,
agp_3_0
;
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
,
&
ncapid
);
major
=
(
ncapid
>>
20
)
&
0xf
;
minor
=
(
ncapid
>>
16
)
&
0xf
;
printk
(
KERN_INFO
PFX
"Found an AGP %d.%d compliant device.
\n
"
,
major
,
minor
);
if
(
major
>=
3
)
{
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
0x4
,
&
agp_3_0
);
/*
* Check to see if we are operating in 3.0 mode
*/
if
((
agp_3_0
>>
3
)
&
0x1
)
agp_3_0_node_enable
(
mode
,
minor
);
}
}
EXPORT_SYMBOL
(
agp_generic_agp_3_0_enable
);
EXPORT_SYMBOL_GPL
(
agp_3_0_node_enable
);
drivers/char/agp/generic.c
View file @
c33584a3
...
...
@@ -394,20 +394,35 @@ void agp_device_command(u32 command, int agp_v3)
void
agp_generic_agp_enable
(
u32
mode
)
{
u32
command
;
u32
command
,
ncapid
,
major
,
minor
;
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
PCI_AGP_STATUS
,
&
command
);
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
,
&
ncapid
);
major
=
(
ncapid
>>
20
)
&
0xf
;
minor
=
(
ncapid
>>
16
)
&
0xf
;
printk
(
KERN_INFO
PFX
"Found an AGP %d.%d compliant device.
\n
"
,
major
,
minor
);
command
=
agp_collect_device_status
(
mode
,
command
);
command
|=
0x100
;
if
(
major
<
3
)
{
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
PCI_AGP_STATUS
,
&
command
);
pci_write_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
PCI_AGP_COMMAND
,
command
);
command
=
agp_collect_device_status
(
mode
,
command
);
command
|=
0x100
;
agp_device_command
(
command
,
0
);
pci_write_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
PCI_AGP_COMMAND
,
command
);
agp_device_command
(
command
,
0
);
}
#ifdef CONFIG_AGP3
if
(
major
>=
3
)
{
u32
agp_3_0
;
pci_read_config_dword
(
agp_bridge
->
dev
,
agp_bridge
->
capndx
+
0x4
,
&
agp_3_0
);
/* Check to see if we are operating in 3.0 mode */
if
((
agp_3_0
>>
3
)
&
0x1
)
agp_3_0_node_enable
(
mode
,
minor
);
}
#endif
}
int
agp_generic_create_gatt_table
(
void
)
...
...
drivers/char/agp/i7x05-agp.c
View file @
c33584a3
...
...
@@ -87,11 +87,6 @@ static aper_size_info_16 intel_7505_sizes[7] =
{
4
,
1024
,
0
,
0xf3f
}
};
static
void
i7505_setup
(
u32
mode
)
{
if
((
agp_generic_agp_3_0_enable
)
==
FALSE
)
agp_generic_agp_enable
(
mode
);
}
static
int
__init
intel_7505_setup
(
struct
pci_dev
*
pdev
)
{
...
...
@@ -106,7 +101,7 @@ static int __init intel_7505_setup (struct pci_dev *pdev)
agp_bridge
->
cleanup
=
intel_7505_cleanup
;
agp_bridge
->
tlb_flush
=
intel_7505_tlbflush
;
agp_bridge
->
mask_memory
=
intel_mask_memory
;
agp_bridge
->
agp_enable
=
i7505
_enable
;
agp_bridge
->
agp_enable
=
agp_generic_agp
_enable
;
agp_bridge
->
cache_flush
=
global_cache_flush
;
agp_bridge
->
create_gatt_table
=
agp_generic_create_gatt_table
;
agp_bridge
->
free_gatt_table
=
agp_generic_free_gatt_table
;
...
...
drivers/char/agp/via-agp.c
View file @
c33584a3
...
...
@@ -186,7 +186,7 @@ static int __init via_generic_agp3_setup (struct pci_dev *pdev)
agp_bridge
->
num_aperture_sizes
=
10
;
agp_bridge
->
dev_private_data
=
NULL
;
agp_bridge
->
needs_scratch_page
=
FALSE
;
agp_bridge
->
agp_enable
=
agp_generic_agp_
3_0_
enable
;
agp_bridge
->
agp_enable
=
agp_generic_agp_enable
;
agp_bridge
->
configure
=
via_configure_agp3
;
agp_bridge
->
fetch_size
=
via_fetch_size_agp3
;
agp_bridge
->
cleanup
=
via_cleanup_agp3
;
...
...
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