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
effd6e06
Commit
effd6e06
authored
Nov 24, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0: implement channel structure initialisation
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
7460d703
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_object.c
+20
-4
No files found.
drivers/gpu/drm/nouveau/nouveau_object.c
View file @
effd6e06
...
...
@@ -779,6 +779,25 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
NV_DEBUG
(
dev
,
"ch%d vram=0x%08x tt=0x%08x
\n
"
,
chan
->
id
,
vram_h
,
tt_h
);
if
(
dev_priv
->
card_type
==
NV_C0
)
{
struct
nouveau_vm
*
vm
=
dev_priv
->
chan_vm
;
struct
nouveau_vm_pgd
*
vpgd
;
ret
=
nouveau_gpuobj_new
(
dev
,
NULL
,
4096
,
0x1000
,
0
,
&
chan
->
ramin
);
if
(
ret
)
return
ret
;
nouveau_vm_ref
(
vm
,
&
chan
->
vm
,
NULL
);
vpgd
=
list_first_entry
(
&
vm
->
pgd_list
,
struct
nouveau_vm_pgd
,
head
);
nv_wo32
(
chan
->
ramin
,
0x0200
,
lower_32_bits
(
vpgd
->
obj
->
vinst
));
nv_wo32
(
chan
->
ramin
,
0x0204
,
upper_32_bits
(
vpgd
->
obj
->
vinst
));
nv_wo32
(
chan
->
ramin
,
0x0208
,
0xffffffff
);
nv_wo32
(
chan
->
ramin
,
0x020c
,
0x000000ff
);
return
0
;
}
/* Allocate a chunk of memory for per-channel object storage */
ret
=
nouveau_gpuobj_channel_init_pramin
(
chan
);
if
(
ret
)
{
...
...
@@ -786,7 +805,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
return
ret
;
}
/* NV50
/NVC0
VM
/* NV50 VM
* - Allocate per-channel page-directory
* - Link with shared channel VM
*/
...
...
@@ -884,9 +903,6 @@ nouveau_gpuobj_channel_takedown(struct nouveau_channel *chan)
NV_DEBUG
(
dev
,
"ch%d
\n
"
,
chan
->
id
);
if
(
!
chan
->
ramht
)
return
;
nouveau_ramht_ref
(
NULL
,
&
chan
->
ramht
,
chan
);
nouveau_vm_ref
(
NULL
,
&
chan
->
vm
,
chan
->
vm_pd
);
...
...
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