mirror of
https://github.com/torvalds/linux.git
synced 2026-04-23 17:15:46 -04:00
This is just refactoring to allow the lower layers to distinguish
between suspend and runtime suspend.
GSP 570 needs to set a flag with the GPU is going into GCOFF,
this flag taken from the opengpu driver is set whenever runtime
suspend is enterning GCOFF but not for normal suspend paths.
This just refactors the code, a subsequent patch use the information.
Fixes: 53dac06238 ("drm/nouveau/gsp: add support for 570.144")
Cc: <stable@vger.kernel.org>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Tested-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260203052431.2219998-3-airlied@gmail.com
23 lines
707 B
C
23 lines
707 B
C
/* SPDX-License-Identifier: MIT */
|
|
#ifndef __NVIF_DRIVER_H__
|
|
#define __NVIF_DRIVER_H__
|
|
#include <nvif/os.h>
|
|
struct nvif_client;
|
|
|
|
struct nvif_driver {
|
|
const char *name;
|
|
int (*init)(const char *name, u64 device, const char *cfg,
|
|
const char *dbg, void **priv);
|
|
int (*suspend)(void *priv, bool runtime);
|
|
int (*resume)(void *priv);
|
|
int (*ioctl)(void *priv, void *data, u32 size, void **hack);
|
|
void __iomem *(*map)(void *priv, u64 handle, u32 size);
|
|
void (*unmap)(void *priv, void __iomem *ptr, u32 size);
|
|
};
|
|
|
|
int nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
|
|
const char *name, u64 device, struct nvif_client *);
|
|
|
|
extern const struct nvif_driver nvif_driver_nvkm;
|
|
#endif
|