FreeBSD/sys/dev/drm2/radeon/radeon_device.c
/**
 * radeon_resume_kms - initiate device resume
 *
 * @pdev: drm dev pointer
 *
 * Bring the hw back to operating state (all asics).
 * Returns 0 for success or an error on failure.
 * Called at driver resume.
 */
initiate device resume
@pdev: drm dev pointer

Bring the hw back to operating state (all asics).
Returns 0 for success or an error on failure.
Called at driver resume.
initiate device resume @pdev : drm dev pointer Bring the hw back to operating state ( all asics ) . Returns 0 for success or an error on failure . Called at driver resume .
int radeon_resume_kms(struct drm_device *dev)
{
	struct drm_connector *connector;
	struct radeon_device *rdev = dev->dev_private;
	int r;
	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
		return 0;
#ifdef FREEBSD_WIP
	console_lock();
	if (pci_enable_device(dev->pdev)) {
		console_unlock();
		return -1;
	}
#endif 
	radeon_agp_resume(rdev);
	radeon_resume(rdev);
	r = radeon_ib_ring_tests(rdev);
	if (r)
		DRM_ERROR("ib ring test failed (%d).\n", r);
	radeon_pm_resume(rdev);
	radeon_restore_bios_scratch_regs(rdev);
	radeon_fbdev_set_suspend(rdev, 0);
#ifdef FREEBSD_WIP
	console_unlock();
#endif 
	if (rdev->is_atom_bios) {
		radeon_atom_encoder_init(rdev);
		radeon_atom_disp_eng_pll_init(rdev);
		if (rdev->mode_info.bl_encoder) {
			u8 bl_level = radeon_get_backlight_level(rdev,
								 rdev->mode_info.bl_encoder);
			radeon_set_backlight_level(rdev, rdev->mode_info.bl_encoder,
						   bl_level);
		}
	}
	radeon_hpd_init(rdev);
	drm_helper_resume_force_mode(dev);
	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
		drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
	}
	drm_kms_helper_poll_enable(dev);
	return 0;
}
int radeon_resume_kms ( struct drm_device * dev ) { struct drm_connector * connector ; struct radeon_device * rdev = dev -> dev_private ; int r ; if ( dev -> switch_power_state == DRM_SWITCH_POWER_OFF ) return 0 ; #ifdef FREEBSD_WIP console_lock ( ) ; if ( pci_enable_device ( dev -> pdev ) ) { console_unlock ( ) ; return -1 ; } #endif radeon_agp_resume ( rdev ) ; radeon_resume ( rdev ) ; r = radeon_ib_ring_tests ( rdev ) ; if ( r ) DRM_ERROR ( " \n " , r ) ; radeon_pm_resume ( rdev ) ; radeon_restore_bios_scratch_regs ( rdev ) ; radeon_fbdev_set_suspend ( rdev , 0 ) ; #ifdef FREEBSD_WIP console_unlock ( ) ; #endif if ( rdev -> is_atom_bios ) { radeon_atom_encoder_init ( rdev ) ; radeon_atom_disp_eng_pll_init ( rdev ) ; if ( rdev -> mode_info . bl_encoder ) { u8 bl_level = radeon_get_backlight_level ( rdev , rdev -> mode_info . bl_encoder ) ; radeon_set_backlight_level ( rdev , rdev -> mode_info . bl_encoder , bl_level ) ; } } radeon_hpd_init ( rdev ) ; drm_helper_resume_force_mode ( dev ) ; list_for_each_entry ( connector , & dev -> mode_config . connector_list , head ) { drm_helper_connector_dpms ( connector , DRM_MODE_DPMS_ON ) ; } drm_kms_helper_poll_enable ( dev ) ; return 0 ; }
radeon_resume_kms - initiate device resume
 @pdev: drm dev pointer
radeon_resume_kms - initiate device resume @pdev : drm dev pointer
/* FREEBSD_WIP */ /* resume AGP if in use */ /* FREEBSD_WIP */ /* init dig PHYs, disp eng pll */ /* turn on the BL */ /* reset hpd state */ /* blat the mode back in */ /* turn on display hw */