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
406ca8c7
Commit
406ca8c7
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/falcon: directly use instmem for ucode image
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
5b1ab0c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
+6
-4
No files found.
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
View file @
406ca8c7
...
@@ -35,7 +35,7 @@ struct nvkm_falcon {
...
@@ -35,7 +35,7 @@ struct nvkm_falcon {
u8
version
;
u8
version
;
u8
secret
;
u8
secret
;
struct
nvkm_
gpuobj
*
core
;
struct
nvkm_
memory
*
core
;
bool
external
;
bool
external
;
struct
{
struct
{
...
...
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
View file @
406ca8c7
...
@@ -168,8 +168,9 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -168,8 +168,9 @@ _nvkm_falcon_init(struct nvkm_object *object)
/* ensure any "self-bootstrapping" firmware image is in vram */
/* ensure any "self-bootstrapping" firmware image is in vram */
if
(
!
falcon
->
data
.
data
&&
!
falcon
->
core
)
{
if
(
!
falcon
->
data
.
data
&&
!
falcon
->
core
)
{
ret
=
nvkm_gpuobj_new
(
object
->
parent
,
NULL
,
falcon
->
code
.
size
,
ret
=
nvkm_memory_new
(
device
,
NVKM_MEM_TARGET_INST
,
256
,
0
,
&
falcon
->
core
);
falcon
->
code
.
size
,
256
,
false
,
&
falcon
->
core
);
if
(
ret
)
{
if
(
ret
)
{
nvkm_error
(
subdev
,
"core allocation failed, %d
\n
"
,
ret
);
nvkm_error
(
subdev
,
"core allocation failed, %d
\n
"
,
ret
);
return
ret
;
return
ret
;
...
@@ -183,12 +184,13 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -183,12 +184,13 @@ _nvkm_falcon_init(struct nvkm_object *object)
/* upload firmware bootloader (or the full code segments) */
/* upload firmware bootloader (or the full code segments) */
if
(
falcon
->
core
)
{
if
(
falcon
->
core
)
{
u64
addr
=
nvkm_memory_addr
(
falcon
->
core
);
if
(
device
->
card_type
<
NV_C0
)
if
(
device
->
card_type
<
NV_C0
)
nvkm_wr32
(
device
,
base
+
0x618
,
0x04000000
);
nvkm_wr32
(
device
,
base
+
0x618
,
0x04000000
);
else
else
nvkm_wr32
(
device
,
base
+
0x618
,
0x00000114
);
nvkm_wr32
(
device
,
base
+
0x618
,
0x00000114
);
nvkm_wr32
(
device
,
base
+
0x11c
,
0
);
nvkm_wr32
(
device
,
base
+
0x11c
,
0
);
nvkm_wr32
(
device
,
base
+
0x110
,
falcon
->
core
->
addr
>>
8
);
nvkm_wr32
(
device
,
base
+
0x110
,
addr
>>
8
);
nvkm_wr32
(
device
,
base
+
0x114
,
0
);
nvkm_wr32
(
device
,
base
+
0x114
,
0
);
nvkm_wr32
(
device
,
base
+
0x118
,
0x00006610
);
nvkm_wr32
(
device
,
base
+
0x118
,
0x00006610
);
}
else
{
}
else
{
...
@@ -243,7 +245,7 @@ _nvkm_falcon_fini(struct nvkm_object *object, bool suspend)
...
@@ -243,7 +245,7 @@ _nvkm_falcon_fini(struct nvkm_object *object, bool suspend)
const
u32
base
=
falcon
->
addr
;
const
u32
base
=
falcon
->
addr
;
if
(
!
suspend
)
{
if
(
!
suspend
)
{
nvkm_
gpuobj_ref
(
NULL
,
&
falcon
->
core
);
nvkm_
memory_del
(
&
falcon
->
core
);
if
(
falcon
->
external
)
{
if
(
falcon
->
external
)
{
vfree
(
falcon
->
data
.
data
);
vfree
(
falcon
->
data
.
data
);
vfree
(
falcon
->
code
.
data
);
vfree
(
falcon
->
code
.
data
);
...
...
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