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
bce0670d
Commit
bce0670d
authored
Jun 30, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-dj.bkbits.net/agpgart
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
6079e248
67221af3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
35 deletions
+84
-35
drivers/char/agp/Kconfig
drivers/char/agp/Kconfig
+1
-1
drivers/char/agp/amd64-agp.c
drivers/char/agp/amd64-agp.c
+9
-0
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+64
-30
drivers/char/agp/sworks-agp.c
drivers/char/agp/sworks-agp.c
+7
-3
drivers/char/agp/via-agp.c
drivers/char/agp/via-agp.c
+1
-0
include/linux/pci_ids.h
include/linux/pci_ids.h
+2
-1
No files found.
drivers/char/agp/Kconfig
View file @
bce0670d
...
...
@@ -165,7 +165,7 @@ config AGP_EFFICEON
tristate "Transmeta Efficeon support"
depends on AGP && X86 && !X86_64
help
This option
f
ives you AGP support for the Transmeta Efficeon
This option
g
ives you AGP support for the Transmeta Efficeon
series processors with integrated northbridges.
You should say Y here if you use XFree86 3.3.6 or 4.x and want to
...
...
drivers/char/agp/amd64-agp.c
View file @
bce0670d
...
...
@@ -536,6 +536,15 @@ static struct pci_device_id agp_amd64_pci_table[] = {
.
subvendor
=
PCI_ANY_ID
,
.
subdevice
=
PCI_ANY_ID
,
},
/* VIA K8T800Pro */
{
.
class
=
(
PCI_CLASS_BRIDGE_HOST
<<
8
),
.
class_mask
=
~
0
,
.
vendor
=
PCI_VENDOR_ID_VIA
,
.
device
=
PCI_DEVICE_ID_VIA_K8T800PRO_0
,
.
subvendor
=
PCI_ANY_ID
,
.
subdevice
=
PCI_ANY_ID
,
},
/* VIA K8T800 */
{
.
class
=
(
PCI_CLASS_BRIDGE_HOST
<<
8
),
...
...
drivers/char/agp/generic.c
View file @
bce0670d
/*
* AGPGART driver.
* Copyright (C) 2002-200
3
Dave Jones.
* Copyright (C) 2002-200
4
Dave Jones.
* Copyright (C) 1999 Jeff Hartmann.
* Copyright (C) 1999 Precision Insight, Inc.
* Copyright (C) 1999 Xi Graphics, Inc.
...
...
@@ -404,12 +404,18 @@ static void agp_v2_parse_one(u32 *mode, u32 *cmd, u32 *tmp)
*
cmd
&=
~
(
AGPSTAT2_1X
|
AGPSTAT2_4X
);
/* 2X */
if
(
*
cmd
&
AGPSTAT2_1X
)
*
cmd
&=
~
(
AGPSTAT2_2X
|
AGPSTAT2_4X
);
/* 1X
f
*/
*
cmd
&=
~
(
AGPSTAT2_2X
|
AGPSTAT2_4X
);
/* 1X */
}
/*
* mode = requested mode.
* cmd = PCI_AGP_STATUS from agp bridge.
* tmp = PCI_AGP_STATUS from graphic card.
*/
static
void
agp_v3_parse_one
(
u32
*
mode
,
u32
*
cmd
,
u32
*
tmp
)
{
u32
origcmd
=*
cmd
,
origtmp
=*
tmp
;
/* ARQSZ - Set the value to the maximum one.
* Don't allow the mode register to override values. */
*
cmd
=
((
*
cmd
&
~
AGPSTAT_ARQSZ
)
|
...
...
@@ -452,17 +458,43 @@ static void agp_v3_parse_one(u32 *mode, u32 *cmd, u32 *tmp)
*
mode
|=
AGPSTAT3_4X
;
}
if
(
!
((
*
cmd
&
AGPSTAT3_8X
)
&&
(
*
tmp
&
AGPSTAT3_8X
)
&&
(
*
mode
&
AGPSTAT3_8X
)))
*
cmd
&=
~
AGPSTAT3_8X
;
if
(
*
mode
&
AGPSTAT3_8X
)
{
if
(
!
(
*
cmd
&
AGPSTAT3_8X
))
{
*
cmd
&=
~
(
AGPSTAT3_8X
|
AGPSTAT3_RSVD
);
*
cmd
|=
AGPSTAT3_4X
;
printk
(
"%s requested AGPx8 but bridge not capable.
\n
"
,
current
->
comm
);
return
;
}
if
(
!
(
*
tmp
&
AGPSTAT3_8X
))
{
*
cmd
&=
~
(
AGPSTAT3_8X
|
AGPSTAT3_RSVD
);
*
cmd
|=
AGPSTAT3_4X
;
printk
(
"%s requested AGPx8 but graphic card not capable.
\n
"
,
current
->
comm
);
return
;
}
/* All set, bridge & device can do AGP x8*/
*
cmd
&=
~
(
AGPSTAT3_4X
|
AGPSTAT3_RSVD
);
return
;
if
(
!
((
*
cmd
&
AGPSTAT3_4X
)
&&
(
*
tmp
&
AGPSTAT3_4X
)
&&
(
*
mode
&
AGPSTAT3_4X
)))
*
cmd
&=
~
AGPSTAT3_4X
;
}
else
{
/* Clear out unwanted bits. */
if
(
*
cmd
&
AGPSTAT3_8X
)
*
cmd
&=
~
(
AGPSTAT3_4X
|
AGPSTAT3_RSVD
);
if
(
*
cmd
&
AGPSTAT3_4X
)
/*
* If we didn't specify AGPx8, we can only do x4.
* If the hardware can't do x4, we're up shit creek, and never
* should have got this far.
*/
*
cmd
&=
~
(
AGPSTAT3_8X
|
AGPSTAT3_RSVD
);
if
((
*
cmd
&
AGPSTAT3_4X
)
&&
(
*
tmp
&
AGPSTAT3_4X
))
*
cmd
|=
AGPSTAT3_4X
;
else
{
printk
(
KERN_INFO
PFX
"Badness. Don't know which AGP mode to set. "
"[cmd:%x tmp:%x fell back to:- cmd:%x tmp:%x]
\n
"
,
origcmd
,
origtmp
,
*
cmd
,
*
tmp
);
if
(
!
(
*
cmd
&
AGPSTAT3_4X
))
printk
(
KERN_INFO
PFX
"Bridge couldn't do AGP x4.
\n
"
);
if
(
!
(
*
tmp
&
AGPSTAT3_4X
))
printk
(
KERN_INFO
PFX
"Graphic card couldn't do AGP x4.
\n
"
);
}
}
}
//FIXME: This doesn't smell right.
...
...
@@ -479,6 +511,8 @@ u32 agp_collect_device_status(u32 mode, u32 cmd)
if
(
!
cap_ptr
)
continue
;
//FIXME: We should probably skip anything here that
// isn't an AGP graphic card.
/*
* Ok, here we have a AGP device. Disable impossible
* settings, and adjust the readqueue to the minimum.
...
...
drivers/char/agp/sworks-agp.c
View file @
bce0670d
...
...
@@ -447,6 +447,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
struct
agp_bridge_data
*
bridge
;
struct
pci_dev
*
bridge_dev
;
u32
temp
,
temp2
;
u8
cap_ptr
=
0
;
/* Everything is on func 1 here so we are hardcoding function one */
bridge_dev
=
pci_find_slot
((
unsigned
int
)
pdev
->
bus
->
number
,
...
...
@@ -457,6 +458,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
return
-
ENODEV
;
}
cap_ptr
=
pci_find_capability
(
pdev
,
PCI_CAP_ID_AGP
);
switch
(
pdev
->
device
)
{
case
0x0006
:
/* ServerWorks CNB20HE
...
...
@@ -470,6 +473,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
break
;
default:
if
(
cap_ptr
)
printk
(
KERN_ERR
PFX
"Unsupported Serverworks chipset "
"(device id: %04x)
\n
"
,
pdev
->
device
);
return
-
ENODEV
;
...
...
drivers/char/agp/via-agp.c
View file @
bce0670d
...
...
@@ -434,6 +434,7 @@ static struct pci_device_id agp_via_pci_table[] = {
.subvendor = PCI_ANY_ID, \
.subdevice = PCI_ANY_ID, \
}
ID
(
PCI_DEVICE_ID_VIA_82C597_0
),
ID
(
PCI_DEVICE_ID_VIA_82C598_0
),
ID
(
PCI_DEVICE_ID_VIA_8501_0
),
ID
(
PCI_DEVICE_ID_VIA_8601_0
),
...
...
include/linux/pci_ids.h
View file @
bce0670d
...
...
@@ -1176,6 +1176,7 @@
#define PCI_DEVICE_ID_VIA_8763_0 0x0198
#define PCI_DEVICE_ID_VIA_8380_0 0x0204
#define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259
#define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282
#define PCI_DEVICE_ID_VIA_8363_0 0x0305
#define PCI_DEVICE_ID_VIA_8371_0 0x0391
#define PCI_DEVICE_ID_VIA_8501_0 0x0501
...
...
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