mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
e721d1cc81
Marking the context as guilty currently only makes the application which hits a single timeout problem to stop its rendering context entirely. All jobs submitted later are dropped from the guilty context. Lima runs on fairly underpowered hardware for modern standards and it is not entirely unreasonable that a rendering job may time out occasionally due to high system load or too demanding application stack. In this case it would be generally preferred to report the error but try to keep the application going. Other similar embedded GPU drivers don't make use of the guilty context flag. Now that there are reliability improvements to the lima timeout recovery handling, drop the guilty contexts to let the application keep running in this case. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240124025947.2110659-7-nunes.erico@gmail.com
35 lines
823 B
C
35 lines
823 B
C
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
|
|
/* Copyright 2018-2019 Qiang Yu <yuq825@gmail.com> */
|
|
|
|
#ifndef __LIMA_CTX_H__
|
|
#define __LIMA_CTX_H__
|
|
|
|
#include <linux/xarray.h>
|
|
#include <linux/sched.h>
|
|
|
|
#include "lima_device.h"
|
|
|
|
struct lima_ctx {
|
|
struct kref refcnt;
|
|
struct lima_device *dev;
|
|
struct lima_sched_context context[lima_pipe_num];
|
|
|
|
/* debug info */
|
|
char pname[TASK_COMM_LEN];
|
|
pid_t pid;
|
|
};
|
|
|
|
struct lima_ctx_mgr {
|
|
struct mutex lock;
|
|
struct xarray handles;
|
|
};
|
|
|
|
int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id);
|
|
int lima_ctx_free(struct lima_ctx_mgr *mgr, u32 id);
|
|
struct lima_ctx *lima_ctx_get(struct lima_ctx_mgr *mgr, u32 id);
|
|
void lima_ctx_put(struct lima_ctx *ctx);
|
|
void lima_ctx_mgr_init(struct lima_ctx_mgr *mgr);
|
|
void lima_ctx_mgr_fini(struct lima_ctx_mgr *mgr);
|
|
|
|
#endif
|