Skip to content

Commit 6ebd24b

Browse files
committed
drm/lima: save process info for debug usage
When task fail, we can find its process with this information. Tested-by: Andreas Baierl <ichgeh@imkreisrum.de> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200222024210.18697-2-yuq825@gmail.com
1 parent f019190 commit 6ebd24b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/gpu/drm/lima/lima_ctx.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
2727
if (err < 0)
2828
goto err_out0;
2929

30+
ctx->pid = task_pid_nr(current);
31+
get_task_comm(ctx->pname, current);
32+
3033
return 0;
3134

3235
err_out0:

‎drivers/gpu/drm/lima/lima_ctx.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define __LIMA_CTX_H__
66

77
#include <linux/xarray.h>
8+
#include <linux/sched.h>
89

910
#include "lima_device.h"
1011

@@ -13,6 +14,10 @@ struct lima_ctx {
1314
struct lima_device *dev;
1415
struct lima_sched_context context[lima_pipe_num];
1516
atomic_t guilty;
17+
18+
/* debug info */
19+
char pname[TASK_COMM_LEN];
20+
pid_t pid;
1621
};
1722

1823
struct lima_ctx_mgr {

0 commit comments

Comments
 (0)