- "ioctl" interfaces will also be moved here in subsequent patches Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx> --- drivers/gpu/drm/nouveau/include/nvif/driver.h | 11 ----------- drivers/gpu/drm/nouveau/include/nvif/driverif.h | 15 +++++++++++++++ drivers/gpu/drm/nouveau/nvif/client.c | 1 + drivers/gpu/drm/nouveau/nvif/driver.c | 1 + drivers/gpu/drm/nouveau/nvif/object.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/driver.c | 2 +- 6 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 drivers/gpu/drm/nouveau/include/nvif/driverif.h diff --git a/drivers/gpu/drm/nouveau/include/nvif/driver.h b/drivers/gpu/drm/nouveau/include/nvif/driver.h index 7b08ff769039..c31fc66a4765 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/driver.h +++ b/drivers/gpu/drm/nouveau/include/nvif/driver.h @@ -4,17 +4,6 @@ #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); - 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 *); diff --git a/drivers/gpu/drm/nouveau/include/nvif/driverif.h b/drivers/gpu/drm/nouveau/include/nvif/driverif.h new file mode 100644 index 000000000000..c5018452d372 --- /dev/null +++ b/drivers/gpu/drm/nouveau/include/nvif/driverif.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +#ifndef __NVIF_DRIVERIF_H__ +#define __NVIF_DRIVERIF_H__ + +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); + 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); +}; +#endif diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/client.c index 098831d92eac..c0f93f4df2bb 100644 --- a/drivers/gpu/drm/nouveau/nvif/client.c +++ b/drivers/gpu/drm/nouveau/nvif/client.c @@ -24,6 +24,7 @@ #include <nvif/client.h> #include <nvif/driver.h> +#include <nvif/driverif.h> #include <nvif/ioctl.h> #include <nvif/class.h> diff --git a/drivers/gpu/drm/nouveau/nvif/driver.c b/drivers/gpu/drm/nouveau/nvif/driver.c index acb708df2559..4548ed35c31e 100644 --- a/drivers/gpu/drm/nouveau/nvif/driver.c +++ b/drivers/gpu/drm/nouveau/nvif/driver.c @@ -22,6 +22,7 @@ * Authors: Ben Skeggs */ #include <nvif/driver.h> +#include <nvif/driverif.h> #include <nvif/client.h> int diff --git a/drivers/gpu/drm/nouveau/nvif/object.c b/drivers/gpu/drm/nouveau/nvif/object.c index 0e8340710c11..a71e000ada91 100644 --- a/drivers/gpu/drm/nouveau/nvif/object.c +++ b/drivers/gpu/drm/nouveau/nvif/object.c @@ -24,7 +24,7 @@ #include <nvif/object.h> #include <nvif/client.h> -#include <nvif/driver.h> +#include <nvif/driverif.h> #include <nvif/ioctl.h> int diff --git a/drivers/gpu/drm/nouveau/nvkm/core/driver.c b/drivers/gpu/drm/nouveau/nvkm/core/driver.c index 1f5273ff2225..0777b9af0656 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/driver.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/driver.c @@ -30,7 +30,7 @@ #include <core/event.h> #include <core/ioctl.h> -#include <nvif/driver.h> +#include <nvif/driverif.h> #include <nvif/event.h> static void -- 2.41.0