dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: "Lazar, Lijo" <Lijo.Lazar@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"ckoenig.leichtzumerken@gmail.com"
	<ckoenig.leichtzumerken@gmail.com>,
	"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
	"Wentland, Harry" <Harry.Wentland@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"helgaas@kernel.org" <helgaas@kernel.org>
Subject: Re: [PATCH v5 03/27] drm/amdgpu: Split amdgpu_device_fini into early and late
Date: Fri, 30 Apr 2021 01:39:38 -0400	[thread overview]
Message-ID: <9437bddc-b944-3f7b-deb5-6068cb12a48c@amd.com> (raw)
In-Reply-To: <MN2PR12MB4549896A55131D4A327908E4975E9@MN2PR12MB4549.namprd12.prod.outlook.com>



On 2021-04-30 1:19 a.m., Lazar, Lijo wrote:
> [AMD Official Use Only - Internal Distribution Only]
> 
> 
> sysfs cleanup is a sw cleanup to me but done inside hw fini. sw/hw 
> separation is not strictly followed, or name it like stage1/stage2 fini.

The thing is that it was called early_fini and late_fini before and then
according to Daniel's requirest it was changed to fini_hw and fini_sw

Andrey

> 
> Thanks,
> Lijo
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of 
> Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> *Sent:* Wednesday, April 28, 2021 8:41:43 PM
> *To:* dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; 
> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; 
> linux-pci@vger.kernel.org <linux-pci@vger.kernel.org>; 
> ckoenig.leichtzumerken@gmail.com <ckoenig.leichtzumerken@gmail.com>; 
> daniel.vetter@ffwll.ch <daniel.vetter@ffwll.ch>; Wentland, Harry 
> <Harry.Wentland@amd.com>
> *Cc:* Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com>; 
> gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>; Kuehling, Felix 
> <Felix.Kuehling@amd.com>; ppaalanen@gmail.com <ppaalanen@gmail.com>; 
> helgaas@kernel.org <helgaas@kernel.org>; Deucher, Alexander 
> <Alexander.Deucher@amd.com>
> *Subject:* [PATCH v5 03/27] drm/amdgpu: Split amdgpu_device_fini into 
> early and late
> Some of the stuff in amdgpu_device_fini such as HW interrupts
> disable and pending fences finilization must be done right away on
> pci_remove while most of the stuff which relates to finilizing and
> releasing driver data structures can be kept until
> drm_driver.release hook is called, i.e. when the last device
> reference is dropped.
> 
> v4: Change functions prefix early->hw and late->sw
> 
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  6 ++++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 +++++++++++++++-------
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    |  7 ++----
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  | 15 ++++++++++++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c    | 26 +++++++++++++---------
>   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h    |  3 ++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 12 +++++++++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c    |  1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  3 ++-
>   drivers/gpu/drm/amd/amdgpu/cik_ih.c        |  2 +-
>   drivers/gpu/drm/amd/amdgpu/cz_ih.c         |  2 +-
>   drivers/gpu/drm/amd/amdgpu/iceland_ih.c    |  2 +-
>   drivers/gpu/drm/amd/amdgpu/navi10_ih.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/si_ih.c         |  2 +-
>   drivers/gpu/drm/amd/amdgpu/tonga_ih.c      |  2 +-
>   drivers/gpu/drm/amd/amdgpu/vega10_ih.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/vega20_ih.c     |  2 +-
>   17 files changed, 79 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 1af2fa1591fd..fddb82897e5d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1073,7 +1073,9 @@ static inline struct amdgpu_device 
> *amdgpu_ttm_adev(struct ttm_device *bdev)
> 
>   int amdgpu_device_init(struct amdgpu_device *adev,
>                          uint32_t flags);
> -void amdgpu_device_fini(struct amdgpu_device *adev);
> +void amdgpu_device_fini_hw(struct amdgpu_device *adev);
> +void amdgpu_device_fini_sw(struct amdgpu_device *adev);
> +
>   int amdgpu_gpu_wait_for_idle(struct amdgpu_device *adev);
> 
>   void amdgpu_device_vram_access(struct amdgpu_device *adev, loff_t pos,
> @@ -1289,6 +1291,8 @@ void amdgpu_driver_lastclose_kms(struct drm_device 
> *dev);
>   int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file 
> *file_priv);
>   void amdgpu_driver_postclose_kms(struct drm_device *dev,
>                                    struct drm_file *file_priv);
> +void amdgpu_driver_release_kms(struct drm_device *dev);
> +
>   int amdgpu_device_ip_suspend(struct amdgpu_device *adev);
>   int amdgpu_device_suspend(struct drm_device *dev, bool fbcon);
>   int amdgpu_device_resume(struct drm_device *dev, bool fbcon);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 6447cd6ca5a8..8d22b79fc1cd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3590,14 +3590,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>    * Tear down the driver info (all asics).
>    * Called at driver shutdown.
>    */
> -void amdgpu_device_fini(struct amdgpu_device *adev)
> +void amdgpu_device_fini_hw(struct amdgpu_device *adev)
>   {
>           dev_info(adev->dev, "amdgpu: finishing device.\n");
>           flush_delayed_work(&adev->delayed_init_work);
>           adev->shutdown = true;
> 
> -       kfree(adev->pci_state);
> -
>           /* make sure IB test finished before entering exclusive mode
>            * to avoid preemption on IB test
>            * */
> @@ -3614,11 +3612,24 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>                   else
>                           drm_atomic_helper_shutdown(adev_to_drm(adev));
>           }
> -       amdgpu_fence_driver_fini(adev);
> +       amdgpu_fence_driver_fini_hw(adev);
> +
>           if (adev->pm_sysfs_en)
>                   amdgpu_pm_sysfs_fini(adev);
> +       if (adev->ucode_sysfs_en)
> +               amdgpu_ucode_sysfs_fini(adev);
> +       sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
> +
> +
>           amdgpu_fbdev_fini(adev);
> +
> +       amdgpu_irq_fini_hw(adev);
> +}
> +
> +void amdgpu_device_fini_sw(struct amdgpu_device *adev)
> +{
>           amdgpu_device_ip_fini(adev);
> +       amdgpu_fence_driver_fini_sw(adev);
>           release_firmware(adev->firmware.gpu_info_fw);
>           adev->firmware.gpu_info_fw = NULL;
>           adev->accel_working = false;
> @@ -3647,14 +3658,13 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>           adev->rmmio = NULL;
>           amdgpu_device_doorbell_fini(adev);
> 
> -       if (adev->ucode_sysfs_en)
> -               amdgpu_ucode_sysfs_fini(adev);
> -
> -       sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
>           if (IS_ENABLED(CONFIG_PERF_EVENTS))
>                   amdgpu_pmu_fini(adev);
>           if (adev->mman.discovery_bin)
>                   amdgpu_discovery_fini(adev);
> +
> +       kfree(adev->pci_state);
> +
>   }
> 
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 671ec1002230..54cb5ee2f563 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -1249,14 +1249,10 @@ amdgpu_pci_remove(struct pci_dev *pdev)
>   {
>           struct drm_device *dev = pci_get_drvdata(pdev);
> 
> -#ifdef MODULE
> -       if (THIS_MODULE->state != MODULE_STATE_GOING)
> -#endif
> -               DRM_ERROR("Hotplug removal is not supported\n");
>           drm_dev_unplug(dev);
>           amdgpu_driver_unload_kms(dev);
> +
>           pci_disable_device(pdev);
> -       pci_set_drvdata(pdev, NULL);
>   }
> 
>   static void
> @@ -1587,6 +1583,7 @@ static const struct drm_driver amdgpu_kms_driver = {
>           .dumb_create = amdgpu_mode_dumb_create,
>           .dumb_map_offset = amdgpu_mode_dumb_mmap,
>           .fops = &amdgpu_driver_kms_fops,
> +       .release = &amdgpu_driver_release_kms,
> 
>           .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>           .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index 8e0a5650d383..34d51e962799 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -523,7 +523,7 @@ int amdgpu_fence_driver_init(struct amdgpu_device *adev)
>    *
>    * Tear down the fence driver for all possible rings (all asics).
>    */
> -void amdgpu_fence_driver_fini(struct amdgpu_device *adev)
> +void amdgpu_fence_driver_fini_hw(struct amdgpu_device *adev)
>   {
>           unsigned i, j;
>           int r;
> @@ -544,6 +544,19 @@ void amdgpu_fence_driver_fini(struct amdgpu_device 
> *adev)
>                   if (!ring->no_scheduler)
>                           drm_sched_fini(&ring->sched);
>                   del_timer_sync(&ring->fence_drv.fallback_timer);
> +       }
> +}
> +
> +void amdgpu_fence_driver_fini_sw(struct amdgpu_device *adev)
> +{
> +       unsigned int i, j;
> +
> +       for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
> +               struct amdgpu_ring *ring = adev->rings[i];
> +
> +               if (!ring || !ring->fence_drv.initialized)
> +                       continue;
> +
>                   for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
>                           dma_fence_put(ring->fence_drv.fences[j]);
>                   kfree(ring->fence_drv.fences);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index afbbec82a289..63e815c27585 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -49,6 +49,7 @@
>   #include <drm/drm_irq.h>
>   #include <drm/drm_vblank.h>
>   #include <drm/amdgpu_drm.h>
> +#include <drm/drm_drv.h>
>   #include "amdgpu.h"
>   #include "amdgpu_ih.h"
>   #include "atom.h"
> @@ -313,6 +314,20 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>           return 0;
>   }
> 
> +
> +void amdgpu_irq_fini_hw(struct amdgpu_device *adev)
> +{
> +       if (adev->irq.installed) {
> +               drm_irq_uninstall(&adev->ddev);
> +               adev->irq.installed = false;
> +               if (adev->irq.msi_enabled)
> +                       pci_free_irq_vectors(adev->pdev);
> +
> +               if (!amdgpu_device_has_dc_support(adev))
> +                       flush_work(&adev->hotplug_work);
> +       }
> +}
> +
>   /**
>    * amdgpu_irq_fini - shut down interrupt handling
>    *
> @@ -322,19 +337,10 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>    * functionality, shuts down vblank, hotplug and reset interrupt handling,
>    * turns off interrupts from all sources (all ASICs).
>    */
> -void amdgpu_irq_fini(struct amdgpu_device *adev)
> +void amdgpu_irq_fini_sw(struct amdgpu_device *adev)
>   {
>           unsigned i, j;
> 
> -       if (adev->irq.installed) {
> -               drm_irq_uninstall(adev_to_drm(adev));
> -               adev->irq.installed = false;
> -               if (adev->irq.msi_enabled)
> -                       pci_free_irq_vectors(adev->pdev);
> -               if (!amdgpu_device_has_dc_support(adev))
> -                       flush_work(&adev->hotplug_work);
> -       }
> -
>           for (i = 0; i < AMDGPU_IRQ_CLIENTID_MAX; ++i) {
>                   if (!adev->irq.client[i].sources)
>                           continue;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> index ac527e5deae6..392a7324e2b1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> @@ -104,7 +104,8 @@ void amdgpu_irq_disable_all(struct amdgpu_device *adev);
>   irqreturn_t amdgpu_irq_handler(int irq, void *arg);
> 
>   int amdgpu_irq_init(struct amdgpu_device *adev);
> -void amdgpu_irq_fini(struct amdgpu_device *adev);
> +void amdgpu_irq_fini_sw(struct amdgpu_device *adev);
> +void amdgpu_irq_fini_hw(struct amdgpu_device *adev);
>   int amdgpu_irq_add_id(struct amdgpu_device *adev,
>                         unsigned client_id, unsigned src_id,
>                         struct amdgpu_irq_src *source);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 64beb3399604..1af3fba7bfd4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -29,6 +29,7 @@
>   #include "amdgpu.h"
>   #include <drm/drm_debugfs.h>
>   #include <drm/amdgpu_drm.h>
> +#include <drm/drm_drv.h>
>   #include "amdgpu_uvd.h"
>   #include "amdgpu_vce.h"
>   #include "atom.h"
> @@ -93,7 +94,7 @@ void amdgpu_driver_unload_kms(struct drm_device *dev)
>           }
> 
>           amdgpu_acpi_fini(adev);
> -       amdgpu_device_fini(adev);
> +       amdgpu_device_fini_hw(adev);
>   }
> 
>   void amdgpu_register_gpu_instance(struct amdgpu_device *adev)
> @@ -1151,6 +1152,15 @@ void amdgpu_driver_postclose_kms(struct 
> drm_device *dev,
>           pm_runtime_put_autosuspend(dev->dev);
>   }
> 
> +
> +void amdgpu_driver_release_kms(struct drm_device *dev)
> +{
> +       struct amdgpu_device *adev = drm_to_adev(dev);
> +
> +       amdgpu_device_fini_sw(adev);
> +       pci_set_drvdata(adev->pdev, NULL);
> +}
> +
>   /*
>    * VBlank related functions.
>    */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 1fb2a91ad30a..c0a16eac4923 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -2142,6 +2142,7 @@ int amdgpu_ras_pre_fini(struct amdgpu_device *adev)
>           if (!con)
>                   return 0;
> 
> +
>           /* Need disable ras on all IPs here before ip [hw/sw]fini */
>           amdgpu_ras_disable_all_features(adev, 0);
>           amdgpu_ras_recovery_fini(adev);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index 56acec1075ac..0f195f7bf797 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -107,7 +107,8 @@ struct amdgpu_fence_driver {
>   };
> 
>   int amdgpu_fence_driver_init(struct amdgpu_device *adev);
> -void amdgpu_fence_driver_fini(struct amdgpu_device *adev);
> +void amdgpu_fence_driver_fini_hw(struct amdgpu_device *adev);
> +void amdgpu_fence_driver_fini_sw(struct amdgpu_device *adev);
>   void amdgpu_fence_driver_force_completion(struct amdgpu_ring *ring);
> 
>   int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> index d3745711d55f..183d44a6583c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> @@ -309,7 +309,7 @@ static int cik_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih);
>           amdgpu_irq_remove_domain(adev);
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> index 307c01301c87..d32743949003 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
> @@ -301,7 +301,7 @@ static int cz_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih);
>           amdgpu_irq_remove_domain(adev);
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> index cc957471f31e..da96c6013477 100644
> --- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> @@ -300,7 +300,7 @@ static int iceland_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih);
>           amdgpu_irq_remove_domain(adev);
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> index f4e4040bbd25..5eea4550b856 100644
> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> @@ -569,7 +569,7 @@ static int navi10_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih_soft);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih2);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih1);
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/si_ih.c
> index 51880f6ef634..751307f3252c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_ih.c
> @@ -175,7 +175,7 @@ static int si_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih);
> 
>           return 0;
> diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> index 249fcbee7871..973d80ec7f6c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> @@ -312,7 +312,7 @@ static int tonga_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih);
>           amdgpu_irq_remove_domain(adev);
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> index 88626d83e07b..2d0094c276ca 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> @@ -523,7 +523,7 @@ static int vega10_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih_soft);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih2);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih1);
> diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c 
> b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
> index 5a3c867d5881..9059b21b079f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
> @@ -558,7 +558,7 @@ static int vega20_ih_sw_fini(void *handle)
>   {
>           struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> -       amdgpu_irq_fini(adev);
> +       amdgpu_irq_fini_sw(adev);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih_soft);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih2);
>           amdgpu_ih_ring_fini(adev, &adev->irq.ih1);
> -- 
> 2.25.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Clijo.lazar%40amd.com%7C71f92dcef6d04dfea28308d90a5818c9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637552195764790324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fzGS6ZXYffGH0DE%2BEM4jxyB8yDGpYO%2FmT%2FKAtgig1Tw%3D&amp;reserved=0 
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Clijo.lazar%40amd.com%7C71f92dcef6d04dfea28308d90a5818c9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637552195764790324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fzGS6ZXYffGH0DE%2BEM4jxyB8yDGpYO%2FmT%2FKAtgig1Tw%3D&amp;reserved=0>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-30  5:39 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 15:11 [PATCH v5 00/27] RFC Support hot device unplug in amdgpu Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 01/27] drm/ttm: Remap all page faults to per process dummy page Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 02/27] drm/ttm: Expose ttm_tt_unpopulate for driver use Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 03/27] drm/amdgpu: Split amdgpu_device_fini into early and late Andrey Grodzovsky
2021-04-29  7:04   ` Christian König
2021-04-30  3:10     ` Alex Deucher
2021-04-30  5:19   ` Lazar, Lijo
2021-04-30  5:39     ` Andrey Grodzovsky [this message]
2021-04-30  5:49       ` Lazar, Lijo
2021-04-28 15:11 ` [PATCH v5 04/27] drm/amdkfd: Split kfd suspend from devie exit Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 05/27] drm/amdgpu: Add early fini callback Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 06/27] drm/amdgpu: Handle IOMMU enabled case Andrey Grodzovsky
2021-04-29  7:08   ` Christian König
2021-05-03 20:43     ` Andrey Grodzovsky
2021-05-04  7:03       ` Christian König
2021-05-04 15:43         ` Andrey Grodzovsky
2021-05-05 14:51           ` Andrey Grodzovsky
2021-04-30  3:13   ` Alex Deucher
2021-05-03 18:00     ` Andrey Grodzovsky
2021-05-04 17:05   ` Felix Kuehling
2021-05-05 14:05     ` Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 07/27] drm/amdgpu: Remap all page faults to per process dummy page Andrey Grodzovsky
2021-04-29  7:09   ` Christian König
2021-04-28 15:11 ` [PATCH v5 08/27] PCI: add support for dev_groups to struct pci_device_driver Andrey Grodzovsky
2021-04-28 16:53   ` Bjorn Helgaas
2021-04-29 16:53     ` Andrey Grodzovsky
2021-04-29 19:23       ` Bjorn Helgaas
2021-04-29 20:36         ` Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 09/27] dmr/amdgpu: Move some sysfs attrs creation to default_attr Andrey Grodzovsky
2021-04-28 17:23   ` Bjorn Helgaas
2021-04-29  7:11   ` Christian König
2021-04-28 15:11 ` [PATCH v5 10/27] drm/amdgpu: Guard against write accesses after device removal Andrey Grodzovsky
2021-04-29  7:14   ` Christian König
2021-04-28 15:11 ` [PATCH v5 11/27] drm/sched: Make timeout timer rearm conditional Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 12/27] drm/amdgpu: Prevent any job recoveries after device is unplugged Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 13/27] drm/amdgpu: When filizing the fence driver. stop scheduler first Andrey Grodzovsky
2021-04-29  7:15   ` Christian König
2021-04-29 17:12     ` Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 14/27] drm/amdgpu: Fix hang on device removal Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 15/27] drm/scheduler: Fix hang when sched_entity released Andrey Grodzovsky
2021-04-29  7:18   ` Christian König
2021-04-29 17:06     ` Andrey Grodzovsky
2021-04-30  6:47       ` Christian König
2021-04-30 16:10         ` Andrey Grodzovsky
2021-05-05 13:57           ` Andrey Grodzovsky
2021-05-07 16:29           ` Daniel Vetter
2021-05-07 16:32             ` Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 16/27] drm/amdgpu: Unmap all MMIO mappings Andrey Grodzovsky
2021-04-29  7:19   ` Christian König
2021-04-29 16:55     ` Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 17/27] drm/amdgpu: Add rw_sem to pushing job into sched queue Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 18/27] drm/sched: Expose drm_sched_entity_kill_jobs Andrey Grodzovsky
2021-04-28 15:11 ` [PATCH v5 19/27] drm/amdgpu: Finilise device fences on device remove Andrey Grodzovsky
2021-04-28 15:20   ` Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit Andrey Grodzovsky
2021-04-29 11:23   ` Daniel Vetter
2021-04-29 11:32     ` Daniel Vetter
2021-04-29 16:04       ` Andrey Grodzovsky
2021-04-29 16:15         ` Felix Kuehling
2021-04-29 16:21           ` Andrey Grodzovsky
2021-04-29 16:29             ` Felix Kuehling
2021-04-29 16:33               ` Andrey Grodzovsky
2021-04-29 19:05         ` Daniel Vetter
2021-04-29 20:34           ` Andrey Grodzovsky
2021-04-30 10:25             ` Daniel Vetter
2021-04-30 17:27               ` Andrey Grodzovsky
2021-05-05 13:57                 ` Andrey Grodzovsky
2021-05-06  9:40                 ` Daniel Vetter
2021-05-06 16:25                   ` Andrey Grodzovsky
2021-05-07  9:11                     ` Daniel Vetter
2021-05-07 15:39                       ` Andrey Grodzovsky
2021-05-07 16:24                         ` Daniel Vetter
2021-05-07 18:00                           ` Andrey Grodzovsky
2021-05-10 15:46                             ` Daniel Vetter
2021-04-28 15:12 ` [PATCH v5 21/27] drm/amdgpu: Add support for hot-unplug feature at DRM level Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 22/27] drm/amd/display: Scope all DM queued work with drm_dev_enter/exit Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 23/27] drm/amd/powerplay: Scope all PM " Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 24/27] drm/amdkfd: Scope all KFD " Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 25/27] drm/amdgpu: Scope all amdgpu " Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 26/27] drm/amd/display: Remove superflous drm_mode_config_cleanup Andrey Grodzovsky
2021-04-28 15:12 ` [PATCH v5 27/27] drm/amdgpu: Verify DMA opearations from device are done Andrey Grodzovsky
2021-04-28 17:07 ` [PATCH v5 00/27] RFC Support hot device unplug in amdgpu Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9437bddc-b944-3f7b-deb5-6068cb12a48c@amd.com \
    --to=andrey.grodzovsky@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Lijo.Lazar@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).