diff options
author | Markus Trippelsdorf <markus@trippelsdorf.de> | 2013-10-23 17:07:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-11-01 12:43:20 -0400 |
commit | 846ae41ae99d314bf2a02784152208a6ddf7eddc (patch) | |
tree | 99cee22203a34c13601d8e70909a8a3d78a13b1a | |
parent | b18802588809d6ff20db762ddcadb0dbe1f46414 (diff) | |
download | blackbird-op-linux-846ae41ae99d314bf2a02784152208a6ddf7eddc.tar.gz blackbird-op-linux-846ae41ae99d314bf2a02784152208a6ddf7eddc.zip |
drm/radeon: Implement radeon_pci_shutdown
Currently radeon devices are not properly shutdown during kexec. This
causes a varity of issues, e.g. dpm initialization failures.
Fix this by implementing a radeon_pci_shutdown function, that unloads
the driver cleanly.
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 9902ac76f683..dfd4149a43b6 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -506,6 +506,15 @@ static const struct file_operations radeon_driver_kms_fops = { #endif }; + +static void +radeon_pci_shutdown(struct pci_dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + + radeon_driver_unload_kms(dev); +} + static struct drm_driver kms_driver = { .driver_features = DRIVER_USE_AGP | @@ -575,6 +584,7 @@ static struct pci_driver radeon_kms_pci_driver = { .probe = radeon_pci_probe, .remove = radeon_pci_remove, .driver.pm = &radeon_pm_ops, + .shutdown = radeon_pci_shutdown, }; static int __init radeon_init(void) |