[RFC 12/34] drm/xe: Ensure device is awake before removing it
Matthew Auld
matthew.auld at intel.com
Mon Feb 5 11:05:54 UTC 2024
On 26/01/2024 20:30, Rodrigo Vivi wrote:
> If device is suspended, the module unload might face challenges.
> So, let's ensure that the very first thing of the "unprobe" (remove)
> is to wake the device.
Core kernel already ensures device is called with pm_runtime_get_sync()
before calling probe/remove. Do we still need this?
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index df6b3b31f419..0f296df729c4 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -686,8 +686,8 @@ static void xe_pci_remove(struct pci_dev *pdev)
> if (!xe) /* driver load aborted, nothing to cleanup */
> return;
>
> - xe_device_remove(xe);
> xe_pm_runtime_fini(xe);
> + xe_device_remove(xe);
> pci_set_drvdata(pdev, NULL);
> }
>
More information about the Intel-xe
mailing list