drm/lima: fix recovering from PLBU out of memory
Subsystems (3)
PATCH 1/1 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.
--- drivers/gpu/drm/lima/lima_gp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/lima/lima_gp.c +6 -1
@@ -224,8 +224,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 ; }
Signature · 6 lines
2.25.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Looks good for me, patch is:
Regards,
Qiang
Quoted 31 lines · Vasily Khoruzhick
It looks like on
PLBU_OUT_OF_MEMinterrupt 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 <[email protected]>--- drivers/gpu/drm/lima/lima_gp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/lima/lima_gp.c +6
-2@@ -224,8 +224,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 ; } --
Quoted 2 lines
2.25.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
applied to drm-misc-next.
Quoted 41 lines · Qiang Yu
Looks good for me, patch is:
Reviewed-by Qiang Yu <[email protected]>Regards,
QiangQuoted 33 lines · Vasily Khoruzhick
It looks like on
PLBU_OUT_OF_MEMinterrupt 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 <[email protected]>--- drivers/gpu/drm/lima/lima_gp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/lima/lima_gp.c +6
-2@@ -224,8 +224,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 ; } --2.25.0