FreeBSD/sys/dev/drm2/drm_agpsupport.c
/**
 * Enable the AGP bus.
 *
 * \param dev DRM device that has previously acquired AGP.
 * \param mode Requested AGP mode.
 * \return zero on success or a negative number on failure.
 *
 * Verifies the AGP device has been acquired but not enabled, and calls
 * \c agp_enable.
 */
Enable the AGP bus.
\param dev DRM device that has previously acquired AGP.
\param mode Requested AGP mode.
\return zero on success or a negative number on failure.

Verifies the AGP device has been acquired but not enabled, and calls
\c agp_enable.
Enable the AGP bus . \ param dev DRM device that has previously acquired AGP . \ param mode Requested AGP mode . \ return zero on success or a negative number on failure . Verifies the AGP device has been acquired but not enabled and calls \ c agp_enable .
int drm_agp_enable(struct drm_device * dev, struct drm_agp_mode mode)
{
	if (!dev->agp || !dev->agp->acquired)
		return -EINVAL;
	dev->agp->mode = mode.mode;
	agp_enable(dev->agp->bridge, mode.mode);
	dev->agp->enabled = 1;
	return 0;
}
int drm_agp_enable ( struct drm_device * dev , struct drm_agp_mode mode ) { if ( ! dev -> agp || ! dev -> agp -> acquired ) return - EINVAL ; dev -> agp -> mode = mode . mode ; agp_enable ( dev -> agp -> bridge , mode . mode ) ; dev -> agp -> enabled = 1 ; return 0 ; }
Enable the AGP bus.
Enable the AGP bus .