[PATCH 2/3] drm/radeon: Implement radeon_pci_shutdown

Konrad Rzeszutek Wilk konrad.wilk at oracle.com
Mon Sep 9 09:32:48 EDT 2013


On Sun, Sep 08, 2013 at 02:10:58PM +0200, Markus Trippelsdorf wrote:
> Currently radeon devices are not properbly shutdown during kexec. This

properly

> cases 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 at trippelsdorf.de>
> ---
>  drivers/gpu/drm/radeon/radeon_drv.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index cb4445f..d71edee 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -380,6 +380,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 |
> @@ -453,6 +462,7 @@ static struct pci_driver radeon_kms_pci_driver = {
>  	.remove = radeon_pci_remove,
>  	.suspend = radeon_pci_suspend,
>  	.resume = radeon_pci_resume,
> +	.shutdown = radeon_pci_shutdown,
>  };
>  
>  static int __init radeon_init(void)
> -- 
> Markus
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel



More information about the kexec mailing list