FreeBSD/sys/dev/drm2/drm_agpsupport.c
/**
 * Unbind AGP memory from the GATT (ioctl).
 *
 * \param inode device inode.
 * \param file_priv DRM file private.
 * \param cmd command.
 * \param arg pointer to a drm_agp_binding structure.
 * \return zero on success or a negative number on failure.
 *
 * Verifies the AGP device is present and acquired, looks-up the AGP memory
 * entry and passes it to the unbind_agp() function.
 */
Unbind AGP memory from the GATT (ioctl).
\param inode device inode.
\param file_priv DRM file private.
\param cmd command.
\param arg pointer to a drm_agp_binding structure.
\return zero on success or a negative number on failure.

Verifies the AGP device is present and acquired, looks-up the AGP memory
entry and passes it to the unbind_agp() function.
Unbind AGP memory from the GATT ( ioctl ) . \ param inode device inode . \ param file_priv DRM file private . \ param cmd command . \ param arg pointer to a drm_agp_binding structure . \ return zero on success or a negative number on failure . Verifies the AGP device is present and acquired looks - up the AGP memory entry and passes it to the unbind_agp () function .
int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
{
	struct drm_agp_mem *entry;
	int ret;
	if (!dev->agp || !dev->agp->acquired)
		return -EINVAL;
	if (!(entry = drm_agp_lookup_entry(dev, request->handle)))
		return -EINVAL;
	if (!entry->bound)
		return -EINVAL;
	ret = drm_unbind_agp(entry->memory);
	if (ret == 0)
		entry->bound = 0;
	return ret;
}
int drm_agp_unbind ( struct drm_device * dev , struct drm_agp_binding * request ) { struct drm_agp_mem * entry ; int ret ; if ( ! dev -> agp || ! dev -> agp -> acquired ) return - EINVAL ; if ( ! ( entry = drm_agp_lookup_entry ( dev , request -> handle ) ) ) return - EINVAL ; if ( ! entry -> bound ) return - EINVAL ; ret = drm_unbind_agp ( entry -> memory ) ; if ( ret == 0 ) entry -> bound = 0 ; return ret ; }
Unbind AGP memory from the GATT (ioctl).
Unbind AGP memory from the GATT ( ioctl ) .