nouveau: remove use of deprecated nouveau_device::fd
authorBen Skeggs <bskeggs@redhat.com>
Wed, 25 Nov 2015 23:38:35 +0000 (09:38 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 22 Dec 2015 03:23:59 +0000 (13:23 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/nouveau_screen.c
src/gallium/drivers/nouveau/nouveau_screen.h
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c

index a6065e45aaa58413b0034c6ac216031d13bcd635..a012579a9bda14dfaf1fe8adb879bc291c976ba1 100644 (file)
@@ -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);
index 328646fe3ce79beb0384074027cee9f861824760..28c4760af20cf0ea247727f34f579f42fcadcc3d 100644 (file)
@@ -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;
index c6603e38a0012ca6626f88f3c623a0dd8a5c2455..3ed644edfd812c487265923d3aa158b16da9db14 100644 (file)
@@ -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;
 }