mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
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
This commit is contained in:
parent
f019190b7d
commit
6ebd24b6bf
@ -27,6 +27,9 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
|
||||
if (err < 0)
|
||||
goto err_out0;
|
||||
|
||||
ctx->pid = task_pid_nr(current);
|
||||
get_task_comm(ctx->pname, current);
|
||||
|
||||
return 0;
|
||||
|
||||
err_out0:
|
||||
|
@ -5,6 +5,7 @@
|
||||
#define __LIMA_CTX_H__
|
||||
|
||||
#include <linux/xarray.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include "lima_device.h"
|
||||
|
||||
@ -13,6 +14,10 @@ struct lima_ctx {
|
||||
struct lima_device *dev;
|
||||
struct lima_sched_context context[lima_pipe_num];
|
||||
atomic_t guilty;
|
||||
|
||||
/* debug info */
|
||||
char pname[TASK_COMM_LEN];
|
||||
pid_t pid;
|
||||
};
|
||||
|
||||
struct lima_ctx_mgr {
|
||||
|
Loading…
Reference in New Issue
Block a user