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
adb53d27
Commit
adb53d27
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bar/gf100: directly use instmem for channel descriptors
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d0659d32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
+13
-8
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c
View file @
adb53d27
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include <subdev/mmu.h>
#include <subdev/mmu.h>
struct
gf100_bar_vm
{
struct
gf100_bar_vm
{
struct
nvkm_
gpuobj
*
mem
;
struct
nvkm_
memory
*
mem
;
struct
nvkm_gpuobj
*
pgd
;
struct
nvkm_gpuobj
*
pgd
;
struct
nvkm_vm
*
vm
;
struct
nvkm_vm
*
vm
;
};
};
...
@@ -70,7 +70,7 @@ gf100_bar_ctor_vm(struct gf100_bar *bar, struct gf100_bar_vm *bar_vm,
...
@@ -70,7 +70,7 @@ gf100_bar_ctor_vm(struct gf100_bar *bar, struct gf100_bar_vm *bar_vm,
resource_size_t
bar_len
;
resource_size_t
bar_len
;
int
ret
;
int
ret
;
ret
=
nvkm_
gpuobj_new
(
nv_object
(
bar
),
NULL
,
0x1000
,
0
,
0
,
ret
=
nvkm_
memory_new
(
device
,
NVKM_MEM_TARGET_INST
,
0x1000
,
0
,
false
,
&
bar_vm
->
mem
);
&
bar_vm
->
mem
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -158,14 +158,14 @@ gf100_bar_dtor(struct nvkm_object *object)
...
@@ -158,14 +158,14 @@ gf100_bar_dtor(struct nvkm_object *object)
nvkm_vm_ref
(
NULL
,
&
bar
->
bar
[
1
].
vm
,
bar
->
bar
[
1
].
pgd
);
nvkm_vm_ref
(
NULL
,
&
bar
->
bar
[
1
].
vm
,
bar
->
bar
[
1
].
pgd
);
nvkm_gpuobj_ref
(
NULL
,
&
bar
->
bar
[
1
].
pgd
);
nvkm_gpuobj_ref
(
NULL
,
&
bar
->
bar
[
1
].
pgd
);
nvkm_
gpuobj_ref
(
NULL
,
&
bar
->
bar
[
1
].
mem
);
nvkm_
memory_del
(
&
bar
->
bar
[
1
].
mem
);
if
(
bar
->
bar
[
0
].
vm
)
{
if
(
bar
->
bar
[
0
].
vm
)
{
nvkm_memory_del
(
&
bar
->
bar
[
0
].
vm
->
pgt
[
0
].
mem
[
0
]);
nvkm_memory_del
(
&
bar
->
bar
[
0
].
vm
->
pgt
[
0
].
mem
[
0
]);
nvkm_vm_ref
(
NULL
,
&
bar
->
bar
[
0
].
vm
,
bar
->
bar
[
0
].
pgd
);
nvkm_vm_ref
(
NULL
,
&
bar
->
bar
[
0
].
vm
,
bar
->
bar
[
0
].
pgd
);
}
}
nvkm_gpuobj_ref
(
NULL
,
&
bar
->
bar
[
0
].
pgd
);
nvkm_gpuobj_ref
(
NULL
,
&
bar
->
bar
[
0
].
pgd
);
nvkm_
gpuobj_ref
(
NULL
,
&
bar
->
bar
[
0
].
mem
);
nvkm_
memory_del
(
&
bar
->
bar
[
0
].
mem
);
nvkm_bar_destroy
(
&
bar
->
base
);
nvkm_bar_destroy
(
&
bar
->
base
);
}
}
...
@@ -175,6 +175,7 @@ gf100_bar_init(struct nvkm_object *object)
...
@@ -175,6 +175,7 @@ gf100_bar_init(struct nvkm_object *object)
{
{
struct
gf100_bar
*
bar
=
(
void
*
)
object
;
struct
gf100_bar
*
bar
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
bar
->
base
.
subdev
.
device
;
struct
nvkm_device
*
device
=
bar
->
base
.
subdev
.
device
;
u32
addr
;
int
ret
;
int
ret
;
ret
=
nvkm_bar_init
(
&
bar
->
base
);
ret
=
nvkm_bar_init
(
&
bar
->
base
);
...
@@ -184,10 +185,14 @@ gf100_bar_init(struct nvkm_object *object)
...
@@ -184,10 +185,14 @@ gf100_bar_init(struct nvkm_object *object)
nvkm_mask
(
device
,
0x000200
,
0x00000100
,
0x00000000
);
nvkm_mask
(
device
,
0x000200
,
0x00000100
,
0x00000000
);
nvkm_mask
(
device
,
0x000200
,
0x00000100
,
0x00000100
);
nvkm_mask
(
device
,
0x000200
,
0x00000100
,
0x00000100
);
nvkm_wr32
(
device
,
0x001704
,
0x80000000
|
bar
->
bar
[
1
].
mem
->
addr
>>
12
);
addr
=
nvkm_memory_addr
(
bar
->
bar
[
1
].
mem
)
>>
12
;
if
(
bar
->
bar
[
0
].
mem
)
nvkm_wr32
(
device
,
0x001704
,
0x80000000
|
addr
);
nvkm_wr32
(
device
,
0x001714
,
0xc0000000
|
bar
->
bar
[
0
].
mem
->
addr
>>
12
);
if
(
bar
->
bar
[
0
].
mem
)
{
addr
=
nvkm_memory_addr
(
bar
->
bar
[
0
].
mem
)
>>
12
;
nvkm_wr32
(
device
,
0x001714
,
0xc0000000
|
addr
);
}
return
0
;
return
0
;
}
}
...
...
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