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
64b5ce1f
Commit
64b5ce1f
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/falcon: switch to subdev printk macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
185eda33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
+14
-13
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
View file @
64b5ce1f
...
@@ -31,13 +31,13 @@ nvkm_falcon_intr(struct nvkm_subdev *subdev)
...
@@ -31,13 +31,13 @@ nvkm_falcon_intr(struct nvkm_subdev *subdev)
u32
intr
=
nv_ro32
(
falcon
,
0x008
)
&
dispatch
&
~
(
dispatch
>>
16
);
u32
intr
=
nv_ro32
(
falcon
,
0x008
)
&
dispatch
&
~
(
dispatch
>>
16
);
if
(
intr
&
0x00000010
)
{
if
(
intr
&
0x00000010
)
{
nv
_debug
(
falcon
,
"ucode halted
\n
"
);
nv
km_debug
(
subdev
,
"ucode halted
\n
"
);
nv_wo32
(
falcon
,
0x004
,
0x00000010
);
nv_wo32
(
falcon
,
0x004
,
0x00000010
);
intr
&=
~
0x00000010
;
intr
&=
~
0x00000010
;
}
}
if
(
intr
)
{
if
(
intr
)
{
nv
_error
(
falcon
,
"unhandled intr 0x
%08x
\n
"
,
intr
);
nv
km_error
(
subdev
,
"intr
%08x
\n
"
,
intr
);
nv_wo32
(
falcon
,
0x004
,
intr
);
nv_wo32
(
falcon
,
0x004
,
intr
);
}
}
}
}
...
@@ -69,8 +69,9 @@ vmemdup(const void *src, size_t len)
...
@@ -69,8 +69,9 @@ vmemdup(const void *src, size_t len)
int
int
_nvkm_falcon_init
(
struct
nvkm_object
*
object
)
_nvkm_falcon_init
(
struct
nvkm_object
*
object
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
object
);
struct
nvkm_falcon
*
falcon
=
(
void
*
)
object
;
struct
nvkm_falcon
*
falcon
=
(
void
*
)
object
;
struct
nvkm_subdev
*
subdev
=
&
falcon
->
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
const
struct
firmware
*
fw
;
const
struct
firmware
*
fw
;
char
name
[
32
]
=
"internal"
;
char
name
[
32
]
=
"internal"
;
int
ret
,
i
;
int
ret
,
i
;
...
@@ -95,10 +96,10 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -95,10 +96,10 @@ _nvkm_falcon_init(struct nvkm_object *object)
falcon
->
code
.
limit
=
(
caps
&
0x000001ff
)
<<
8
;
falcon
->
code
.
limit
=
(
caps
&
0x000001ff
)
<<
8
;
falcon
->
data
.
limit
=
(
caps
&
0x0003fe00
)
>>
1
;
falcon
->
data
.
limit
=
(
caps
&
0x0003fe00
)
>>
1
;
nv
_debug
(
falcon
,
"falcon version: %d
\n
"
,
falcon
->
version
);
nv
km_debug
(
subdev
,
"falcon version: %d
\n
"
,
falcon
->
version
);
nv
_debug
(
falcon
,
"secret level: %d
\n
"
,
falcon
->
secret
);
nv
km_debug
(
subdev
,
"secret level: %d
\n
"
,
falcon
->
secret
);
nv
_debug
(
falcon
,
"code limit: %d
\n
"
,
falcon
->
code
.
limit
);
nv
km_debug
(
subdev
,
"code limit: %d
\n
"
,
falcon
->
code
.
limit
);
nv
_debug
(
falcon
,
"data limit: %d
\n
"
,
falcon
->
data
.
limit
);
nv
km_debug
(
subdev
,
"data limit: %d
\n
"
,
falcon
->
data
.
limit
);
/* wait for 'uc halted' to be signalled before continuing */
/* wait for 'uc halted' to be signalled before continuing */
if
(
falcon
->
secret
&&
falcon
->
version
<
4
)
{
if
(
falcon
->
secret
&&
falcon
->
version
<
4
)
{
...
@@ -147,7 +148,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -147,7 +148,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
ret
=
request_firmware
(
&
fw
,
name
,
nv_device_base
(
device
));
ret
=
request_firmware
(
&
fw
,
name
,
nv_device_base
(
device
));
if
(
ret
)
{
if
(
ret
)
{
nv
_error
(
falcon
,
"unable to load firmware data
\n
"
);
nv
km_error
(
subdev
,
"unable to load firmware data
\n
"
);
return
ret
;
return
ret
;
}
}
...
@@ -162,7 +163,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -162,7 +163,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
ret
=
request_firmware
(
&
fw
,
name
,
nv_device_base
(
device
));
ret
=
request_firmware
(
&
fw
,
name
,
nv_device_base
(
device
));
if
(
ret
)
{
if
(
ret
)
{
nv
_error
(
falcon
,
"unable to load firmware code
\n
"
);
nv
km_error
(
subdev
,
"unable to load firmware code
\n
"
);
return
ret
;
return
ret
;
}
}
...
@@ -173,15 +174,15 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -173,15 +174,15 @@ _nvkm_falcon_init(struct nvkm_object *object)
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
nv
_debug
(
falcon
,
"firmware: %s (%s)
\n
"
,
name
,
falcon
->
data
.
data
?
nv
km_debug
(
subdev
,
"firmware: %s (%s)
\n
"
,
name
,
falcon
->
data
.
data
?
"static code/data segments"
:
"self-bootstrapping"
);
"static code/data segments"
:
"self-bootstrapping"
);
/* 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_gpuobj_new
(
object
->
parent
,
NULL
,
falcon
->
code
.
size
,
256
,
0
,
&
falcon
->
core
);
256
,
0
,
&
falcon
->
core
);
if
(
ret
)
{
if
(
ret
)
{
nv
_error
(
falcon
,
"core allocation failed, %d
\n
"
,
ret
);
nv
km_error
(
subdev
,
"core allocation failed, %d
\n
"
,
ret
);
return
ret
;
return
ret
;
}
}
...
@@ -202,7 +203,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
...
@@ -202,7 +203,7 @@ _nvkm_falcon_init(struct nvkm_object *object)
}
else
{
}
else
{
if
(
falcon
->
code
.
size
>
falcon
->
code
.
limit
||
if
(
falcon
->
code
.
size
>
falcon
->
code
.
limit
||
falcon
->
data
.
size
>
falcon
->
data
.
limit
)
{
falcon
->
data
.
size
>
falcon
->
data
.
limit
)
{
nv
_error
(
falcon
,
"ucode exceeds falcon limit(s)
\n
"
);
nv
km_error
(
subdev
,
"ucode exceeds falcon limit(s)
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
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