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.

drm/panthor: Force an immediate reset on unrecoverable faults

If the FW reports an unrecoverable fault, we need to reset the GPU
before we can start re-using it again.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502183813.1612017-2-boris.brezillon@collabora.com

+12 -1
+1
drivers/gpu/drm/panthor/panthor_device.c
··· 293 293 PANTHOR_EXCEPTION(ACTIVE), 294 294 PANTHOR_EXCEPTION(CS_RES_TERM), 295 295 PANTHOR_EXCEPTION(CS_CONFIG_FAULT), 296 + PANTHOR_EXCEPTION(CS_UNRECOVERABLE), 296 297 PANTHOR_EXCEPTION(CS_ENDPOINT_FAULT), 297 298 PANTHOR_EXCEPTION(CS_BUS_FAULT), 298 299 PANTHOR_EXCEPTION(CS_INSTR_INVALID),
+1
drivers/gpu/drm/panthor/panthor_device.h
··· 216 216 DRM_PANTHOR_EXCEPTION_CS_RES_TERM = 0x0f, 217 217 DRM_PANTHOR_EXCEPTION_MAX_NON_FAULT = 0x3f, 218 218 DRM_PANTHOR_EXCEPTION_CS_CONFIG_FAULT = 0x40, 219 + DRM_PANTHOR_EXCEPTION_CS_UNRECOVERABLE = 0x41, 219 220 DRM_PANTHOR_EXCEPTION_CS_ENDPOINT_FAULT = 0x44, 220 221 DRM_PANTHOR_EXCEPTION_CS_BUS_FAULT = 0x48, 221 222 DRM_PANTHOR_EXCEPTION_CS_INSTR_INVALID = 0x49,
+10 -1
drivers/gpu/drm/panthor/panthor_sched.c
··· 1281 1281 if (group) 1282 1282 group->fatal_queues |= BIT(cs_id); 1283 1283 1284 - sched_queue_delayed_work(sched, tick, 0); 1284 + if (CS_EXCEPTION_TYPE(fatal) == DRM_PANTHOR_EXCEPTION_CS_UNRECOVERABLE) { 1285 + /* If this exception is unrecoverable, queue a reset, and make 1286 + * sure we stop scheduling groups until the reset has happened. 1287 + */ 1288 + panthor_device_schedule_reset(ptdev); 1289 + cancel_delayed_work(&sched->tick_work); 1290 + } else { 1291 + sched_queue_delayed_work(sched, tick, 0); 1292 + } 1293 + 1285 1294 drm_warn(&ptdev->base, 1286 1295 "CSG slot %d CS slot: %d\n" 1287 1296 "CS_FATAL.EXCEPTION_TYPE: 0x%x (%s)\n"