Lines Matching defs:cd
132 struct host1x_memory_context *cd = &cdl->devs[i];
134 if (cd->dev.iommu->iommu_dev != dev->iommu->iommu_dev)
137 if (cd->owner == pid) {
138 refcount_inc(&cd->ref);
140 return cd;
141 } else if (!cd->owner && !free) {
142 free = cd;
160 void host1x_memory_context_get(struct host1x_memory_context *cd)
162 refcount_inc(&cd->ref);
166 void host1x_memory_context_put(struct host1x_memory_context *cd)
168 struct host1x_memory_context_list *cdl = &cd->host->context_list;
170 if (refcount_dec_and_mutex_lock(&cd->ref, &cdl->lock)) {
171 put_pid(cd->owner);
172 cd->owner = NULL;