diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/core/client.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/client.h b/drivers/gpu/drm/nouveau/include/nvkm/core/client.h index 5485bbac5677..eaf5905a87a3 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/client.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/client.h @@ -12,8 +12,6 @@ struct nvkm_client { struct rb_root objroot; struct rb_root dmaroot; - struct nvkm_handle *root; - bool super; void *data; int (*ntfy)(const void *, u32, const void *, u32); @@ -21,9 +19,9 @@ struct nvkm_client { struct nvkm_vm *vm; }; -bool nvkm_client_insert(struct nvkm_client *, struct nvkm_handle *); -void nvkm_client_remove(struct nvkm_client *, struct nvkm_handle *); -struct nvkm_handle *nvkm_client_search(struct nvkm_client *, u64 handle); +bool nvkm_client_insert(struct nvkm_client *, struct nvkm_object *); +void nvkm_client_remove(struct nvkm_client *, struct nvkm_object *); +struct nvkm_object *nvkm_client_search(struct nvkm_client *, u64 object); int nvkm_client_new(const char *name, u64 device, const char *cfg, const char *dbg, struct nvkm_client **); @@ -31,14 +29,6 @@ void nvkm_client_del(struct nvkm_client **); int nvkm_client_init(struct nvkm_client *); int nvkm_client_fini(struct nvkm_client *, bool suspend); -static inline struct nvkm_client * -nvkm_client(struct nvkm_object *object) -{ - while (object && object->parent) - object = object->parent; - return container_of(object, struct nvkm_client, object); -} - 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); @@ -48,12 +38,15 @@ int nvkm_client_notify_put(struct nvkm_client *, int index); /* logging for client-facing objects */ #define nvif_printk(o,l,p,f,a...) do { \ struct nvkm_object *_object = (o); \ - struct nvkm_client *_client = nvkm_client(_object); \ + struct nvkm_client *_client = _object->client; \ if (_client->debug >= NV_DBG_##l) \ - printk(KERN_##p "nouveau: %s: "f, _client->name, ##a); \ + printk(KERN_##p "nouveau: %s:%08x:%08x: "f, _client->name, \ + _object->handle, _object->oclass, ##a); \ } while(0) +#define nvif_fatal(o,f,a...) nvif_printk((o), FATAL, CRIT, f, ##a) #define nvif_error(o,f,a...) nvif_printk((o), ERROR, ERR, f, ##a) #define nvif_debug(o,f,a...) nvif_printk((o), DEBUG, INFO, f, ##a) #define nvif_trace(o,f,a...) nvif_printk((o), TRACE, INFO, f, ##a) +#define nvif_info(o,f,a...) nvif_printk((o), INFO, INFO, f, ##a) #define nvif_ioctl(o,f,a...) nvif_trace((o), "ioctl: "f, ##a) #endif |