Skip to content

Commit b6ad7de

Browse files
committed
nouveau: handle EBUSY and EAGAIN for GSP aux errors.
The upper layer transfer functions expect EBUSY as a return for when retries should be done. Fix the AUX error translation, but also check for both errors in a few places. Fixes: eb284f4 ("drm/nouveau/dp: Honor GSP link training retry timeouts") Cc: [email protected] Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 21ec425 commit b6ad7de

File tree

2 files changed

+4
-4
lines changed
  • drivers/gpu/drm/nouveau/nvkm

2 files changed

+4
-4
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ r535_dp_train_target(struct nvkm_outp *outp, u8 target, bool mst, u8 link_nr, u8
992992
ctrl->data = data;
993993

994994
ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl));
995-
if (ret == -EAGAIN && ctrl->retryTimeMs) {
995+
if ((ret == -EAGAIN || ret == -EBUSY) && ctrl->retryTimeMs) {
996996
/*
997997
* Device (likely an eDP panel) isn't ready yet, wait for the time specified
998998
* by GSP before retrying again

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ r535_rpc_status_to_errno(uint32_t rpc_status)
7878
switch (rpc_status) {
7979
case 0x55: /* NV_ERR_NOT_READY */
8080
case 0x66: /* NV_ERR_TIMEOUT_RETRY */
81-
return -EAGAIN;
81+
return -EBUSY;
8282
case 0x51: /* NV_ERR_NO_MEMORY */
8383
return -ENOMEM;
8484
default:
@@ -601,7 +601,7 @@ r535_gsp_rpc_rm_alloc_push(struct nvkm_gsp_object *object, void *argv, u32 repc)
601601

602602
if (rpc->status) {
603603
ret = ERR_PTR(r535_rpc_status_to_errno(rpc->status));
604-
if (PTR_ERR(ret) != -EAGAIN)
604+
if (PTR_ERR(ret) != -EAGAIN && PTR_ERR(ret) != -EBUSY)
605605
nvkm_error(&gsp->subdev, "RM_ALLOC: 0x%x\n", rpc->status);
606606
} else {
607607
ret = repc ? rpc->params : NULL;
@@ -660,7 +660,7 @@ r535_gsp_rpc_rm_ctrl_push(struct nvkm_gsp_object *object, void **argv, u32 repc)
660660

661661
if (rpc->status) {
662662
ret = r535_rpc_status_to_errno(rpc->status);
663-
if (ret != -EAGAIN)
663+
if (ret != -EAGAIN && ret != -EBUSY)
664664
nvkm_error(&gsp->subdev, "cli:0x%08x obj:0x%08x ctrl cmd:0x%08x failed: 0x%08x\n",
665665
object->client->object.handle, object->handle, rpc->cmd, rpc->status);
666666
}

0 commit comments

Comments
 (0)