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
nexedi
linux
Commits
2baaffff
Commit
2baaffff
authored
Jan 15, 2020
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/flcn/cmdq: cmd_queue_push can't fail, remove error handling for it
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2e8a6597
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
+3
-15
No files found.
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
View file @
2baaffff
...
@@ -49,13 +49,12 @@ cmd_queue_has_room(struct nvkm_msgqueue *priv,
...
@@ -49,13 +49,12 @@ cmd_queue_has_room(struct nvkm_msgqueue *priv,
return
size
<=
free
;
return
size
<=
free
;
}
}
static
int
static
void
cmd_queue_push
(
struct
nvkm_msgqueue
*
priv
,
struct
nvkm_msgqueue_queue
*
queue
,
cmd_queue_push
(
struct
nvkm_msgqueue
*
priv
,
struct
nvkm_msgqueue_queue
*
queue
,
void
*
data
,
u32
size
)
void
*
data
,
u32
size
)
{
{
nvkm_falcon_load_dmem
(
priv
->
falcon
,
data
,
queue
->
position
,
size
,
0
);
nvkm_falcon_load_dmem
(
priv
->
falcon
,
data
,
queue
->
position
,
size
,
0
);
queue
->
position
+=
ALIGN
(
size
,
QUEUE_ALIGNMENT
);
queue
->
position
+=
ALIGN
(
size
,
QUEUE_ALIGNMENT
);
return
0
;
}
}
/* REWIND unit is always 0x00 */
/* REWIND unit is always 0x00 */
...
@@ -64,17 +63,11 @@ cmd_queue_push(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
...
@@ -64,17 +63,11 @@ cmd_queue_push(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
static
void
static
void
cmd_queue_rewind
(
struct
nvkm_msgqueue
*
priv
,
struct
nvkm_msgqueue_queue
*
queue
)
cmd_queue_rewind
(
struct
nvkm_msgqueue
*
priv
,
struct
nvkm_msgqueue_queue
*
queue
)
{
{
const
struct
nvkm_subdev
*
subdev
=
priv
->
falcon
->
owner
;
struct
nvkm_msgqueue_hdr
cmd
;
struct
nvkm_msgqueue_hdr
cmd
;
int
err
;
cmd
.
unit_id
=
MSGQUEUE_UNIT_REWIND
;
cmd
.
unit_id
=
MSGQUEUE_UNIT_REWIND
;
cmd
.
size
=
sizeof
(
cmd
);
cmd
.
size
=
sizeof
(
cmd
);
err
=
cmd_queue_push
(
priv
,
queue
,
&
cmd
,
cmd
.
size
);
cmd_queue_push
(
priv
,
queue
,
&
cmd
,
cmd
.
size
);
if
(
err
)
nvkm_error
(
subdev
,
"queue %d rewind failed
\n
"
,
queue
->
index
);
else
nvkm_error
(
subdev
,
"queue %d rewinded
\n
"
,
queue
->
index
);
queue
->
position
=
queue
->
offset
;
queue
->
position
=
queue
->
offset
;
}
}
...
@@ -132,12 +125,7 @@ cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
...
@@ -132,12 +125,7 @@ cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
return
ret
;
return
ret
;
}
}
ret
=
cmd_queue_push
(
priv
,
queue
,
cmd
,
cmd
->
size
);
cmd_queue_push
(
priv
,
queue
,
cmd
,
cmd
->
size
);
if
(
ret
)
{
nvkm_error
(
subdev
,
"pmu_queue_push failed
\n
"
);
commit
=
false
;
}
cmd_queue_close
(
priv
,
queue
,
commit
);
cmd_queue_close
(
priv
,
queue
,
commit
);
return
ret
;
return
ret
;
}
}
...
...
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