From 791a3e18508c851177488fe88ffdaabc8f1a6284 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 26 Nov 2015 12:59:13 +1000 Subject: nouveau: remove use of deprecated nouveau_device_wrap() Switching to the newer libdrm entry-points tells libdrm that it's OK to make use of newer kernel interfaces. We want to be able to isolate any bugs to either the interfaces changes, or the use of NVIF itself. As such, this commit has a slight hack which forces libdrm to continue using the older kernel interfaces. Signed-off-by: Ben Skeggs Reviewed-by: Emil Velikov Reviewed-by: Samuel Pitoiset Tested-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nouveau_screen.c | 4 ++++ src/gallium/drivers/nouveau/nouveau_winsys.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src/gallium/drivers/nouveau') diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 3cdcc2066a4..4ca9e5c06cd 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -234,6 +234,8 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev) void nouveau_screen_fini(struct nouveau_screen *screen) { + int fd = screen->drm->fd; + nouveau_mm_destroy(screen->mm_GART); nouveau_mm_destroy(screen->mm_VRAM); @@ -243,6 +245,8 @@ nouveau_screen_fini(struct nouveau_screen *screen) nouveau_object_del(&screen->channel); nouveau_device_del(&screen->device); + nouveau_drm_del(&screen->drm); + close(fd); } static void diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h index 3a686bd8f6c..f13988ea526 100644 --- a/src/gallium/drivers/nouveau/nouveau_winsys.h +++ b/src/gallium/drivers/nouveau/nouveau_winsys.h @@ -6,6 +6,7 @@ #include "pipe/p_defines.h" +#include #include #ifndef NV04_PFIFO_MAX_PACKET_LEN -- cgit v1.2.3