• Home
  • Raw
  • Download

Lines Matching refs:dev

47 	struct fd_device *dev;  in fd_device_new()  local
62 dev = NULL; in fd_device_new()
66 dev = msm_device_new(fd); in fd_device_new()
67 dev->version = version->version_minor; in fd_device_new()
71 dev = kgsl_device_new(fd); in fd_device_new()
75 dev = NULL; in fd_device_new()
81 if (!dev) in fd_device_new()
84 atomic_set(&dev->refcnt, 1); in fd_device_new()
85 dev->fd = fd; in fd_device_new()
86 dev->handle_table = drmHashCreate(); in fd_device_new()
87 dev->name_table = drmHashCreate(); in fd_device_new()
88 fd_bo_cache_init(&dev->bo_cache, FALSE); in fd_device_new()
90 return dev; in fd_device_new()
99 struct fd_device *dev = fd_device_new(dup_fd); in fd_device_new_dup() local
100 if (dev) in fd_device_new_dup()
101 dev->closefd = 1; in fd_device_new_dup()
104 return dev; in fd_device_new_dup()
107 struct fd_device * fd_device_ref(struct fd_device *dev) in fd_device_ref() argument
109 atomic_inc(&dev->refcnt); in fd_device_ref()
110 return dev; in fd_device_ref()
113 static void fd_device_del_impl(struct fd_device *dev) in fd_device_del_impl() argument
115 fd_bo_cache_cleanup(&dev->bo_cache, 0); in fd_device_del_impl()
116 drmHashDestroy(dev->handle_table); in fd_device_del_impl()
117 drmHashDestroy(dev->name_table); in fd_device_del_impl()
118 if (dev->closefd) in fd_device_del_impl()
119 close(dev->fd); in fd_device_del_impl()
120 dev->funcs->destroy(dev); in fd_device_del_impl()
123 drm_private void fd_device_del_locked(struct fd_device *dev) in fd_device_del_locked() argument
125 if (!atomic_dec_and_test(&dev->refcnt)) in fd_device_del_locked()
127 fd_device_del_impl(dev); in fd_device_del_locked()
130 void fd_device_del(struct fd_device *dev) in fd_device_del() argument
132 if (!atomic_dec_and_test(&dev->refcnt)) in fd_device_del()
135 fd_device_del_impl(dev); in fd_device_del()
139 int fd_device_fd(struct fd_device *dev) in fd_device_fd() argument
141 return dev->fd; in fd_device_fd()
144 enum fd_version fd_device_version(struct fd_device *dev) in fd_device_version() argument
146 return dev->version; in fd_device_version()