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
1411a5ad
Commit
1411a5ad
authored
Dec 16, 2002
by
Dave Jones
Committed by
Dave Jones
Dec 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGP] Hopefully get the KT400 working in AGP3.0 mode.
parent
e4059995
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
11 deletions
+50
-11
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+1
-0
drivers/char/agp/generic-3.0.c
drivers/char/agp/generic-3.0.c
+3
-8
drivers/char/agp/i7x05-agp.c
drivers/char/agp/i7x05-agp.c
+6
-1
drivers/char/agp/via-agp.c
drivers/char/agp/via-agp.c
+40
-2
No files found.
drivers/char/agp/agp.h
View file @
1411a5ad
...
...
@@ -33,6 +33,7 @@ extern struct agp_bridge_data agp_bridge;
/* Generic routines. */
void
agp_generic_agp_enable
(
u32
mode
);
int
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
);
...
...
drivers/char/agp/generic-3.0.c
View file @
1411a5ad
#include <linux/list.h>
#include <linux/pci.h>
//#include <linux/pagemap.h>
//#include <linux/miscdevice.h>
//#include <linux/pm.h>
#include <linux/agp_backend.h>
#include "agp.h"
...
...
@@ -529,7 +524,7 @@ static int agp_3_0_node_enable(u32 mode, u32 minor)
* (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
)
int
agp_generic_agp_3_0_enable
(
u32
mode
)
{
u32
ncapid
,
major
,
minor
,
agp_3_0
;
...
...
@@ -548,9 +543,9 @@ void agp_generic_agp_3_0_enable(u32 mode)
*/
if
((
agp_3_0
>>
3
)
&
0x1
)
{
agp_3_0_node_enable
(
mode
,
minor
);
return
;
return
TRUE
;
}
}
agp_generic_agp_enable
(
mode
)
;
return
FALSE
;
}
drivers/char/agp/i7x05-agp.c
View file @
1411a5ad
...
...
@@ -87,6 +87,11 @@ 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
)
{
...
...
@@ -102,7 +107,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
=
agp_generic_agp_3_0
_enable
;
agp_bridge
.
agp_enable
=
i7505
_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 @
1411a5ad
...
...
@@ -94,7 +94,7 @@ static struct gatt_mask via_generic_masks[] =
{.
mask
=
0x00000000
,
.
type
=
0
}
};
int
__init
via_generic_setup
(
struct
pci_dev
*
pdev
)
static
int
__init
via_generic_setup
(
struct
pci_dev
*
pdev
)
{
agp_bridge
.
masks
=
via_generic_masks
;
agp_bridge
.
num_of_masks
=
1
;
...
...
@@ -124,7 +124,44 @@ int __init via_generic_setup (struct pci_dev *pdev)
return
0
;
}
struct
agp_device_ids
via_agp_device_ids
[]
__initdata
=
static
void
via_kt400_enable
(
u32
mode
)
{
if
((
agp_generic_agp_3_0_enable
)
==
FALSE
)
agp_generic_agp_enable
(
mode
);
}
static
int
__init
via_kt400_setup
(
struct
pci_dev
*
pdev
)
{
agp_bridge
.
masks
=
via_generic_masks
;
agp_bridge
.
num_of_masks
=
1
;
agp_bridge
.
aperture_sizes
=
(
void
*
)
via_generic_sizes
;
agp_bridge
.
size_type
=
U8_APER_SIZE
;
agp_bridge
.
num_aperture_sizes
=
7
;
agp_bridge
.
dev_private_data
=
NULL
;
agp_bridge
.
needs_scratch_page
=
FALSE
;
agp_bridge
.
configure
=
via_configure
;
agp_bridge
.
fetch_size
=
via_fetch_size
;
agp_bridge
.
cleanup
=
via_cleanup
;
agp_bridge
.
tlb_flush
=
via_tlbflush
;
agp_bridge
.
mask_memory
=
via_mask_memory
;
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
;
agp_bridge
.
insert_memory
=
agp_generic_insert_memory
;
agp_bridge
.
remove_memory
=
agp_generic_remove_memory
;
agp_bridge
.
alloc_by_type
=
agp_generic_alloc_by_type
;
agp_bridge
.
free_by_type
=
agp_generic_free_by_type
;
agp_bridge
.
agp_alloc_page
=
agp_generic_alloc_page
;
agp_bridge
.
agp_destroy_page
=
agp_generic_destroy_page
;
agp_bridge
.
suspend
=
agp_generic_suspend
;
agp_bridge
.
resume
=
agp_generic_resume
;
agp_bridge
.
cant_use_aperture
=
0
;
return
0
;
}
static
struct
agp_device_ids
via_agp_device_ids
[]
__initdata
=
{
{
.
device_id
=
PCI_DEVICE_ID_VIA_8501_0
,
...
...
@@ -170,6 +207,7 @@ struct agp_device_ids via_agp_device_ids[] __initdata =
.
device_id
=
PCI_DEVICE_ID_VIA_8377_0
,
.
chipset
=
VIA_APOLLO_KT400
,
.
chipset_name
=
"Apollo Pro KT400"
,
.
chipset_setup
=
via_kt400_setup
,
},
{
.
device_id
=
PCI_DEVICE_ID_VIA_8653_0
,
...
...
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