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
85f7c3a0
Commit
85f7c3a0
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/secboot/gm200: initialise vmm with new interfaces
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
7eac5f4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
+9
-9
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h
+1
-1
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
View file @
85f7c3a0
...
@@ -48,13 +48,13 @@ gm200_secboot_run_blob(struct nvkm_secboot *sb, struct nvkm_gpuobj *blob,
...
@@ -48,13 +48,13 @@ gm200_secboot_run_blob(struct nvkm_secboot *sb, struct nvkm_gpuobj *blob,
return
ret
;
return
ret
;
/* Map the HS firmware so the HS bootloader can see it */
/* Map the HS firmware so the HS bootloader can see it */
ret
=
nvkm_vm_get
(
gsb
->
vm
,
blob
->
size
,
12
,
NV_MEM_ACCESS_RW
,
&
vma
);
ret
=
nvkm_vm_get
(
gsb
->
vm
m
,
blob
->
size
,
12
,
NV_MEM_ACCESS_RW
,
&
vma
);
if
(
ret
)
{
if
(
ret
)
{
nvkm_falcon_put
(
falcon
,
subdev
);
nvkm_falcon_put
(
falcon
,
subdev
);
return
ret
;
return
ret
;
}
}
ret
=
nvkm_memory_map
(
blob
,
0
,
gsb
->
vm
,
&
vma
,
NULL
,
0
);
ret
=
nvkm_memory_map
(
blob
,
0
,
gsb
->
vm
m
,
&
vma
,
NULL
,
0
);
if
(
ret
)
if
(
ret
)
goto
end
;
goto
end
;
...
@@ -107,8 +107,6 @@ gm200_secboot_oneinit(struct nvkm_secboot *sb)
...
@@ -107,8 +107,6 @@ gm200_secboot_oneinit(struct nvkm_secboot *sb)
{
{
struct
gm200_secboot
*
gsb
=
gm200_secboot
(
sb
);
struct
gm200_secboot
*
gsb
=
gm200_secboot
(
sb
);
struct
nvkm_device
*
device
=
sb
->
subdev
.
device
;
struct
nvkm_device
*
device
=
sb
->
subdev
.
device
;
struct
nvkm_vm
*
vm
;
const
u64
vm_area_len
=
600
*
1024
;
int
ret
;
int
ret
;
/* Allocate instance block and VM */
/* Allocate instance block and VM */
...
@@ -117,14 +115,15 @@ gm200_secboot_oneinit(struct nvkm_secboot *sb)
...
@@ -117,14 +115,15 @@ gm200_secboot_oneinit(struct nvkm_secboot *sb)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nvkm_vm_new
(
device
,
0
,
vm_area_len
,
0
,
NULL
,
&
vm
);
ret
=
nvkm_vmm_new
(
device
,
0
,
600
*
1024
,
NULL
,
0
,
NULL
,
"acr"
,
&
gsb
->
vmm
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
atomic_inc
(
&
vm
->
engref
[
NVKM_SUBDEV_PMU
]);
atomic_inc
(
&
gsb
->
vmm
->
engref
[
NVKM_SUBDEV_PMU
]);
gsb
->
vmm
->
debug
=
gsb
->
base
.
subdev
.
debug
;
ret
=
nvkm_vm_ref
(
vm
,
&
gsb
->
vm
,
gsb
->
inst
);
ret
=
nvkm_vmm_join
(
gsb
->
vmm
,
gsb
->
inst
);
nvkm_vm_ref
(
NULL
,
&
vm
,
NULL
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -155,7 +154,8 @@ gm200_secboot_dtor(struct nvkm_secboot *sb)
...
@@ -155,7 +154,8 @@ gm200_secboot_dtor(struct nvkm_secboot *sb)
sb
->
acr
->
func
->
dtor
(
sb
->
acr
);
sb
->
acr
->
func
->
dtor
(
sb
->
acr
);
nvkm_vm_ref
(
NULL
,
&
gsb
->
vm
,
gsb
->
inst
);
nvkm_vmm_part
(
gsb
->
vmm
,
gsb
->
inst
);
nvkm_vmm_unref
(
&
gsb
->
vmm
);
nvkm_memory_unref
(
&
gsb
->
inst
);
nvkm_memory_unref
(
&
gsb
->
inst
);
return
gsb
;
return
gsb
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h
View file @
85f7c3a0
...
@@ -30,7 +30,7 @@ struct gm200_secboot {
...
@@ -30,7 +30,7 @@ struct gm200_secboot {
/* Instance block & address space used for HS FW execution */
/* Instance block & address space used for HS FW execution */
struct
nvkm_memory
*
inst
;
struct
nvkm_memory
*
inst
;
struct
nvkm_vm
*
v
m
;
struct
nvkm_vm
m
*
vm
m
;
};
};
#define gm200_secboot(sb) container_of(sb, struct gm200_secboot, base)
#define gm200_secboot(sb) container_of(sb, struct gm200_secboot, base)
...
...
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