mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 07:38:25 +07:00
drm/nouveau/flcn/cmdq: switch to falcon queue printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
c2c9b24318
commit
baafecbf9a
@ -77,13 +77,12 @@ cmd_queue_open(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
|
|||||||
u32 size)
|
u32 size)
|
||||||
{
|
{
|
||||||
struct nvkm_falcon *falcon = priv->falcon;
|
struct nvkm_falcon *falcon = priv->falcon;
|
||||||
const struct nvkm_subdev *subdev = priv->falcon->owner;
|
|
||||||
bool rewind = false;
|
bool rewind = false;
|
||||||
|
|
||||||
mutex_lock(&queue->mutex);
|
mutex_lock(&queue->mutex);
|
||||||
|
|
||||||
if (!cmd_queue_has_room(priv, queue, size, &rewind)) {
|
if (!cmd_queue_has_room(priv, queue, size, &rewind)) {
|
||||||
nvkm_error(subdev, "queue full\n");
|
FLCNQ_DBG(queue, "queue full");
|
||||||
mutex_unlock(&queue->mutex);
|
mutex_unlock(&queue->mutex);
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
@ -107,7 +106,6 @@ static int
|
|||||||
cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
|
cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
|
||||||
struct nvkm_msgqueue_queue *queue)
|
struct nvkm_msgqueue_queue *queue)
|
||||||
{
|
{
|
||||||
const struct nvkm_subdev *subdev = priv->falcon->owner;
|
|
||||||
static unsigned timeout = 2000;
|
static unsigned timeout = 2000;
|
||||||
unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout);
|
unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout);
|
||||||
int ret = -EAGAIN;
|
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))
|
while (ret == -EAGAIN && time_before(jiffies, end_jiffies))
|
||||||
ret = cmd_queue_open(priv, queue, cmd->size);
|
ret = cmd_queue_open(priv, queue, cmd->size);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
nvkm_error(subdev, "pmu_queue_open_write failed\n");
|
FLCNQ_ERR(queue, "timeout waiting for queue space");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,8 +167,10 @@ nvkm_msgqueue_post(struct nvkm_msgqueue *priv, enum msgqueue_msg_priority prio,
|
|||||||
|
|
||||||
if (!seq->async) {
|
if (!seq->async) {
|
||||||
if (!wait_for_completion_timeout(&seq->done,
|
if (!wait_for_completion_timeout(&seq->done,
|
||||||
msecs_to_jiffies(1000)))
|
msecs_to_jiffies(1000))) {
|
||||||
|
FLCNQ_ERR(queue, "timeout waiting for reply");
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
|
}
|
||||||
ret = seq->result;
|
ret = seq->result;
|
||||||
nvkm_falcon_qmgr_seq_release(queue->qmgr, seq);
|
nvkm_falcon_qmgr_seq_release(queue->qmgr, seq);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user