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
3f532ef1
Commit
3f532ef1
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/dma: switch to gpuobj accessor macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
6d06fd68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
25 deletions
+35
-25
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
+9
-7
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
+8
-6
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv04.c
+9
-5
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
+9
-7
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf100.c
View file @
3f532ef1
...
...
@@ -57,13 +57,15 @@ gf100_dmaobj_bind(struct nvkm_dmaobj *obj, struct nvkm_object *parent,
ret
=
nvkm_gpuobj_new
(
parent
,
parent
,
24
,
32
,
0
,
pgpuobj
);
if
(
ret
==
0
)
{
nv_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
nv_mclass
(
dmaobj
));
nv_wo32
(
*
pgpuobj
,
0x04
,
lower_32_bits
(
dmaobj
->
base
.
limit
));
nv_wo32
(
*
pgpuobj
,
0x08
,
lower_32_bits
(
dmaobj
->
base
.
start
));
nv_wo32
(
*
pgpuobj
,
0x0c
,
upper_32_bits
(
dmaobj
->
base
.
limit
)
<<
24
|
upper_32_bits
(
dmaobj
->
base
.
start
));
nv_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nv_wo32
(
*
pgpuobj
,
0x14
,
dmaobj
->
flags5
);
nvkm_kmap
(
*
pgpuobj
);
nvkm_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
nv_mclass
(
dmaobj
));
nvkm_wo32
(
*
pgpuobj
,
0x04
,
lower_32_bits
(
dmaobj
->
base
.
limit
));
nvkm_wo32
(
*
pgpuobj
,
0x08
,
lower_32_bits
(
dmaobj
->
base
.
start
));
nvkm_wo32
(
*
pgpuobj
,
0x0c
,
upper_32_bits
(
dmaobj
->
base
.
limit
)
<<
24
|
upper_32_bits
(
dmaobj
->
base
.
start
));
nvkm_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nvkm_wo32
(
*
pgpuobj
,
0x14
,
dmaobj
->
flags5
);
nvkm_done
(
*
pgpuobj
);
}
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/gf110.c
View file @
3f532ef1
...
...
@@ -63,12 +63,14 @@ gf110_dmaobj_bind(struct nvkm_dmaobj *obj, struct nvkm_object *parent,
ret
=
nvkm_gpuobj_new
(
parent
,
parent
,
24
,
32
,
0
,
pgpuobj
);
if
(
ret
==
0
)
{
nv_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
);
nv_wo32
(
*
pgpuobj
,
0x04
,
dmaobj
->
base
.
start
>>
8
);
nv_wo32
(
*
pgpuobj
,
0x08
,
dmaobj
->
base
.
limit
>>
8
);
nv_wo32
(
*
pgpuobj
,
0x0c
,
0x00000000
);
nv_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nv_wo32
(
*
pgpuobj
,
0x14
,
0x00000000
);
nvkm_kmap
(
*
pgpuobj
);
nvkm_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
);
nvkm_wo32
(
*
pgpuobj
,
0x04
,
dmaobj
->
base
.
start
>>
8
);
nvkm_wo32
(
*
pgpuobj
,
0x08
,
dmaobj
->
base
.
limit
>>
8
);
nvkm_wo32
(
*
pgpuobj
,
0x0c
,
0x00000000
);
nvkm_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nvkm_wo32
(
*
pgpuobj
,
0x14
,
0x00000000
);
nvkm_done
(
*
pgpuobj
);
}
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv04.c
View file @
3f532ef1
...
...
@@ -64,17 +64,21 @@ nv04_dmaobj_bind(struct nvkm_dmaobj *obj, struct nvkm_object *parent,
struct
nvkm_gpuobj
*
pgt
=
mmu
->
vm
->
pgt
[
0
].
obj
[
0
];
if
(
!
dmaobj
->
base
.
start
)
return
nvkm_gpuobj_dup
(
parent
,
pgt
,
pgpuobj
);
offset
=
nv_ro32
(
pgt
,
8
+
(
offset
>>
10
));
nvkm_kmap
(
pgt
);
offset
=
nvkm_ro32
(
pgt
,
8
+
(
offset
>>
10
));
offset
&=
0xfffff000
;
nvkm_done
(
pgt
);
}
ret
=
nvkm_gpuobj_new
(
parent
,
parent
,
16
,
16
,
0
,
&
gpuobj
);
*
pgpuobj
=
gpuobj
;
if
(
ret
==
0
)
{
nv_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
(
adjust
<<
20
));
nv_wo32
(
*
pgpuobj
,
0x04
,
length
);
nv_wo32
(
*
pgpuobj
,
0x08
,
dmaobj
->
flags2
|
offset
);
nv_wo32
(
*
pgpuobj
,
0x0c
,
dmaobj
->
flags2
|
offset
);
nvkm_kmap
(
*
pgpuobj
);
nvkm_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
(
adjust
<<
20
));
nvkm_wo32
(
*
pgpuobj
,
0x04
,
length
);
nvkm_wo32
(
*
pgpuobj
,
0x08
,
dmaobj
->
flags2
|
offset
);
nvkm_wo32
(
*
pgpuobj
,
0x0c
,
dmaobj
->
flags2
|
offset
);
nvkm_done
(
*
pgpuobj
);
}
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/nv50.c
View file @
3f532ef1
...
...
@@ -69,13 +69,15 @@ nv50_dmaobj_bind(struct nvkm_dmaobj *obj, struct nvkm_object *parent,
ret
=
nvkm_gpuobj_new
(
parent
,
parent
,
24
,
32
,
0
,
pgpuobj
);
if
(
ret
==
0
)
{
nv_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
nv_mclass
(
dmaobj
));
nv_wo32
(
*
pgpuobj
,
0x04
,
lower_32_bits
(
dmaobj
->
base
.
limit
));
nv_wo32
(
*
pgpuobj
,
0x08
,
lower_32_bits
(
dmaobj
->
base
.
start
));
nv_wo32
(
*
pgpuobj
,
0x0c
,
upper_32_bits
(
dmaobj
->
base
.
limit
)
<<
24
|
upper_32_bits
(
dmaobj
->
base
.
start
));
nv_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nv_wo32
(
*
pgpuobj
,
0x14
,
dmaobj
->
flags5
);
nvkm_kmap
(
*
pgpuobj
);
nvkm_wo32
(
*
pgpuobj
,
0x00
,
dmaobj
->
flags0
|
nv_mclass
(
dmaobj
));
nvkm_wo32
(
*
pgpuobj
,
0x04
,
lower_32_bits
(
dmaobj
->
base
.
limit
));
nvkm_wo32
(
*
pgpuobj
,
0x08
,
lower_32_bits
(
dmaobj
->
base
.
start
));
nvkm_wo32
(
*
pgpuobj
,
0x0c
,
upper_32_bits
(
dmaobj
->
base
.
limit
)
<<
24
|
upper_32_bits
(
dmaobj
->
base
.
start
));
nvkm_wo32
(
*
pgpuobj
,
0x10
,
0x00000000
);
nvkm_wo32
(
*
pgpuobj
,
0x14
,
dmaobj
->
flags5
);
nvkm_done
(
*
pgpuobj
);
}
return
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