vkms_obj          116 drivers/gpu/drm/vkms/vkms_composer.c 	struct vkms_gem_object *vkms_obj = drm_gem_to_vkms_gem(gem_obj);
vkms_obj          117 drivers/gpu/drm/vkms/vkms_composer.c 	void *vaddr_out = kzalloc(vkms_obj->gem.size, GFP_KERNEL);
vkms_obj          125 drivers/gpu/drm/vkms/vkms_composer.c 	if (WARN_ON(!vkms_obj->vaddr)) {
vkms_obj          130 drivers/gpu/drm/vkms/vkms_composer.c 	memcpy(vaddr_out, vkms_obj->vaddr, vkms_obj->gem.size);
vkms_obj          149 drivers/gpu/drm/vkms/vkms_gem.c static struct page **_get_pages(struct vkms_gem_object *vkms_obj)
vkms_obj          151 drivers/gpu/drm/vkms/vkms_gem.c 	struct drm_gem_object *gem_obj = &vkms_obj->gem;
vkms_obj          153 drivers/gpu/drm/vkms/vkms_gem.c 	if (!vkms_obj->pages) {
vkms_obj          159 drivers/gpu/drm/vkms/vkms_gem.c 		if (cmpxchg(&vkms_obj->pages, NULL, pages))
vkms_obj          163 drivers/gpu/drm/vkms/vkms_gem.c 	return vkms_obj->pages;
vkms_obj          168 drivers/gpu/drm/vkms/vkms_gem.c 	struct vkms_gem_object *vkms_obj = drm_gem_to_vkms_gem(obj);
vkms_obj          170 drivers/gpu/drm/vkms/vkms_gem.c 	mutex_lock(&vkms_obj->pages_lock);
vkms_obj          171 drivers/gpu/drm/vkms/vkms_gem.c 	if (vkms_obj->vmap_count < 1) {
vkms_obj          172 drivers/gpu/drm/vkms/vkms_gem.c 		WARN_ON(vkms_obj->vaddr);
vkms_obj          173 drivers/gpu/drm/vkms/vkms_gem.c 		WARN_ON(vkms_obj->pages);
vkms_obj          174 drivers/gpu/drm/vkms/vkms_gem.c 		mutex_unlock(&vkms_obj->pages_lock);
vkms_obj          178 drivers/gpu/drm/vkms/vkms_gem.c 	vkms_obj->vmap_count--;
vkms_obj          180 drivers/gpu/drm/vkms/vkms_gem.c 	if (vkms_obj->vmap_count == 0) {
vkms_obj          181 drivers/gpu/drm/vkms/vkms_gem.c 		vunmap(vkms_obj->vaddr);
vkms_obj          182 drivers/gpu/drm/vkms/vkms_gem.c 		vkms_obj->vaddr = NULL;
vkms_obj          183 drivers/gpu/drm/vkms/vkms_gem.c 		drm_gem_put_pages(obj, vkms_obj->pages, false, true);
vkms_obj          184 drivers/gpu/drm/vkms/vkms_gem.c 		vkms_obj->pages = NULL;
vkms_obj          187 drivers/gpu/drm/vkms/vkms_gem.c 	mutex_unlock(&vkms_obj->pages_lock);
vkms_obj          192 drivers/gpu/drm/vkms/vkms_gem.c 	struct vkms_gem_object *vkms_obj = drm_gem_to_vkms_gem(obj);
vkms_obj          195 drivers/gpu/drm/vkms/vkms_gem.c 	mutex_lock(&vkms_obj->pages_lock);
vkms_obj          197 drivers/gpu/drm/vkms/vkms_gem.c 	if (!vkms_obj->vaddr) {
vkms_obj          199 drivers/gpu/drm/vkms/vkms_gem.c 		struct page **pages = _get_pages(vkms_obj);
vkms_obj          206 drivers/gpu/drm/vkms/vkms_gem.c 		vkms_obj->vaddr = vmap(pages, n_pages, VM_MAP, PAGE_KERNEL);
vkms_obj          207 drivers/gpu/drm/vkms/vkms_gem.c 		if (!vkms_obj->vaddr)
vkms_obj          211 drivers/gpu/drm/vkms/vkms_gem.c 	vkms_obj->vmap_count++;
vkms_obj          216 drivers/gpu/drm/vkms/vkms_gem.c 	drm_gem_put_pages(obj, vkms_obj->pages, false, true);
vkms_obj          217 drivers/gpu/drm/vkms/vkms_gem.c 	vkms_obj->pages = NULL;
vkms_obj          219 drivers/gpu/drm/vkms/vkms_gem.c 	mutex_unlock(&vkms_obj->pages_lock);