Displaying 5 results from an estimated 5 matches for "nouveau_libdrm_debug".
2015 Nov 26
0
[libdrm 06/13] nouveau: introduce object to represent the kernel client
...uct nouveau_object *obj, uint32_t pclass)
return obj;
}
+void
+nouveau_drm_del(struct nouveau_drm **pdrm)
+{
+ free(*pdrm);
+ *pdrm = NULL;
+}
+
+int
+nouveau_drm_new(int fd, struct nouveau_drm **pdrm)
+{
+ struct nouveau_drm *drm;
+ drmVersionPtr ver;
+
+#ifdef DEBUG
+ debug_init(getenv("NOUVEAU_LIBDRM_DEBUG"));
+#endif
+
+ if (!(drm = *pdrm = calloc(1, sizeof(*drm))))
+ return -ENOMEM;
+ drm->fd = fd;
+
+ if (!(ver = drmGetVersion(fd))) {
+ nouveau_drm_del(pdrm);
+ return -EINVAL;
+ }
+
+ drm->drm_version = (ver->version_major << 24) |
+ (ver->version_minor << 8) |...
2015 Nov 26
0
[libdrm 07/13] nouveau: stack legacy nouveau_device on top of nouveau_drm
...alloc(1, sizeof(*nvdev));
- struct nouveau_device *dev = &nvdev->base;
+ struct nouveau_drm *drm;
+ struct nouveau_device_priv *nvdev;
+ struct nouveau_device *dev;
uint64_t chipset, vram, gart, bousage;
- drmVersionPtr ver;
int ret;
char *tmp;
-#ifdef DEBUG
- debug_init(getenv("NOUVEAU_LIBDRM_DEBUG"));
-#endif
-
- if (!nvdev)
+ if (!(nvdev = calloc(1, sizeof(*nvdev))))
return -ENOMEM;
+ dev = &nvdev->base;
+
ret = pthread_mutex_init(&nvdev->lock, NULL);
if (ret) {
free(nvdev);
return ret;
}
- nvdev->base.fd = fd;
-
- ver = drmGetVersion(fd);
- if (ver) d...
2015 Nov 26
18
[libdrm 01/13] nouveau: move more abi16-specific logic into abi16.c
From: Ben Skeggs <bskeggs at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
nouveau/abi16.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
nouveau/nouveau.c | 56 +++++++------------------------------------------
nouveau/private.h | 7 ++-----
3 files changed, 67 insertions(+), 58 deletions(-)
diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index
2015 Nov 27
14
[libdrm v2 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com>
This commit also modifies the install path of the main libdrm_nouveau
header to be under a nouveau/ subdirectory.
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
include/drm/nouveau_drm.h | 1 +
nouveau/Makefile.am | 11 +++-
nouveau/libdrm_nouveau.pc.in | 2 +-
nouveau/nvif/cl0080.h | 45 ++++++++++++++
2015 Dec 16
16
[libdrm v3 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com>
This commit also modifies the install path of the main libdrm_nouveau
header to be under a nouveau/ subdirectory.
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
include/drm/nouveau_drm.h | 1 +
nouveau/Makefile.am | 11 +++-
nouveau/libdrm_nouveau.pc.in | 2 +-
nouveau/nvif/cl0080.h | 45 ++++++++++++++