Lines Matching defs:filp
141 struct file *filp;
151 obj->filp = uao_create(MAX(size, PAGE_SIZE), 0);
157 rw_obj_hold(obj->filp->vmobjlock);
158 uvm_obj_setlock(&obj->gemo_uvmobj, obj->filp->vmobjlock);
160 filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);
161 if (IS_ERR(filp))
162 return PTR_ERR(filp);
164 obj->filp = filp;
188 obj->filp = NULL;
194 obj->filp = NULL;
213 drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp)
219 mutex_lock(&filp->prime.lock);
221 drm_prime_remove_buf_handle_locked(&filp->prime,
224 mutex_unlock(&filp->prime.lock);
312 * @filp: drm file-private structure to use for the handle look up
315 * Removes the GEM handle from the @filp lookup table which has been added with
320 drm_gem_handle_delete(struct drm_file *filp, u32 handle)
324 spin_lock(&filp->table_lock);
327 obj = idr_replace(&filp->object_idr, NULL, handle);
328 spin_unlock(&filp->table_lock);
333 drm_gem_object_release_handle(handle, obj, filp);
336 spin_lock(&filp->table_lock);
337 idr_remove(&filp->object_idr, handle);
338 spin_unlock(&filp->table_lock);
618 ret = -uvm_obj_wirepages(obj->filp, 0, obj->size, NULL);
622 rw_enter(obj->filp->vmobjlock, RW_READER);
624 vm_page = uvm_pagelookup(obj->filp, ptoa(i));
627 rw_exit(obj->filp->vmobjlock);
643 mapping = obj->filp->f_mapping;
708 rw_enter(obj->filp->vmobjlock, RW_WRITER);
711 rw_exit(obj->filp->vmobjlock);
715 uvm_obj_unwirepages(obj->filp, 0, obj->size);
725 mapping = file_inode(obj->filp)->i_mapping;
759 static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
765 spin_lock(&filp->table_lock);
769 obj = idr_find(&filp->object_idr, handle[i]);
777 spin_unlock(&filp->table_lock);
784 * @filp: DRM file private date
801 int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
828 ret = objects_lookup(filp, handles, count, objs);
840 * @filp: DRM file private date
845 * A reference to the object named by the handle if such exists on @filp, NULL
851 drm_gem_object_lookup(struct drm_file *filp, u32 handle)
855 objects_lookup(filp, &handle, 1, &obj);
1037 * Called at close time when the filp is going away.
1039 * Releases any remaining references on objects by this filp.
1067 if (obj->filp)
1068 uao_detach(obj->filp);
1071 if (obj->filp)
1072 fput(obj->filp);
1266 * @filp: DRM file pointer
1279 int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
1281 struct drm_file *priv = filp->private_data;