Exemple #1
0
int drm_agp_unbind_memory(void *handle)
{
	device_t agpdev;

	agpdev = DRM_AGP_FIND_DEVICE();
	if (!agpdev || !handle)
		return EINVAL;

	return agp_unbind_memory(agpdev, handle);
}
static int ttm_agp_unbind(struct ttm_tt *ttm)
{
	struct ttm_agp_backend *agp_be = container_of(ttm, struct ttm_agp_backend, ttm);

	if (agp_be->mem) {
		if (agp_be->mem->is_bound)
			return agp_unbind_memory(agp_be->mem);
		agp_free_memory(agp_be->mem);
		agp_be->mem = NULL;
	}
	return 0;
}
static int agpioc_unbind_wrap(agp_file_private * priv, unsigned long arg)
{
	agp_memory *memory;
	agp_unbind unbind;

	if (copy_from_user(&unbind, (void *) arg, sizeof(agp_unbind))) {
		return -EFAULT;
	}
	memory = agp_find_mem_by_key(unbind.key);

	if (memory == NULL) {
		return -EINVAL;
	}
	return agp_unbind_memory(memory);
}
Exemple #4
0
static int compat_agpioc_unbind_wrap(struct agp_file_private *priv, void __user *arg)
{
	struct agp_memory *memory;
	struct agp_unbind32 unbind;

	DBG("");
	if (copy_from_user(&unbind, arg, sizeof(unbind)))
		return -EFAULT;

	memory = agp_find_mem_by_key(unbind.key);

	if (memory == NULL)
		return -EINVAL;

	return agp_unbind_memory(memory);
}
Exemple #5
0
/** Wrapper around agp_unbind_memory() */
int drm_unbind_agp(DRM_AGP_MEM * handle)
{
	return agp_unbind_memory(handle);
}
Exemple #6
0
/** Calls agp_unbind_memory() */
int drm_agp_unbind_memory(DRM_AGP_MEM *handle)
{
	if (!handle)
		return -EINVAL;
	return agp_unbind_memory(handle);
}