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
459bf5a9
Commit
459bf5a9
authored
May 21, 2003
by
Dave Jones
Committed by
Dave Jones
May 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Rid AGP/DRM of more typedefs.
parent
4e827869
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
146 additions
and
131 deletions
+146
-131
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+10
-10
drivers/char/agp/ali-agp.c
drivers/char/agp/ali-agp.c
+4
-4
drivers/char/agp/alpha-agp.c
drivers/char/agp/alpha-agp.c
+3
-3
drivers/char/agp/amd-k7-agp.c
drivers/char/agp/amd-k7-agp.c
+3
-3
drivers/char/agp/amd-k8-agp.c
drivers/char/agp/amd-k8-agp.c
+2
-2
drivers/char/agp/frontend.c
drivers/char/agp/frontend.c
+18
-18
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+15
-15
drivers/char/agp/hp-agp.c
drivers/char/agp/hp-agp.c
+5
-3
drivers/char/agp/i460-agp.c
drivers/char/agp/i460-agp.c
+13
-7
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.c
+16
-14
drivers/char/agp/nvidia-agp.c
drivers/char/agp/nvidia-agp.c
+3
-3
drivers/char/agp/sis-agp.c
drivers/char/agp/sis-agp.c
+1
-1
drivers/char/agp/sworks-agp.c
drivers/char/agp/sworks-agp.c
+3
-3
drivers/char/agp/uninorth-agp.c
drivers/char/agp/uninorth-agp.c
+3
-2
drivers/char/agp/via-agp.c
drivers/char/agp/via-agp.c
+2
-2
drivers/char/drm/drmP.h
drivers/char/drm/drmP.h
+10
-10
drivers/char/drm/drm_agpsupport.h
drivers/char/drm/drm_agpsupport.h
+6
-6
drivers/char/drm/drm_memory.h
drivers/char/drm/drm_memory.h
+4
-4
include/linux/agp_backend.h
include/linux/agp_backend.h
+24
-20
include/linux/agpgart.h
include/linux/agpgart.h
+1
-1
No files found.
drivers/char/agp/agp.h
View file @
459bf5a9
...
...
@@ -102,15 +102,15 @@ struct agp_bridge_driver {
int
(
*
configure
)(
void
);
void
(
*
agp_enable
)(
u32
);
void
(
*
cleanup
)(
void
);
void
(
*
tlb_flush
)(
agp_memory
*
);
void
(
*
tlb_flush
)(
struct
agp_memory
*
);
unsigned
long
(
*
mask_memory
)(
unsigned
long
,
int
);
void
(
*
cache_flush
)(
void
);
int
(
*
create_gatt_table
)(
void
);
int
(
*
free_gatt_table
)(
void
);
int
(
*
insert_memory
)(
agp_memory
*
,
off_t
,
int
);
int
(
*
remove_memory
)(
agp_memory
*
,
off_t
,
int
);
agp_memory
*
(
*
alloc_by_type
)
(
size_t
,
int
);
void
(
*
free_by_type
)(
agp_memory
*
);
int
(
*
insert_memory
)(
struct
agp_memory
*
,
off_t
,
int
);
int
(
*
remove_memory
)(
struct
agp_memory
*
,
off_t
,
int
);
struct
agp_memory
*
(
*
alloc_by_type
)
(
size_t
,
int
);
void
(
*
free_by_type
)(
struct
agp_memory
*
);
void
*
(
*
agp_alloc_page
)(
void
);
void
(
*
agp_destroy_page
)(
void
*
);
};
...
...
@@ -375,11 +375,11 @@ void agp_frontend_cleanup(void);
void
agp_generic_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
);
int
agp_generic_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
);
int
agp_generic_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
);
agp_memory
*
agp_generic_alloc_by_type
(
size_t
page_count
,
int
type
);
void
agp_generic_free_by_type
(
agp_memory
*
curr
);
struct
agp_memory
*
agp_create_memory
(
int
scratch_pages
);
int
agp_generic_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
);
int
agp_generic_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
);
struct
agp_memory
*
agp_generic_alloc_by_type
(
size_t
page_count
,
int
type
);
void
agp_generic_free_by_type
(
struct
agp_memory
*
curr
);
void
*
agp_generic_alloc_page
(
void
);
void
agp_generic_destroy_page
(
void
*
addr
);
void
agp_free_key
(
int
key
);
...
...
drivers/char/agp/ali-agp.c
View file @
459bf5a9
...
...
@@ -33,14 +33,14 @@ static int ali_fetch_size(void)
return
0
;
}
static
void
ali_tlbflush
(
agp_memory
*
mem
)
static
void
ali_tlbflush
(
struct
agp_memory
*
mem
)
{
u32
temp
;
pci_read_config_dword
(
agp_bridge
->
dev
,
ALI_TLBCTRL
,
&
temp
);
// clear tag
pci_write_config_dword
(
agp_bridge
->
dev
,
ALI_TAGCTRL
,
((
temp
&
0xfffffff0
)
|
0x00000001
|
0x00000002
)
);
temp
&=
0xfffffff0
;
temp
|=
(
1
<<
0
|
1
<<
1
);
pci_write_config_dword
(
agp_bridge
->
dev
,
ALI_TAGCTRL
,
temp
);
}
static
void
ali_cleanup
(
void
)
...
...
drivers/char/agp/alpha-agp.c
View file @
459bf5a9
...
...
@@ -68,7 +68,7 @@ static void alpha_core_agp_cleanup(void)
agp
->
ops
->
cleanup
(
agp
);
}
static
void
alpha_core_agp_tlbflush
(
agp_memory
*
mem
)
static
void
alpha_core_agp_tlbflush
(
struct
agp_memory
*
mem
)
{
alpha_agp_info
*
agp
=
agp_bridge
->
dev_private_data
;
alpha_mv
.
mv_pci_tbi
(
agp
->
hose
,
0
,
-
1
);
...
...
@@ -86,7 +86,7 @@ static void alpha_core_agp_enable(u32 mode)
agp_device_command
(
agp
->
mode
.
lw
,
0
);
}
static
int
alpha_core_agp_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
static
int
alpha_core_agp_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
alpha_agp_info
*
agp
=
agp_bridge
->
dev_private_data
;
...
...
@@ -104,7 +104,7 @@ static int alpha_core_agp_insert_memory(agp_memory *mem, off_t pg_start,
return
status
;
}
static
int
alpha_core_agp_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
static
int
alpha_core_agp_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
alpha_agp_info
*
agp
=
agp_bridge
->
dev_private_data
;
...
...
drivers/char/agp/amd-k7-agp.c
View file @
459bf5a9
...
...
@@ -265,12 +265,12 @@ static void amd_irongate_cleanup(void)
* entries.
*/
static
void
amd_irongate_tlbflush
(
agp_memory
*
temp
)
static
void
amd_irongate_tlbflush
(
struct
agp_memory
*
temp
)
{
OUTREG32
(
amd_irongate_private
.
registers
,
AMD_TLBFLUSH
,
0x00000001
);
}
static
int
amd_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
amd_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
unsigned
long
*
cur_gatt
;
...
...
@@ -308,7 +308,7 @@ static int amd_insert_memory(agp_memory * mem, off_t pg_start, int type)
return
0
;
}
static
int
amd_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
amd_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
unsigned
long
*
cur_gatt
;
...
...
drivers/char/agp/amd-k8-agp.c
View file @
459bf5a9
...
...
@@ -38,13 +38,13 @@ static void flush_x86_64_tlb(struct pci_dev *dev)
pci_write_config_dword
(
dev
,
AMD_X86_64_GARTCACHECTL
,
tmp
);
}
static
void
amd_x86_64_tlbflush
(
agp_memory
*
temp
)
static
void
amd_x86_64_tlbflush
(
struct
agp_memory
*
temp
)
{
for_each_nb
()
flush_x86_64_tlb
(
hammers
[
gart_iterator
]);
}
static
int
x86_64_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
x86_64_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
long
tmp
;
...
...
drivers/char/agp/frontend.c
View file @
459bf5a9
...
...
@@ -42,9 +42,9 @@
static
struct
agp_front_data
agp_fe
;
static
agp_memory
*
agp_find_mem_by_key
(
int
key
)
static
struct
agp_memory
*
agp_find_mem_by_key
(
int
key
)
{
agp_memory
*
curr
;
struct
agp_memory
*
curr
;
if
(
agp_fe
.
current_controller
==
NULL
)
return
NULL
;
...
...
@@ -61,10 +61,10 @@ static agp_memory *agp_find_mem_by_key(int key)
return
curr
;
}
static
void
agp_remove_from_pool
(
agp_memory
*
temp
)
static
void
agp_remove_from_pool
(
struct
agp_memory
*
temp
)
{
agp_memory
*
prev
;
agp_memory
*
next
;
struct
agp_memory
*
prev
;
struct
agp_memory
*
next
;
/* Check to see if this is even in the memory pool */
...
...
@@ -218,9 +218,9 @@ static int agp_create_segment(struct agp_client *client, struct agp_region *regi
/* End - Routines for managing each client's segment list */
/* This function must only be called when current_controller != NULL */
static
void
agp_insert_into_pool
(
agp_memory
*
temp
)
static
void
agp_insert_into_pool
(
struct
agp_memory
*
temp
)
{
agp_memory
*
prev
;
struct
agp_memory
*
prev
;
prev
=
agp_fe
.
current_controller
->
pool
;
...
...
@@ -289,15 +289,15 @@ void agp_remove_file_private(struct agp_file_private * priv)
* Wrappers for agp_free_memory & agp_allocate_memory
* These make sure that internal lists are kept updated.
*/
static
void
agp_free_memory_wrap
(
agp_memory
*
memory
)
static
void
agp_free_memory_wrap
(
struct
agp_memory
*
memory
)
{
agp_remove_from_pool
(
memory
);
agp_free_memory
(
memory
);
}
static
agp_memory
*
agp_allocate_memory_wrap
(
size_t
pg_count
,
u32
type
)
static
struct
agp_memory
*
agp_allocate_memory_wrap
(
size_t
pg_count
,
u32
type
)
{
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
memory
=
agp_allocate_memory
(
pg_count
,
type
);
printk
(
KERN_DEBUG
"agp_allocate_memory: %p
\n
"
,
memory
);
...
...
@@ -383,8 +383,8 @@ static void agp_remove_all_clients(struct agp_controller *controller)
static
void
agp_remove_all_memory
(
struct
agp_controller
*
controller
)
{
agp_memory
*
memory
;
agp_memory
*
temp
;
struct
agp_memory
*
memory
;
struct
agp_memory
*
temp
;
memory
=
controller
->
pool
;
...
...
@@ -596,7 +596,7 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
unsigned
long
offset
;
struct
agp_client
*
client
;
struct
agp_file_private
*
priv
=
file
->
private_data
;
agp_kern_info
kerninfo
;
struct
agp_kern_info
kerninfo
;
down
(
&
(
agp_fe
.
agp_mutex
));
...
...
@@ -756,7 +756,7 @@ static ssize_t agp_write(struct file *file, const char *buf,
static
int
agpioc_info_wrap
(
struct
agp_file_private
*
priv
,
unsigned
long
arg
)
{
struct
agp_info
userinfo
;
agp_kern_info
kerninfo
;
struct
agp_kern_info
kerninfo
;
agp_copy_info
(
&
kerninfo
);
...
...
@@ -912,7 +912,7 @@ static int agpioc_protect_wrap(struct agp_file_private *priv, unsigned long arg)
static
int
agpioc_allocate_wrap
(
struct
agp_file_private
*
priv
,
unsigned
long
arg
)
{
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
struct
agp_allocate
alloc
;
DBG
(
""
);
...
...
@@ -936,7 +936,7 @@ static int agpioc_allocate_wrap(struct agp_file_private *priv, unsigned long arg
static
int
agpioc_deallocate_wrap
(
struct
agp_file_private
*
priv
,
unsigned
long
arg
)
{
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
DBG
(
""
);
memory
=
agp_find_mem_by_key
((
int
)
arg
);
...
...
@@ -951,7 +951,7 @@ static int agpioc_deallocate_wrap(struct agp_file_private *priv, unsigned long a
static
int
agpioc_bind_wrap
(
struct
agp_file_private
*
priv
,
unsigned
long
arg
)
{
struct
agp_bind
bind_info
;
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
DBG
(
""
);
if
(
copy_from_user
(
&
bind_info
,
(
void
*
)
arg
,
sizeof
(
struct
agp_bind
)))
...
...
@@ -967,7 +967,7 @@ static int agpioc_bind_wrap(struct agp_file_private *priv, unsigned long arg)
static
int
agpioc_unbind_wrap
(
struct
agp_file_private
*
priv
,
unsigned
long
arg
)
{
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
struct
agp_unbind
unbind
;
DBG
(
""
);
...
...
drivers/char/agp/generic.c
View file @
459bf5a9
...
...
@@ -69,16 +69,16 @@ static int agp_get_key(void)
}
agp_memory
*
agp_create_memory
(
int
scratch_pages
)
struct
agp_memory
*
agp_create_memory
(
int
scratch_pages
)
{
agp_memory
*
new
;
struct
agp_memory
*
new
;
new
=
kmalloc
(
sizeof
(
agp_memory
),
GFP_KERNEL
);
new
=
kmalloc
(
sizeof
(
struct
agp_memory
),
GFP_KERNEL
);
if
(
new
==
NULL
)
return
NULL
;
memset
(
new
,
0
,
sizeof
(
agp_memory
));
memset
(
new
,
0
,
sizeof
(
struct
agp_memory
));
new
->
key
=
agp_get_key
();
if
(
new
->
key
<
0
)
{
...
...
@@ -105,7 +105,7 @@ EXPORT_SYMBOL(agp_create_memory);
* It is the only function that can be called when the backend is not owned
* by the caller. (So it can free memory on client death.)
*/
void
agp_free_memory
(
agp_memory
*
curr
)
void
agp_free_memory
(
struct
agp_memory
*
curr
)
{
size_t
i
;
...
...
@@ -143,10 +143,10 @@ EXPORT_SYMBOL(agp_free_memory);
*
* It returns NULL whenever memory is unavailable.
*/
agp_memory
*
agp_allocate_memory
(
size_t
page_count
,
u32
type
)
struct
agp_memory
*
agp_allocate_memory
(
size_t
page_count
,
u32
type
)
{
int
scratch_pages
;
agp_memory
*
new
;
struct
agp_memory
*
new
;
size_t
i
;
if
(
agp_bridge
->
type
==
NOT_SUPPORTED
)
...
...
@@ -267,9 +267,9 @@ EXPORT_SYMBOL_GPL(agp_num_entries);
* This function copies information about the agp bridge device and the state of
* the agp backend into an agp_kern_info pointer.
*/
int
agp_copy_info
(
agp_kern_info
*
info
)
int
agp_copy_info
(
struct
agp_kern_info
*
info
)
{
memset
(
info
,
0
,
sizeof
(
agp_kern_info
));
memset
(
info
,
0
,
sizeof
(
struct
agp_kern_info
));
if
(
!
agp_bridge
||
agp_bridge
->
type
==
NOT_SUPPORTED
||
!
agp_bridge
->
version
)
{
info
->
chipset
=
NOT_SUPPORTED
;
...
...
@@ -311,7 +311,7 @@ EXPORT_SYMBOL(agp_copy_info);
* It returns -EINVAL if the pointer == NULL.
* It returns -EBUSY if the area of the table requested is already in use.
*/
int
agp_bind_memory
(
agp_memory
*
curr
,
off_t
pg_start
)
int
agp_bind_memory
(
struct
agp_memory
*
curr
,
off_t
pg_start
)
{
int
ret_val
;
...
...
@@ -346,7 +346,7 @@ EXPORT_SYMBOL(agp_bind_memory);
* It returns -EINVAL if this piece of agp_memory is not currently bound to
* the graphics aperture translation table or if the agp_memory pointer == NULL
*/
int
agp_unbind_memory
(
agp_memory
*
curr
)
int
agp_unbind_memory
(
struct
agp_memory
*
curr
)
{
int
ret_val
;
...
...
@@ -753,7 +753,7 @@ int agp_generic_free_gatt_table(void)
EXPORT_SYMBOL
(
agp_generic_free_gatt_table
);
int
agp_generic_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
int
agp_generic_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
num_entries
;
size_t
i
;
...
...
@@ -821,7 +821,7 @@ int agp_generic_insert_memory(agp_memory * mem, off_t pg_start, int type)
EXPORT_SYMBOL
(
agp_generic_insert_memory
);
int
agp_generic_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
int
agp_generic_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
size_t
i
;
...
...
@@ -842,14 +842,14 @@ int agp_generic_remove_memory(agp_memory * mem, off_t pg_start, int type)
EXPORT_SYMBOL
(
agp_generic_remove_memory
);
agp_memory
*
agp_generic_alloc_by_type
(
size_t
page_count
,
int
type
)
struct
agp_memory
*
agp_generic_alloc_by_type
(
size_t
page_count
,
int
type
)
{
return
NULL
;
}
EXPORT_SYMBOL
(
agp_generic_alloc_by_type
);
void
agp_generic_free_by_type
(
agp_memory
*
curr
)
void
agp_generic_free_by_type
(
struct
agp_memory
*
curr
)
{
if
(
curr
->
memory
!=
NULL
)
vfree
(
curr
->
memory
);
...
...
drivers/char/agp/hp-agp.c
View file @
459bf5a9
...
...
@@ -212,7 +212,7 @@ static void hp_zx1_cleanup(void)
iounmap
((
void
*
)
hp
->
registers
);
}
static
void
hp_zx1_tlbflush
(
agp_memory
*
mem
)
static
void
hp_zx1_tlbflush
(
struct
agp_memory
*
mem
)
{
struct
_hp_private
*
hp
=
&
hp_private
;
...
...
@@ -259,7 +259,8 @@ static int hp_zx1_free_gatt_table(void)
return
0
;
}
static
int
hp_zx1_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
hp_zx1_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
struct
_hp_private
*
hp
=
&
hp_private
;
int
i
,
k
;
...
...
@@ -304,7 +305,8 @@ static int hp_zx1_insert_memory(agp_memory * mem, off_t pg_start, int type)
return
0
;
}
static
int
hp_zx1_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
hp_zx1_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
struct
_hp_private
*
hp
=
&
hp_private
;
int
i
,
io_pg_start
,
io_pg_count
;
...
...
drivers/char/agp/i460-agp.c
View file @
459bf5a9
...
...
@@ -153,7 +153,7 @@ static int i460_fetch_size (void)
}
/* There isn't anything to do here since 460 has no GART TLB. */
static
void
i460_tlb_flush
(
agp_memory
*
mem
)
static
void
i460_tlb_flush
(
struct
agp_memory
*
mem
)
{
return
;
}
...
...
@@ -273,7 +273,8 @@ static int i460_free_gatt_table (void)
* PAGE_SIZE.
*/
static
int
i460_insert_memory_small_io_page
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_insert_memory_small_io_page
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
unsigned
long
paddr
,
io_pg_start
,
io_page_size
;
int
i
,
j
,
k
,
num_entries
;
...
...
@@ -312,7 +313,8 @@ static int i460_insert_memory_small_io_page (agp_memory *mem, off_t pg_start, in
return
0
;
}
static
int
i460_remove_memory_small_io_page
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_remove_memory_small_io_page
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
...
...
@@ -377,7 +379,8 @@ static void i460_free_large_page (struct lp_desc *lp)
atomic_sub
(
I460_KPAGES_PER_IOPAGE
,
&
agp_bridge
->
current_memory_agp
);
}
static
int
i460_insert_memory_large_io_page
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_insert_memory_large_io_page
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
start_offset
,
end_offset
,
idx
,
pg
,
num_entries
;
struct
lp_desc
*
start
,
*
end
,
*
lp
;
...
...
@@ -433,7 +436,8 @@ static int i460_insert_memory_large_io_page (agp_memory * mem, off_t pg_start, i
return
0
;
}
static
int
i460_remove_memory_large_io_page
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_remove_memory_large_io_page
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
pg
,
start_offset
,
end_offset
,
idx
,
num_entries
;
struct
lp_desc
*
start
,
*
end
,
*
lp
;
...
...
@@ -471,7 +475,8 @@ static int i460_remove_memory_large_io_page (agp_memory * mem, off_t pg_start, i
/* Wrapper routines to call the approriate {small_io_page,large_io_page} function */
static
int
i460_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
return
i460_insert_memory_small_io_page
(
mem
,
pg_start
,
type
);
...
...
@@ -479,7 +484,8 @@ static int i460_insert_memory (agp_memory * mem, off_t pg_start, int type)
return
i460_insert_memory_large_io_page
(
mem
,
pg_start
,
type
);
}
static
int
i460_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
i460_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
return
i460_remove_memory_small_io_page
(
mem
,
pg_start
,
type
);
...
...
drivers/char/agp/intel-agp.c
View file @
459bf5a9
...
...
@@ -107,7 +107,7 @@ static void intel_i810_cleanup(void)
iounmap
((
void
*
)
intel_i810_private
.
registers
);
}
static
void
intel_i810_tlbflush
(
agp_memory
*
mem
)
static
void
intel_i810_tlbflush
(
struct
agp_memory
*
mem
)
{
return
;
}
...
...
@@ -117,7 +117,7 @@ static void intel_i810_agp_enable(u32 mode)
return
;
}
static
int
intel_i810_insert_entries
(
agp_memory
*
mem
,
off_t
pg_start
,
static
int
intel_i810_insert_entries
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
...
...
@@ -166,7 +166,7 @@ static int intel_i810_insert_entries(agp_memory * mem, off_t pg_start,
return
0
;
}
static
int
intel_i810_remove_entries
(
agp_memory
*
mem
,
off_t
pg_start
,
static
int
intel_i810_remove_entries
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
...
...
@@ -187,9 +187,9 @@ static int intel_i810_remove_entries(agp_memory * mem, off_t pg_start,
* pointer into hardware.
* However the Xserver still writes to it through the agp aperture.
*/
static
agp_memory
*
alloc_agpphysmem_i8xx
(
size_t
pg_count
,
int
type
)
static
struct
agp_memory
*
alloc_agpphysmem_i8xx
(
size_t
pg_count
,
int
type
)
{
agp_memory
*
new
;
struct
agp_memory
*
new
;
void
*
addr
;
if
(
pg_count
!=
1
)
...
...
@@ -211,9 +211,9 @@ static agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
return
new
;
}
static
agp_memory
*
intel_i810_alloc_by_type
(
size_t
pg_count
,
int
type
)
static
struct
agp_memory
*
intel_i810_alloc_by_type
(
size_t
pg_count
,
int
type
)
{
agp_memory
*
new
;
struct
agp_memory
*
new
;
if
(
type
==
AGP_DCACHE_MEMORY
)
{
if
(
pg_count
!=
intel_i810_private
.
num_dcache_entries
)
...
...
@@ -235,7 +235,7 @@ static agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
return
NULL
;
}
static
void
intel_i810_free_by_type
(
agp_memory
*
curr
)
static
void
intel_i810_free_by_type
(
struct
agp_memory
*
curr
)
{
agp_free_key
(
curr
->
key
);
if
(
curr
->
type
==
AGP_PHYS_MEMORY
)
{
...
...
@@ -434,7 +434,8 @@ static void intel_i830_cleanup(void)
iounmap
((
void
*
)
intel_i830_private
.
registers
);
}
static
int
intel_i830_insert_entries
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
intel_i830_insert_entries
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
void
*
temp
;
...
...
@@ -474,7 +475,8 @@ static int intel_i830_insert_entries(agp_memory *mem,off_t pg_start,int type)
return
(
0
);
}
static
int
intel_i830_remove_entries
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
intel_i830_remove_entries
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
...
...
@@ -495,7 +497,7 @@ static int intel_i830_remove_entries(agp_memory *mem,off_t pg_start,int type)
return
(
0
);
}
static
agp_memory
*
intel_i830_alloc_by_type
(
size_t
pg_count
,
int
type
)
static
struct
agp_memory
*
intel_i830_alloc_by_type
(
size_t
pg_count
,
int
type
)
{
if
(
type
==
AGP_PHYS_MEMORY
)
return
(
alloc_agpphysmem_i8xx
(
pg_count
,
type
));
...
...
@@ -562,14 +564,14 @@ static int intel_815_fetch_size(void)
return
__intel_8xx_fetch_size
(
temp
);
}
static
void
intel_tlbflush
(
agp_memory
*
mem
)
static
void
intel_tlbflush
(
struct
agp_memory
*
mem
)
{
pci_write_config_dword
(
agp_bridge
->
dev
,
INTEL_AGPCTRL
,
0x2200
);
pci_write_config_dword
(
agp_bridge
->
dev
,
INTEL_AGPCTRL
,
0x2280
);
}
static
void
intel_8xx_tlbflush
(
agp_memory
*
mem
)
static
void
intel_8xx_tlbflush
(
struct
agp_memory
*
mem
)
{
u32
temp
;
pci_read_config_dword
(
agp_bridge
->
dev
,
INTEL_AGPCTRL
,
&
temp
);
...
...
@@ -674,7 +676,7 @@ static int intel_815_configure(void)
return
0
;
}
static
void
intel_820_tlbflush
(
agp_memory
*
mem
)
static
void
intel_820_tlbflush
(
struct
agp_memory
*
mem
)
{
return
;
}
...
...
drivers/char/agp/nvidia-agp.c
View file @
459bf5a9
...
...
@@ -148,7 +148,7 @@ static void nvidia_cleanup(void)
*/
extern
int
agp_memory_reserved
;
static
int
nvidia_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
nvidia_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
;
...
...
@@ -176,7 +176,7 @@ static int nvidia_insert_memory(agp_memory * mem, off_t pg_start, int type)
}
static
int
nvidia_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
nvidia_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
...
...
@@ -193,7 +193,7 @@ static int nvidia_remove_memory(agp_memory * mem, off_t pg_start, int type)
}
static
void
nvidia_tlbflush
(
agp_memory
*
mem
)
static
void
nvidia_tlbflush
(
struct
agp_memory
*
mem
)
{
unsigned
long
end
;
u32
wbc_reg
,
temp
;
...
...
drivers/char/agp/sis-agp.c
View file @
459bf5a9
...
...
@@ -33,7 +33,7 @@ static int sis_fetch_size(void)
return
0
;
}
static
void
sis_tlbflush
(
agp_memory
*
mem
)
static
void
sis_tlbflush
(
struct
agp_memory
*
mem
)
{
pci_write_config_byte
(
agp_bridge
->
dev
,
SIS_TLBFLUSH
,
0x02
);
}
...
...
drivers/char/agp/sworks-agp.c
View file @
459bf5a9
...
...
@@ -231,7 +231,7 @@ static int serverworks_fetch_size(void)
* more efficent, since agp_memory blocks can be a large number of
* entries.
*/
static
void
serverworks_tlbflush
(
agp_memory
*
temp
)
static
void
serverworks_tlbflush
(
struct
agp_memory
*
temp
)
{
unsigned
long
end
;
...
...
@@ -308,7 +308,7 @@ static void serverworks_cleanup(void)
iounmap
((
void
*
)
serverworks_private
.
registers
);
}
static
int
serverworks_insert_memory
(
agp_memory
*
mem
,
static
int
serverworks_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
...
...
@@ -349,7 +349,7 @@ static int serverworks_insert_memory(agp_memory * mem,
return
0
;
}
static
int
serverworks_remove_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
static
int
serverworks_remove_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
;
...
...
drivers/char/agp/uninorth-agp.c
View file @
459bf5a9
...
...
@@ -39,7 +39,7 @@ static int uninorth_fetch_size(void)
return
0
;
}
static
void
uninorth_tlbflush
(
agp_memory
*
mem
)
static
void
uninorth_tlbflush
(
struct
agp_memory
*
mem
)
{
pci_write_config_dword
(
agp_bridge
->
dev
,
UNI_N_CFG_GART_CTRL
,
UNI_N_CFG_GART_ENABLE
|
UNI_N_CFG_GART_INVAL
);
...
...
@@ -89,7 +89,8 @@ static int uninorth_configure(void)
return
0
;
}
static
int
uninorth_insert_memory
(
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
static
int
uninorth_insert_memory
(
struct
agp_memory
*
mem
,
off_t
pg_start
,
int
type
)
{
int
i
,
j
,
num_entries
;
void
*
temp
;
...
...
drivers/char/agp/via-agp.c
View file @
459bf5a9
...
...
@@ -68,7 +68,7 @@ static void via_cleanup(void)
}
static
void
via_tlbflush
(
agp_memory
*
mem
)
static
void
via_tlbflush
(
struct
agp_memory
*
mem
)
{
pci_write_config_dword
(
agp_bridge
->
dev
,
VIA_GARTCTRL
,
0x0000008f
);
pci_write_config_dword
(
agp_bridge
->
dev
,
VIA_GARTCTRL
,
0x0000000f
);
...
...
@@ -136,7 +136,7 @@ static void via_cleanup_agp3(void)
}
static
void
via_tlbflush_agp3
(
agp_memory
*
mem
)
static
void
via_tlbflush_agp3
(
struct
agp_memory
*
mem
)
{
u32
temp
;
...
...
drivers/char/drm/drmP.h
View file @
459bf5a9
...
...
@@ -444,7 +444,7 @@ typedef struct drm_device_dma {
#if __REALLY_HAVE_AGP
typedef
struct
drm_agp_mem
{
unsigned
long
handle
;
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
unsigned
long
bound
;
/* address */
int
pages
;
struct
drm_agp_mem
*
prev
;
...
...
@@ -452,7 +452,7 @@ typedef struct drm_agp_mem {
}
drm_agp_mem_t
;
typedef
struct
drm_agp_head
{
agp_kern_info
agp_info
;
struct
agp_kern_info
agp_info
;
drm_agp_mem_t
*
memory
;
unsigned
long
mode
;
int
enabled
;
...
...
@@ -657,10 +657,10 @@ extern void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size)
extern
void
DRM
(
ioremapfree
)(
void
*
pt
,
unsigned
long
size
);
#if __REALLY_HAVE_AGP
extern
agp_memory
*
DRM
(
alloc_agp
)(
int
pages
,
u32
type
);
extern
int
DRM
(
free_agp
)(
agp_memory
*
handle
,
int
pages
);
extern
int
DRM
(
bind_agp
)(
agp_memory
*
handle
,
unsigned
int
start
);
extern
int
DRM
(
unbind_agp
)(
agp_memory
*
handle
);
extern
struct
agp_memory
*
DRM
(
alloc_agp
)(
int
pages
,
u32
type
);
extern
int
DRM
(
free_agp
)(
struct
agp_memory
*
handle
,
int
pages
);
extern
int
DRM
(
bind_agp
)(
struct
agp_memory
*
handle
,
unsigned
int
start
);
extern
int
DRM
(
unbind_agp
)(
struct
agp_memory
*
handle
);
#endif
/* Misc. IOCTL support (drm_ioctl.h) */
...
...
@@ -804,10 +804,10 @@ extern int DRM(agp_unbind)(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
DRM
(
agp_bind
)(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
agp_memory
*
DRM
(
agp_allocate_memory
)(
size_t
pages
,
u32
type
);
extern
int
DRM
(
agp_free_memory
)(
agp_memory
*
handle
);
extern
int
DRM
(
agp_bind_memory
)(
agp_memory
*
handle
,
off_t
start
);
extern
int
DRM
(
agp_unbind_memory
)(
agp_memory
*
handle
);
extern
struct
agp_memory
*
DRM
(
agp_allocate_memory
)(
size_t
pages
,
u32
type
);
extern
int
DRM
(
agp_free_memory
)(
struct
agp_memory
*
handle
);
extern
int
DRM
(
agp_bind_memory
)(
struct
agp_memory
*
handle
,
off_t
start
);
extern
int
DRM
(
agp_unbind_memory
)(
struct
agp_memory
*
handle
);
#endif
/* Stub support (drm_stub.h) */
...
...
drivers/char/drm/drm_agpsupport.h
View file @
459bf5a9
...
...
@@ -44,7 +44,7 @@ int DRM(agp_info)(struct inode *inode, struct file *filp,
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
dev
;
agp_kern_info
*
kern
;
struct
agp_kern_info
*
kern
;
drm_agp_info_t
info
;
if
(
!
dev
->
agp
||
!
dev
->
agp
->
acquired
||
!
drm_agp
->
copy_info
)
...
...
@@ -126,7 +126,7 @@ int DRM(agp_alloc)(struct inode *inode, struct file *filp,
drm_device_t
*
dev
=
priv
->
dev
;
drm_agp_buffer_t
request
;
drm_agp_mem_t
*
entry
;
agp_memory
*
memory
;
struct
agp_memory
*
memory
;
unsigned
long
pages
;
u32
type
;
...
...
@@ -280,26 +280,26 @@ void DRM(agp_uninit)(void)
drm_agp
=
NULL
;
}
agp_memory
*
DRM
(
agp_allocate_memory
)(
size_t
pages
,
u32
type
)
struct
agp_memory
*
DRM
(
agp_allocate_memory
)(
size_t
pages
,
u32
type
)
{
if
(
!
drm_agp
->
allocate_memory
)
return
NULL
;
return
drm_agp
->
allocate_memory
(
pages
,
type
);
}
int
DRM
(
agp_free_memory
)(
agp_memory
*
handle
)
int
DRM
(
agp_free_memory
)(
struct
agp_memory
*
handle
)
{
if
(
!
handle
||
!
drm_agp
->
free_memory
)
return
0
;
drm_agp
->
free_memory
(
handle
);
return
1
;
}
int
DRM
(
agp_bind_memory
)(
agp_memory
*
handle
,
off_t
start
)
int
DRM
(
agp_bind_memory
)(
struct
agp_memory
*
handle
,
off_t
start
)
{
if
(
!
handle
||
!
drm_agp
->
bind_memory
)
return
-
EINVAL
;
return
drm_agp
->
bind_memory
(
handle
,
start
);
}
int
DRM
(
agp_unbind_memory
)(
agp_memory
*
handle
)
int
DRM
(
agp_unbind_memory
)(
struct
agp_memory
*
handle
)
{
if
(
!
handle
||
!
drm_agp
->
unbind_memory
)
return
-
EINVAL
;
return
drm_agp
->
unbind_memory
(
handle
);
...
...
drivers/char/drm/drm_memory.h
View file @
459bf5a9
...
...
@@ -134,22 +134,22 @@ void DRM(ioremapfree)(void *pt, unsigned long size)
}
#if __REALLY_HAVE_AGP
agp_memory
*
DRM
(
alloc_agp
)(
int
pages
,
u32
type
)
struct
agp_memory
*
DRM
(
alloc_agp
)(
int
pages
,
u32
type
)
{
return
DRM
(
agp_allocate_memory
)(
pages
,
type
);
}
int
DRM
(
free_agp
)(
agp_memory
*
handle
,
int
pages
)
int
DRM
(
free_agp
)(
struct
agp_memory
*
handle
,
int
pages
)
{
return
DRM
(
agp_free_memory
)(
handle
)
?
0
:
-
EINVAL
;
}
int
DRM
(
bind_agp
)(
agp_memory
*
handle
,
unsigned
int
start
)
int
DRM
(
bind_agp
)(
struct
agp_memory
*
handle
,
unsigned
int
start
)
{
return
DRM
(
agp_bind_memory
)(
handle
,
start
);
}
int
DRM
(
unbind_agp
)(
agp_memory
*
handle
)
int
DRM
(
unbind_agp
)(
struct
agp_memory
*
handle
)
{
return
DRM
(
agp_unbind_memory
)(
handle
);
}
...
...
include/linux/agp_backend.h
View file @
459bf5a9
/*
* AGPGART module version 0.100
* AGPGART backend specific includes. Not for userspace consumption.
*
* Copyright (C) 2002-2003 Dave Jones
* Copyright (C) 1999 Jeff Hartmann
* Copyright (C) 1999 Precision Insight, Inc.
...
...
@@ -28,6 +29,8 @@
#ifndef _AGP_BACKEND_H
#define _AGP_BACKEND_H 1
#ifdef __KERNEL__
#ifndef TRUE
#define TRUE 1
#endif
...
...
@@ -46,7 +49,7 @@ struct agp_version {
u16
minor
;
};
typedef
struct
_
agp_kern_info
{
struct
agp_kern_info
{
struct
agp_version
version
;
struct
pci_dev
*
device
;
enum
chipset_type
chipset
;
...
...
@@ -58,7 +61,7 @@ typedef struct _agp_kern_info {
int
cant_use_aperture
;
unsigned
long
page_mask
;
struct
vm_operations_struct
*
vm_ops
;
}
agp_kern_info
;
};
/*
* The agp_memory structure has information about the block of agp memory
...
...
@@ -68,10 +71,10 @@ typedef struct _agp_kern_info {
* the items to detrimine the status of this block of agp memory.
*/
typedef
struct
_
agp_memory
{
struct
agp_memory
{
int
key
;
struct
_
agp_memory
*
next
;
struct
_
agp_memory
*
prev
;
struct
agp_memory
*
next
;
struct
agp_memory
*
prev
;
size_t
page_count
;
int
num_scratch_pages
;
unsigned
long
*
memory
;
...
...
@@ -80,15 +83,15 @@ typedef struct _agp_memory {
u32
physical
;
u8
is_bound
;
u8
is_flushed
;
}
agp_memory
;
};
#define AGP_NORMAL_MEMORY 0
extern
void
agp_free_memory
(
agp_memory
*
);
extern
agp_memory
*
agp_allocate_memory
(
size_t
,
u32
);
extern
int
agp_copy_info
(
agp_kern_info
*
);
extern
int
agp_bind_memory
(
agp_memory
*
,
off_t
);
extern
int
agp_unbind_memory
(
agp_memory
*
);
extern
void
agp_free_memory
(
struct
agp_memory
*
);
extern
struct
agp_memory
*
agp_allocate_memory
(
size_t
,
u32
);
extern
int
agp_copy_info
(
struct
agp_kern_info
*
);
extern
int
agp_bind_memory
(
struct
agp_memory
*
,
off_t
);
extern
int
agp_unbind_memory
(
struct
agp_memory
*
);
extern
void
agp_enable
(
u32
);
extern
int
agp_backend_acquire
(
void
);
extern
void
agp_backend_release
(
void
);
...
...
@@ -99,16 +102,17 @@ extern void agp_backend_release(void);
* use it. Keith Owens <kaos@ocs.com.au> 28 Oct 2000.
*/
typedef
struct
{
void
(
*
free_memory
)(
agp_memory
*
);
agp_memory
*
(
*
allocate_memory
)(
size_t
,
u32
);
int
(
*
bind_memory
)(
agp_memory
*
,
off_t
);
int
(
*
unbind_memory
)(
agp_memory
*
);
void
(
*
free_memory
)(
struct
agp_memory
*
);
struct
agp_memory
*
(
*
allocate_memory
)(
size_t
,
u32
);
int
(
*
bind_memory
)(
struct
agp_memory
*
,
off_t
);
int
(
*
unbind_memory
)(
struct
agp_memory
*
);
void
(
*
enable
)(
u32
);
int
(
*
acquire
)(
void
);
void
(
*
release
)(
void
);
int
(
*
copy_info
)(
agp_kern_info
*
);
int
(
*
copy_info
)(
struct
agp_kern_info
*
);
}
drm_agp_t
;
extern
const
drm_agp_t
*
drm_agp_p
;
#endif
/* __KERNEL__ */
#endif
/* _AGP_BACKEND_H */
include/linux/agpgart.h
View file @
459bf5a9
...
...
@@ -183,7 +183,7 @@ struct agp_controller {
struct
agp_controller
*
prev
;
pid_t
pid
;
int
num_clients
;
agp_memory
*
pool
;
struct
agp_memory
*
pool
;
struct
agp_client
*
clients
;
};
...
...
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