All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deng, Emily" <Emily.Deng-5C7GfCeVMHo@public.gmane.org>
To: "Deng, Emily" <Emily.Deng-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
Date: Wed, 6 Nov 2019 06:24:41 +0000	[thread overview]
Message-ID: <MN2PR12MB29759A675C5D0C677ABCBE5C8F790@MN2PR12MB2975.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1573021089-14955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>

Sorry, please ignore this, will send another patch later.

Best wishes
Emily Deng



>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Wednesday, November 6, 2019 2:18 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
>
>For driver reload test, it will report "can't enable MSI (MSI-X already enabled)".
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>index 6040eb3..48d9cf0d 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>@@ -325,7 +325,11 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
> 		drm_irq_uninstall(adev->ddev);
> 		adev->irq.installed = false;
> 		if (adev->irq.msi_enabled)
>+#ifdef PCI_IRQ_MSI
>+			pci_free_irq_vectors(adev->pdev);
>+#else
> 			pci_disable_msi(adev->pdev);
>+#endif
> 		if (!amdgpu_device_has_dc_support(adev))
> 			flush_work(&adev->hotplug_work);
> 	}
>--
>2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

WARNING: multiple messages have this Message-ID (diff)
From: "Deng, Emily" <Emily.Deng@amd.com>
To: "Deng, Emily" <Emily.Deng@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
Date: Wed, 6 Nov 2019 06:24:41 +0000	[thread overview]
Message-ID: <MN2PR12MB29759A675C5D0C677ABCBE5C8F790@MN2PR12MB2975.namprd12.prod.outlook.com> (raw)
Message-ID: <20191106062441.Q1jx9zbXfcMB-xBDuXoZrjGTICgZ9xwo6nIo85BALoc@z> (raw)
In-Reply-To: <1573021089-14955-1-git-send-email-Emily.Deng@amd.com>

Sorry, please ignore this, will send another patch later.

Best wishes
Emily Deng



>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Wednesday, November 6, 2019 2:18 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
>
>For driver reload test, it will report "can't enable MSI (MSI-X already enabled)".
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>index 6040eb3..48d9cf0d 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>@@ -325,7 +325,11 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
> 		drm_irq_uninstall(adev->ddev);
> 		adev->irq.installed = false;
> 		if (adev->irq.msi_enabled)
>+#ifdef PCI_IRQ_MSI
>+			pci_free_irq_vectors(adev->pdev);
>+#else
> 			pci_disable_msi(adev->pdev);
>+#endif
> 		if (!amdgpu_device_has_dc_support(adev))
> 			flush_work(&adev->hotplug_work);
> 	}
>--
>2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-11-06  6:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  6:18 [PATCH] drm/amdgpu: Need to disable msix when unloading driver Emily Deng
2019-11-06  6:18 ` Emily Deng
     [not found] ` <1573021089-14955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2019-11-06  6:24   ` Deng, Emily [this message]
2019-11-06  6:24     ` Deng, Emily
2019-11-06  6:23 Emily Deng
2019-11-06  6:23 ` Emily Deng
     [not found] ` <1573021419-15518-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2019-11-06  6:28   ` Deng, Emily
2019-11-06  6:28     ` Deng, Emily
     [not found]     ` <MN2PR12MB2975A3DFE6CCED7BB3D6D2748F790-rweVpJHSKToFlvJWC7EAqwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-11-06  9:31       ` Christian König
2019-11-06  9:31         ` Christian König
     [not found]         ` <6be1e7b9-13a9-f382-ef66-00c284a14a14-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-11-06 10:09           ` Deng, Emily
2019-11-06 10:09             ` Deng, Emily
     [not found]             ` <MN2PR12MB297565CEDAAF6460C71F98F28F790-rweVpJHSKToFlvJWC7EAqwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-11-06 15:05               ` Deucher, Alexander
2019-11-06 15:05                 ` Deucher, Alexander

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=MN2PR12MB29759A675C5D0C677ABCBE5C8F790@MN2PR12MB2975.namprd12.prod.outlook.com \
    --to=emily.deng-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.