lkml.org 
[lkml]   [2018]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.17 157/336] drm/nouveau/fifo/gk104-: poll for runlist update completion
    Date
    4.17-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Ben Skeggs <bskeggs@redhat.com>

    [ Upstream commit 4f2fc25c0f8bcc8db1b8a7b21e88c3d7f35c5acb ]

    Newer HW doesn't appear to send this event, which will cause long delays
    in runlist updates if they don't complete immediately.

    RM doesn't use these events anywhere, and an NVGPU commit message notes
    that polling is the preferred method even on HW that supports the event.

    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
    +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
    @@ -155,10 +155,10 @@ gk104_fifo_runlist_commit(struct gk104_f
    (target << 28));
    nvkm_wr32(device, 0x002274, (runl << 20) | nr);

    - if (wait_event_timeout(fifo->runlist[runl].wait,
    - !(nvkm_rd32(device, 0x002284 + (runl * 0x08))
    - & 0x00100000),
    - msecs_to_jiffies(2000)) == 0)
    + if (nvkm_msec(device, 2000,
    + if (!(nvkm_rd32(device, 0x002284 + (runl * 0x08)) & 0x00100000))
    + break;
    + ) < 0)
    nvkm_error(subdev, "runlist %d update timeout\n", runl);
    unlock:
    mutex_unlock(&subdev->mutex);

    \
     
     \ /
      Last update: 2018-08-01 20:36    [W:4.143 / U:1.664 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site