diff options
author | Vasily Khoruzhick <anarsoul@gmail.com> | 2020-02-15 04:50:26 +0100 |
---|---|---|
committer | Qiang Yu <yuq825@gmail.com> | 2020-02-17 03:45:57 +0100 |
commit | 6707b755060563cb6b10d3c390fae10a600eb19d (patch) | |
tree | 302917733f0e363e81a3f80b61b1937a7e31a169 /drivers/gpu/drm/lima | |
parent | drm/pl111: Support Integrator IM-PD1 module (diff) | |
download | linux-6707b755060563cb6b10d3c390fae10a600eb19d.tar.xz linux-6707b755060563cb6b10d3c390fae10a600eb19d.zip |
drm/lima: fix recovering from PLBU out of memory
It looks like on PLBU_OUT_OF_MEM interrupt we need to resume from where we
stopped, i.e. new PLBU heap start is old end. Also update end address
in GP frame to grow heap on 2nd and subsequent out of memory interrupts.
Fixes: 2081e8dcf1ee ("drm/lima: recover task by enlarging heap buffer")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200215035026.3180698-1-anarsoul@gmail.com
Diffstat (limited to 'drivers/gpu/drm/lima')
-rw-r--r-- | drivers/gpu/drm/lima/lima_gp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/lima/lima_gp.c b/drivers/gpu/drm/lima/lima_gp.c index 52b210f9a605..d8841c870d90 100644 --- a/drivers/gpu/drm/lima/lima_gp.c +++ b/drivers/gpu/drm/lima/lima_gp.c @@ -231,8 +231,13 @@ static int lima_gp_task_recover(struct lima_sched_pipe *pipe) } gp_write(LIMA_GP_INT_MASK, LIMA_GP_IRQ_MASK_USED); + /* Resume from where we stopped, i.e. new start is old end */ + gp_write(LIMA_GP_PLBU_ALLOC_START_ADDR, + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2]); + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2] = + f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size; gp_write(LIMA_GP_PLBU_ALLOC_END_ADDR, - f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size); + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2]); gp_write(LIMA_GP_CMD, LIMA_GP_CMD_UPDATE_PLBU_ALLOC); return 0; } |