[Intel-xe] [PATCH 2/4] drm/xe/pm: Refactor xe_pm_runtime_init

Rodrigo Vivi rodrigo.vivi at kernel.org
Fri May 19 22:04:58 UTC 2023


On Fri, May 19, 2023 at 09:55:53PM +0530, Anshuman Gupta wrote:
> Wrap xe_pm_runtime_init inside xe_pm_init.

it makes sense

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>


> 
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pci.c | 1 -
>  drivers/gpu/drm/xe/xe_pm.c  | 3 ++-
>  drivers/gpu/drm/xe/xe_pm.h  | 1 -
>  3 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 96826b4d5fc3..137026ddee42 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -684,7 +684,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		return err;
>  	}
>  
> -	xe_pm_runtime_init(xe);
>  	xe_pm_init(xe);
>  
>  	return 0;
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index 534768ac4410..c250a36b99ad 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -132,7 +132,7 @@ static bool xe_pm_pci_d3cold_capable(struct pci_dev *pdev)
>  	return true;
>  }
>  
> -void xe_pm_runtime_init(struct xe_device *xe)
> +static void xe_pm_runtime_init(struct xe_device *xe)
>  {
>  	struct device *dev = xe->drm.dev;
>  
> @@ -148,6 +148,7 @@ void xe_pm_init(struct xe_device *xe)
>  {
>  	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
>  
> +	xe_pm_runtime_init(xe);
>  	xe->d3cold_capable = xe_pm_pci_d3cold_capable(pdev);
>  }
>  
> diff --git a/drivers/gpu/drm/xe/xe_pm.h b/drivers/gpu/drm/xe/xe_pm.h
> index 38764537a566..e0c4f92e27c5 100644
> --- a/drivers/gpu/drm/xe/xe_pm.h
> +++ b/drivers/gpu/drm/xe/xe_pm.h
> @@ -13,7 +13,6 @@ struct xe_device;
>  int xe_pm_suspend(struct xe_device *xe);
>  int xe_pm_resume(struct xe_device *xe);
>  
> -void xe_pm_runtime_init(struct xe_device *xe);
>  void xe_pm_init(struct xe_device *xe);
>  void xe_pm_runtime_fini(struct xe_device *xe);
>  int xe_pm_runtime_suspend(struct xe_device *xe);
> -- 
> 2.38.0
> 


More information about the Intel-xe mailing list