/** * radeon_driver_unload_kms - Main unload function for KMS. * * @dev: drm dev pointer * * This is the main unload function for KMS (all asics). * It calls radeon_modeset_fini() to tear down the * displays, and radeon_device_fini() to tear down * the rest of the device (CP, writeback, etc.). * Returns 0 on success. */ int radeon_driver_unload_kms(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; if (rdev == NULL) return 0; if (rdev->rmmio == NULL) goto done_free; #ifdef PM_TODO pm_runtime_get_sync(dev->dev); #endif radeon_acpi_fini(rdev); radeon_modeset_fini(rdev); radeon_device_fini(rdev); done_free: /* XXX pending drm update, after this accessing pdev is illegal! */ drm_fini_pdev(&dev->pdev); kfree(rdev); dev->dev_private = NULL; return 0; }
static void radeon_device_destroy (void *data) { radeon_device_t *device = data; radeon_device_fini (device); free (data); }
int radeon_driver_unload_kms(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; if (rdev == NULL) return 0; radeon_modeset_fini(rdev); radeon_device_fini(rdev); kfree(rdev); dev->dev_private = NULL; return 0; }
int radeon_driver_unload_kms(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; if (rdev == NULL) return 0; if (rdev->rmmio == NULL) goto done_free; radeon_acpi_fini(rdev); radeon_modeset_fini(rdev); radeon_device_fini(rdev); done_free: kfree(rdev); dev->dev_private = NULL; return 0; }
/** * radeon_driver_unload_kms - Main unload function for KMS. * * @dev: drm dev pointer * * This is the main unload function for KMS (all asics). * It calls radeon_modeset_fini() to tear down the * displays, and radeon_device_fini() to tear down * the rest of the device (CP, writeback, etc.). * Returns 0 on success. */ void radeon_driver_unload_kms(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; if (rdev == NULL) return; if (rdev->rmmio == NULL) goto done_free; if (radeon_is_px(dev)) { pm_runtime_get_sync(dev->dev); pm_runtime_forbid(dev->dev); } radeon_acpi_fini(rdev); radeon_modeset_fini(rdev); radeon_device_fini(rdev); done_free: kfree(rdev); dev->dev_private = NULL; }
/** * radeon_driver_unload_kms - Main unload function for KMS. * * @dev: drm dev pointer * * This is the main unload function for KMS (all asics). * It calls radeon_modeset_fini() to tear down the * displays, and radeon_device_fini() to tear down * the rest of the device (CP, writeback, etc.). * Returns 0 on success. */ int radeondrm_detach_kms(struct device *self, int flags) { struct radeon_device *rdev = (struct radeon_device *)self; if (rdev == NULL) return 0; radeon_acpi_fini(rdev); radeon_modeset_fini(rdev); radeon_device_fini(rdev); if (rdev->ddev != NULL) { config_detach((struct device *)rdev->ddev, flags); rdev->ddev = NULL; } pci_intr_disestablish(rdev->pc, rdev->irqh); if (rdev->rmmio_size > 0) bus_space_unmap(rdev->memt, rdev->rmmio, rdev->rmmio_size); return 0; }