From 9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 Mon Sep 17 00:00:00 2001 From: Yunhong Jiang Date: Tue, 4 Aug 2015 12:17:53 -0700 Subject: Add the rt linux 4.1.3-rt3 as base Import the rt linux 4.1.3-rt3 as OPNFV kvm base. It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and the base is: commit 0917f823c59692d751951bf5ea699a2d1e2f26a2 Author: Sebastian Andrzej Siewior Date: Sat Jul 25 12:13:34 2015 +0200 Prepare v4.1.3-rt3 Signed-off-by: Sebastian Andrzej Siewior We lose all the git history this way and it's not good. We should apply another opnfv project repo in future. Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423 Signed-off-by: Yunhong Jiang --- .../gpu/drm/nouveau/include/nvkm/core/client.h | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 kernel/drivers/gpu/drm/nouveau/include/nvkm/core/client.h (limited to 'kernel/drivers/gpu/drm/nouveau/include/nvkm/core/client.h') diff --git a/kernel/drivers/gpu/drm/nouveau/include/nvkm/core/client.h b/kernel/drivers/gpu/drm/nouveau/include/nvkm/core/client.h new file mode 100644 index 000000000..a35b38244 --- /dev/null +++ b/kernel/drivers/gpu/drm/nouveau/include/nvkm/core/client.h @@ -0,0 +1,55 @@ +#ifndef __NVKM_CLIENT_H__ +#define __NVKM_CLIENT_H__ +#include + +struct nvkm_client { + struct nvkm_namedb namedb; + struct nvkm_handle *root; + struct nvkm_object *device; + char name[32]; + u32 debug; + struct nvkm_vm *vm; + bool super; + void *data; + + int (*ntfy)(const void *, u32, const void *, u32); + struct nvkm_client_notify *notify[16]; +}; + +static inline struct nvkm_client * +nv_client(void *obj) +{ +#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) + nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); +#endif + return obj; +} + +static inline struct nvkm_client * +nvkm_client(void *obj) +{ + struct nvkm_object *client = nv_object(obj); + while (client && !(nv_iclass(client, NV_CLIENT_CLASS))) + client = client->parent; + return (void *)client; +} + +#define nvkm_client_create(n,c,oc,od,d) \ + nvkm_client_create_((n), (c), (oc), (od), sizeof(**d), (void **)d) + +int nvkm_client_create_(const char *name, u64 device, const char *cfg, + const char *dbg, int, void **); +#define nvkm_client_destroy(p) \ + nvkm_namedb_destroy(&(p)->base) + +int nvkm_client_init(struct nvkm_client *); +int nvkm_client_fini(struct nvkm_client *, bool suspend); +const char *nvkm_client_name(void *obj); + +int nvkm_client_notify_new(struct nvkm_object *, struct nvkm_event *, + void *data, u32 size); +int nvkm_client_notify_del(struct nvkm_client *, int index); +int nvkm_client_notify_get(struct nvkm_client *, int index); +int nvkm_client_notify_put(struct nvkm_client *, int index); +#endif -- cgit 1.2.3-korg