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
562af10c
Commit
562af10c
authored
Feb 23, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50: flesh out ZCULL init and match nvidia on later chipsets
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
8f7286f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
5 deletions
+34
-5
drivers/gpu/drm/nouveau/nv50_graph.c
drivers/gpu/drm/nouveau/nv50_graph.c
+34
-5
No files found.
drivers/gpu/drm/nouveau/nv50_graph.c
View file @
562af10c
...
@@ -95,13 +95,41 @@ nv50_graph_init_regs__nv(struct drm_device *dev)
...
@@ -95,13 +95,41 @@ nv50_graph_init_regs__nv(struct drm_device *dev)
}
}
static
void
static
void
nv50_graph_init_
regs
(
struct
drm_device
*
dev
)
nv50_graph_init_
zcull
(
struct
drm_device
*
dev
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
int
i
;
NV_DEBUG
(
dev
,
"
\n
"
);
NV_DEBUG
(
dev
,
"
\n
"
);
nv_wr32
(
dev
,
NV04_PGRAPH_DEBUG_3
,
switch
(
dev_priv
->
chipset
&
0xf0
)
{
(
1
<<
2
)
/* HW_CONTEXT_SWITCH_ENABLED */
);
case
0x50
:
nv_wr32
(
dev
,
0x402ca8
,
0x800
);
case
0x80
:
case
0x90
:
nv_wr32
(
dev
,
0x402ca8
,
0x00000800
);
break
;
case
0xa0
:
default:
nv_wr32
(
dev
,
0x402cc0
,
0x00000000
);
if
(
dev_priv
->
chipset
==
0xa0
||
dev_priv
->
chipset
==
0xaa
||
dev_priv
->
chipset
==
0xac
)
{
nv_wr32
(
dev
,
0x402ca8
,
0x00000802
);
}
else
{
nv_wr32
(
dev
,
0x402cc0
,
0x00000000
);
nv_wr32
(
dev
,
0x402ca8
,
0x00000002
);
}
break
;
}
/* zero out zcull regions */
for
(
i
=
0
;
i
<
8
;
i
++
)
{
nv_wr32
(
dev
,
0x402c20
+
(
i
*
8
),
0x00000000
);
nv_wr32
(
dev
,
0x402c24
+
(
i
*
8
),
0x00000000
);
nv_wr32
(
dev
,
0x402c28
+
(
i
*
8
),
0x00000000
);
nv_wr32
(
dev
,
0x402c2c
+
(
i
*
8
),
0x00000000
);
}
}
}
static
int
static
int
...
@@ -136,6 +164,7 @@ nv50_graph_init_ctxctl(struct drm_device *dev)
...
@@ -136,6 +164,7 @@ nv50_graph_init_ctxctl(struct drm_device *dev)
}
}
kfree
(
cp
);
kfree
(
cp
);
nv_wr32
(
dev
,
0x40008c
,
0x00000004
);
/* HW_CTX_SWITCH_ENABLED */
nv_wr32
(
dev
,
0x400320
,
4
);
nv_wr32
(
dev
,
0x400320
,
4
);
nv_wr32
(
dev
,
NV40_PGRAPH_CTXCTL_CUR
,
0
);
nv_wr32
(
dev
,
NV40_PGRAPH_CTXCTL_CUR
,
0
);
nv_wr32
(
dev
,
NV20_PGRAPH_CHANNEL_CTX_POINTER
,
0
);
nv_wr32
(
dev
,
NV20_PGRAPH_CHANNEL_CTX_POINTER
,
0
);
...
@@ -151,7 +180,7 @@ nv50_graph_init(struct drm_device *dev)
...
@@ -151,7 +180,7 @@ nv50_graph_init(struct drm_device *dev)
nv50_graph_init_reset
(
dev
);
nv50_graph_init_reset
(
dev
);
nv50_graph_init_regs__nv
(
dev
);
nv50_graph_init_regs__nv
(
dev
);
nv50_graph_init_
regs
(
dev
);
nv50_graph_init_
zcull
(
dev
);
ret
=
nv50_graph_init_ctxctl
(
dev
);
ret
=
nv50_graph_init_ctxctl
(
dev
);
if
(
ret
)
if
(
ret
)
...
...
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