Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
R128
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ermine
R128
Commits
c693931d
Commit
c693931d
authored
14 years ago
by
Ben Skeggs
Browse files
Options
Downloads
Patches
Plain Diff
drm/nv40: make detection of 0x4097-ful chipsets available everywhere
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
07cfe0e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
drivers/gpu/drm/nouveau/nouveau_drv.h
+14
-0
14 additions, 0 deletions
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nv40_graph.c
+1
-2
1 addition, 2 deletions
drivers/gpu/drm/nouveau/nv40_graph.c
drivers/gpu/drm/nouveau/nv40_grctx.c
+5
-16
5 additions, 16 deletions
drivers/gpu/drm/nouveau/nv40_grctx.c
with
20 additions
and
18 deletions
drivers/gpu/drm/nouveau/nouveau_drv.h
+
14
−
0
View file @
c693931d
...
...
@@ -1574,6 +1574,20 @@ nv_match_device(struct drm_device *dev, unsigned device,
dev
->
pdev
->
subsystem_device
==
sub_device
;
}
/* returns 1 if device is one of the nv4x using the 0x4497 object class,
* helpful to determine a number of other hardware features
*/
static
inline
int
nv44_graph_class
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
if
((
dev_priv
->
chipset
&
0xf0
)
==
0x60
)
return
1
;
return
!
(
0x0baf
&
(
1
<<
(
dev_priv
->
chipset
&
0x0f
)));
}
/* memory type/access flags, do not match hardware values */
#define NV_MEM_ACCESS_RO 1
#define NV_MEM_ACCESS_WO 2
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/nv40_graph.c
+
1
−
2
View file @
c693931d
...
...
@@ -451,8 +451,7 @@ nv40_graph_register(struct drm_device *dev)
NVOBJ_CLASS
(
dev
,
0x309e
,
GR
);
/* swzsurf */
/* curie */
if
(
dev_priv
->
chipset
>=
0x60
||
0x00005450
&
(
1
<<
(
dev_priv
->
chipset
&
0x0f
)))
if
(
nv44_graph_class
(
dev
))
NVOBJ_CLASS
(
dev
,
0x4497
,
GR
);
else
NVOBJ_CLASS
(
dev
,
0x4097
,
GR
);
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/nv40_grctx.c
+
5
−
16
View file @
c693931d
...
...
@@ -117,17 +117,6 @@
* - get vs count from 0x1540
*/
static
int
nv40_graph_4097
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
if
((
dev_priv
->
chipset
&
0xf0
)
==
0x60
)
return
0
;
return
!!
(
0x0baf
&
(
1
<<
dev_priv
->
chipset
));
}
static
int
nv40_graph_vs_count
(
struct
drm_device
*
dev
)
{
...
...
@@ -219,7 +208,7 @@ nv40_graph_construct_general(struct nouveau_grctx *ctx)
gr_def
(
ctx
,
0x4009dc
,
0x80000000
);
}
else
{
cp_ctx
(
ctx
,
0x400840
,
20
);
if
(
!
nv4
0
_graph_
4097
(
ctx
->
dev
))
{
if
(
nv4
4
_graph_
class
(
ctx
->
dev
))
{
for
(
i
=
0
;
i
<
8
;
i
++
)
gr_def
(
ctx
,
0x400860
+
(
i
*
4
),
0x00000001
);
}
...
...
@@ -228,7 +217,7 @@ nv40_graph_construct_general(struct nouveau_grctx *ctx)
gr_def
(
ctx
,
0x400888
,
0x00000040
);
cp_ctx
(
ctx
,
0x400894
,
11
);
gr_def
(
ctx
,
0x400894
,
0x00000040
);
if
(
nv4
0
_graph_
4097
(
ctx
->
dev
))
{
if
(
!
nv4
4
_graph_
class
(
ctx
->
dev
))
{
for
(
i
=
0
;
i
<
8
;
i
++
)
gr_def
(
ctx
,
0x4008a0
+
(
i
*
4
),
0x80000000
);
}
...
...
@@ -546,7 +535,7 @@ nv40_graph_construct_state3d_2(struct nouveau_grctx *ctx)
static
void
nv40_graph_construct_state3d_3
(
struct
nouveau_grctx
*
ctx
)
{
int
len
=
nv4
0
_graph_
4097
(
ctx
->
dev
)
?
0x0
6
84
:
0x0
0
84
;
int
len
=
nv4
4
_graph_
class
(
ctx
->
dev
)
?
0x0
0
84
:
0x0
6
84
;
cp_out
(
ctx
,
0x300000
);
cp_lsr
(
ctx
,
len
-
4
);
...
...
@@ -582,11 +571,11 @@ nv40_graph_construct_shader(struct nouveau_grctx *ctx)
}
else
{
b0_offset
=
0x1d40
/
4
;
/* 2200 */
b1_offset
=
0x3f40
/
4
;
/* 0b00 : 0a40 */
vs_len
=
nv4
0
_graph_
4097
(
dev
)
?
0x4
a4
0
/
4
:
0x4
98
0
/
4
;
vs_len
=
nv4
4
_graph_
class
(
dev
)
?
0x4
98
0
/
4
:
0x4
a4
0
/
4
;
}
cp_lsr
(
ctx
,
vs_len
*
vs_nr
+
0x300
/
4
);
cp_out
(
ctx
,
nv4
0
_graph_
4097
(
dev
)
?
0x8000
41
:
0x8000
29
);
cp_out
(
ctx
,
nv4
4
_graph_
class
(
dev
)
?
0x8000
29
:
0x8000
41
);
offset
=
ctx
->
ctxvals_pos
;
ctx
->
ctxvals_pos
+=
(
0x0300
/
4
+
(
vs_nr
*
vs_len
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment