Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: eb284f4b3781 ("drm/nouveau/dp: Honor GSP link training retry timeouts")
Cc: stable@vger.kernel.org
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241111034126.2028401-1-airlied@gmail.com

+4 -4
+1 -1
drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c
··· 992 992 ctrl->data = data; 993 993 994 994 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) { 996 996 /* 997 997 * Device (likely an eDP panel) isn't ready yet, wait for the time specified 998 998 * by GSP before retrying again
+3 -3
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
··· 78 78 switch (rpc_status) { 79 79 case 0x55: /* NV_ERR_NOT_READY */ 80 80 case 0x66: /* NV_ERR_TIMEOUT_RETRY */ 81 - return -EAGAIN; 81 + return -EBUSY; 82 82 case 0x51: /* NV_ERR_NO_MEMORY */ 83 83 return -ENOMEM; 84 84 default: ··· 601 601 602 602 if (rpc->status) { 603 603 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) 605 605 nvkm_error(&gsp->subdev, "RM_ALLOC: 0x%x\n", rpc->status); 606 606 } else { 607 607 ret = repc ? rpc->params : NULL; ··· 660 660 661 661 if (rpc->status) { 662 662 ret = r535_rpc_status_to_errno(rpc->status); 663 - if (ret != -EAGAIN) 663 + if (ret != -EAGAIN && ret != -EBUSY) 664 664 nvkm_error(&gsp->subdev, "cli:0x%08x obj:0x%08x ctrl cmd:0x%08x failed: 0x%08x\n", 665 665 object->client->object.handle, object->handle, rpc->cmd, rpc->status); 666 666 }