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
baafecbf
Commit
baafecbf
authored
Jan 15, 2020
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/flcn/cmdq: switch to falcon queue printk macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
c2c9b243
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
+5
-5
No files found.
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
View file @
baafecbf
...
...
@@ -77,13 +77,12 @@ cmd_queue_open(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
u32
size
)
{
struct
nvkm_falcon
*
falcon
=
priv
->
falcon
;
const
struct
nvkm_subdev
*
subdev
=
priv
->
falcon
->
owner
;
bool
rewind
=
false
;
mutex_lock
(
&
queue
->
mutex
);
if
(
!
cmd_queue_has_room
(
priv
,
queue
,
size
,
&
rewind
))
{
nvkm_error
(
subdev
,
"queue full
\n
"
);
FLCNQ_DBG
(
queue
,
"queue full
"
);
mutex_unlock
(
&
queue
->
mutex
);
return
-
EAGAIN
;
}
...
...
@@ -107,7 +106,6 @@ static int
cmd_write
(
struct
nvkm_msgqueue
*
priv
,
struct
nvkm_msgqueue_hdr
*
cmd
,
struct
nvkm_msgqueue_queue
*
queue
)
{
const
struct
nvkm_subdev
*
subdev
=
priv
->
falcon
->
owner
;
static
unsigned
timeout
=
2000
;
unsigned
long
end_jiffies
=
jiffies
+
msecs_to_jiffies
(
timeout
);
int
ret
=
-
EAGAIN
;
...
...
@@ -115,7 +113,7 @@ cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
while
(
ret
==
-
EAGAIN
&&
time_before
(
jiffies
,
end_jiffies
))
ret
=
cmd_queue_open
(
priv
,
queue
,
cmd
->
size
);
if
(
ret
)
{
nvkm_error
(
subdev
,
"pmu_queue_open_write failed
\n
"
);
FLCNQ_ERR
(
queue
,
"timeout waiting for queue space
"
);
return
ret
;
}
...
...
@@ -169,8 +167,10 @@ nvkm_msgqueue_post(struct nvkm_msgqueue *priv, enum msgqueue_msg_priority prio,
if
(
!
seq
->
async
)
{
if
(
!
wait_for_completion_timeout
(
&
seq
->
done
,
msecs_to_jiffies
(
1000
)))
msecs_to_jiffies
(
1000
)))
{
FLCNQ_ERR
(
queue
,
"timeout waiting for reply"
);
return
-
ETIMEDOUT
;
}
ret
=
seq
->
result
;
nvkm_falcon_qmgr_seq_release
(
queue
->
qmgr
,
seq
);
}
...
...
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