mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
drm/nouveau/core: add engine method to assist in determining chsw direction
FIFO gives us load/save/switch status, and we need to be able to determine which direction a "switch" is failing during channel recovery. In order to do this, we apparently need to query the engine itself. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
84cd0a5565
commit
17041c7eef
@ -20,6 +20,7 @@ struct nvkm_engine_func {
|
||||
int (*fini)(struct nvkm_engine *, bool suspend);
|
||||
void (*intr)(struct nvkm_engine *);
|
||||
void (*tile)(struct nvkm_engine *, int region, struct nvkm_fb_tile *);
|
||||
bool (*chsw_load)(struct nvkm_engine *);
|
||||
|
||||
struct {
|
||||
int (*sclass)(struct nvkm_oclass *, int index,
|
||||
@ -44,4 +45,5 @@ int nvkm_engine_new_(const struct nvkm_engine_func *, struct nvkm_device *,
|
||||
struct nvkm_engine *nvkm_engine_ref(struct nvkm_engine *);
|
||||
void nvkm_engine_unref(struct nvkm_engine **);
|
||||
void nvkm_engine_tile(struct nvkm_engine *, int region);
|
||||
bool nvkm_engine_chsw_load(struct nvkm_engine *);
|
||||
#endif
|
||||
|
@ -27,6 +27,14 @@
|
||||
|
||||
#include <subdev/fb.h>
|
||||
|
||||
bool
|
||||
nvkm_engine_chsw_load(struct nvkm_engine *engine)
|
||||
{
|
||||
if (engine->func->chsw_load)
|
||||
return engine->func->chsw_load(engine);
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
nvkm_engine_unref(struct nvkm_engine **pengine)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user