From: Ben Skeggs <bske...@redhat.com>

Signed-off-by: Ben Skeggs <bske...@redhat.com>
---
 src/gallium/drivers/nouveau/nouveau_screen.c        | 1 +
 src/gallium/drivers/nouveau/nouveau_screen.h        | 1 +
 src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c 
b/src/gallium/drivers/nouveau/nouveau_screen.c
index a6065e4..a012579 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -175,6 +175,7 @@ nouveau_screen_init(struct nouveau_screen *screen, struct 
nouveau_device *dev)
                             data, size, &screen->channel);
    if (ret)
       return ret;
+   screen->drm = nouveau_drm(&dev->object);
    screen->device = dev;
 
    ret = nouveau_client_new(screen->device, &screen->client);
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h 
b/src/gallium/drivers/nouveau/nouveau_screen.h
index 328646f..28c4760 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -17,6 +17,7 @@ struct nouveau_bo;
 
 struct nouveau_screen {
    struct pipe_screen base;
+   struct nouveau_drm *drm;
    struct nouveau_device *device;
    struct nouveau_object *channel;
    struct nouveau_client *client;
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c 
b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index c6603e3..3ed644e 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -27,7 +27,7 @@ bool nouveau_drm_screen_unref(struct nouveau_screen *screen)
        ret = --screen->refcount;
        assert(ret >= 0);
        if (ret == 0)
-               util_hash_table_remove(fd_tab, 
intptr_to_pointer(screen->device->fd));
+               util_hash_table_remove(fd_tab, 
intptr_to_pointer(screen->drm->fd));
        pipe_mutex_unlock(nouveau_screen_mutex);
        return ret == 0;
 }
-- 
2.6.3

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to