All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:23 ` Emily Deng
  0 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2019-11-06  6:23 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 6f3b03f..30d540d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
 		drm_irq_uninstall(adev->ddev);
 		adev->irq.installed = false;
 		if (adev->irq.msi_enabled)
-			pci_disable_msi(adev->pdev);
+			pci_free_irq_vectors(adev->pdev);
 		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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:23 ` Emily Deng
  0 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2019-11-06  6:23 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 6f3b03f..30d540d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
 		drm_irq_uninstall(adev->ddev);
 		adev->irq.installed = false;
 		if (adev->irq.msi_enabled)
-			pci_disable_msi(adev->pdev);
+			pci_free_irq_vectors(adev->pdev);
 		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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:28     ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06  6:28 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hi all,
    Please help to review this. This is to fix driver reload issue.

Best wishes
Emily Deng


>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>index 6f3b03f..30d540d 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>@@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
> 		drm_irq_uninstall(adev->ddev);
> 		adev->irq.installed = false;
> 		if (adev->irq.msi_enabled)
>-			pci_disable_msi(adev->pdev);
>+			pci_free_irq_vectors(adev->pdev);
> 		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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:28     ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06  6:28 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx

Hi all,
    Please help to review this. This is to fix driver reload issue.

Best wishes
Emily Deng


>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>index 6f3b03f..30d540d 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>@@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
> 		drm_irq_uninstall(adev->ddev);
> 		adev->irq.installed = false;
> 		if (adev->irq.msi_enabled)
>-			pci_disable_msi(adev->pdev);
>+			pci_free_irq_vectors(adev->pdev);
> 		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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  9:31         ` Christian König
  0 siblings, 0 replies; 14+ messages in thread
From: Christian König @ 2019-11-06  9:31 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Not an expert on the PCI IRQ stuff, but from what I know that looks 
correct to me.

Only question I can see is why don't we use pci_alloc_irq_vectors()? 
Alex probably needs to take a look.

Regards,
Christian.

Am 06.11.19 um 07:28 schrieb Deng, Emily:
> Hi all,
>      Please help to review this. This is to fix driver reload issue.
>
> Best wishes
> Emily Deng
>
>
>> -----Original Message-----
>> From: Emily Deng <Emily.Deng@amd.com>
>> Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> index 6f3b03f..30d540d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>> 		drm_irq_uninstall(adev->ddev);
>> 		adev->irq.installed = false;
>> 		if (adev->irq.msi_enabled)
>> -			pci_disable_msi(adev->pdev);
>> +			pci_free_irq_vectors(adev->pdev);
>> 		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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  9:31         ` Christian König
  0 siblings, 0 replies; 14+ messages in thread
From: Christian König @ 2019-11-06  9:31 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx

Not an expert on the PCI IRQ stuff, but from what I know that looks 
correct to me.

Only question I can see is why don't we use pci_alloc_irq_vectors()? 
Alex probably needs to take a look.

Regards,
Christian.

Am 06.11.19 um 07:28 schrieb Deng, Emily:
> Hi all,
>      Please help to review this. This is to fix driver reload issue.
>
> Best wishes
> Emily Deng
>
>
>> -----Original Message-----
>> From: Emily Deng <Emily.Deng@amd.com>
>> Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> index 6f3b03f..30d540d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>> 		drm_irq_uninstall(adev->ddev);
>> 		adev->irq.installed = false;
>> 		if (adev->irq.msi_enabled)
>> -			pci_disable_msi(adev->pdev);
>> +			pci_free_irq_vectors(adev->pdev);
>> 		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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06 10:09             ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06 10:09 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Deucher, Alexander

Hi Christian,
    We use " pci_alloc_irq_vectors " in amdgpu_irq_init. This patch use " pci_free_irq_vectors " in amdgpu_irq_fini.

Hi Alex,
    Could you help to review this?

Best wishes
Emily Deng



>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken@gmail.com>
>Sent: Wednesday, November 6, 2019 5:32 PM
>To: Deng, Emily <Emily.Deng@amd.com>; amd-gfx@lists.freedesktop.org
>Subject: Re: [PATCH] drm/amdgpu: Need to disable msix when unloading
>driver
>
>Not an expert on the PCI IRQ stuff, but from what I know that looks correct to
>me.
>
>Only question I can see is why don't we use pci_alloc_irq_vectors()?
>Alex probably needs to take a look.
>
>Regards,
>Christian.
>
>Am 06.11.19 um 07:28 schrieb Deng, Emily:
>> Hi all,
>>      Please help to review this. This is to fix driver reload issue.
>>
>> Best wishes
>> Emily Deng
>>
>>
>>> -----Original Message-----
>>> From: Emily Deng <Emily.Deng@amd.com>
>>> Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> index 6f3b03f..30d540d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>>> 		drm_irq_uninstall(adev->ddev);
>>> 		adev->irq.installed = false;
>>> 		if (adev->irq.msi_enabled)
>>> -			pci_disable_msi(adev->pdev);
>>> +			pci_free_irq_vectors(adev->pdev);
>>> 		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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06 10:09             ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06 10:09 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx, Deucher, Alexander

Hi Christian,
    We use " pci_alloc_irq_vectors " in amdgpu_irq_init. This patch use " pci_free_irq_vectors " in amdgpu_irq_fini.

Hi Alex,
    Could you help to review this?

Best wishes
Emily Deng



>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken@gmail.com>
>Sent: Wednesday, November 6, 2019 5:32 PM
>To: Deng, Emily <Emily.Deng@amd.com>; amd-gfx@lists.freedesktop.org
>Subject: Re: [PATCH] drm/amdgpu: Need to disable msix when unloading
>driver
>
>Not an expert on the PCI IRQ stuff, but from what I know that looks correct to
>me.
>
>Only question I can see is why don't we use pci_alloc_irq_vectors()?
>Alex probably needs to take a look.
>
>Regards,
>Christian.
>
>Am 06.11.19 um 07:28 schrieb Deng, Emily:
>> Hi all,
>>      Please help to review this. This is to fix driver reload issue.
>>
>> Best wishes
>> Emily Deng
>>
>>
>>> -----Original Message-----
>>> From: Emily Deng <Emily.Deng@amd.com>
>>> Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> index 6f3b03f..30d540d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>>> 		drm_irq_uninstall(adev->ddev);
>>> 		adev->irq.installed = false;
>>> 		if (adev->irq.msi_enabled)
>>> -			pci_disable_msi(adev->pdev);
>>> +			pci_free_irq_vectors(adev->pdev);
>>> 		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

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06 15:05                 ` Deucher, Alexander
  0 siblings, 0 replies; 14+ messages in thread
From: Deucher, Alexander @ 2019-11-06 15:05 UTC (permalink / raw)
  To: Deng, Emily, Koenig, Christian, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3078 bytes --]

Reviewed-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
________________________________
From: Deng, Emily <Emily.Deng-5C7GfCeVMHo@public.gmane.org>
Sent: Wednesday, November 6, 2019 5:09 AM
To: Koenig, Christian <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>; amd-gfx-PD4FTy7X32lNgt0PjOBp93gSJqDPrsil@public.gmane.org.org <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver

Hi Christian,
    We use " pci_alloc_irq_vectors " in amdgpu_irq_init. This patch use " pci_free_irq_vectors " in amdgpu_irq_fini.

Hi Alex,
    Could you help to review this?

Best wishes
Emily Deng



>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>Sent: Wednesday, November 6, 2019 5:32 PM
>To: Deng, Emily <Emily.Deng-5C7GfCeVMHo@public.gmane.org>; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>Subject: Re: [PATCH] drm/amdgpu: Need to disable msix when unloading
>driver
>
>Not an expert on the PCI IRQ stuff, but from what I know that looks correct to
>me.
>
>Only question I can see is why don't we use pci_alloc_irq_vectors()?
>Alex probably needs to take a look.
>
>Regards,
>Christian.
>
>Am 06.11.19 um 07:28 schrieb Deng, Emily:
>> Hi all,
>>      Please help to review this. This is to fix driver reload issue.
>>
>> Best wishes
>> Emily Deng
>>
>>
>>> -----Original Message-----
>>> From: Emily Deng <Emily.Deng-5C7GfCeVMHo@public.gmane.org>
>>> Sent: Wednesday, November 6, 2019 2:24 PM
>>> To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>>> Cc: Deng, Emily <Emily.Deng-5C7GfCeVMHo@public.gmane.org>
>>> 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-5C7GfCeVMHo@public.gmane.org>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> index 6f3b03f..30d540d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>>>              drm_irq_uninstall(adev->ddev);
>>>              adev->irq.installed = false;
>>>              if (adev->irq.msi_enabled)
>>> -                   pci_disable_msi(adev->pdev);
>>> +                   pci_free_irq_vectors(adev->pdev);
>>>              if (!amdgpu_device_has_dc_support(adev))
>>>                      flush_work(&adev->hotplug_work);
>>>      }
>>> --
>>> 2.7.4
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[-- Attachment #1.2: Type: text/html, Size: 5292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06 15:05                 ` Deucher, Alexander
  0 siblings, 0 replies; 14+ messages in thread
From: Deucher, Alexander @ 2019-11-06 15:05 UTC (permalink / raw)
  To: Deng, Emily, Koenig, Christian, amd-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2757 bytes --]

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: Deng, Emily <Emily.Deng@amd.com>
Sent: Wednesday, November 6, 2019 5:09 AM
To: Koenig, Christian <Christian.Koenig@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver

Hi Christian,
    We use " pci_alloc_irq_vectors " in amdgpu_irq_init. This patch use " pci_free_irq_vectors " in amdgpu_irq_fini.

Hi Alex,
    Could you help to review this?

Best wishes
Emily Deng



>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken@gmail.com>
>Sent: Wednesday, November 6, 2019 5:32 PM
>To: Deng, Emily <Emily.Deng@amd.com>; amd-gfx@lists.freedesktop.org
>Subject: Re: [PATCH] drm/amdgpu: Need to disable msix when unloading
>driver
>
>Not an expert on the PCI IRQ stuff, but from what I know that looks correct to
>me.
>
>Only question I can see is why don't we use pci_alloc_irq_vectors()?
>Alex probably needs to take a look.
>
>Regards,
>Christian.
>
>Am 06.11.19 um 07:28 schrieb Deng, Emily:
>> Hi all,
>>      Please help to review this. This is to fix driver reload issue.
>>
>> Best wishes
>> Emily Deng
>>
>>
>>> -----Original Message-----
>>> From: Emily Deng <Emily.Deng@amd.com>
>>> Sent: Wednesday, November 6, 2019 2:24 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 | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> index 6f3b03f..30d540d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>>>              drm_irq_uninstall(adev->ddev);
>>>              adev->irq.installed = false;
>>>              if (adev->irq.msi_enabled)
>>> -                   pci_disable_msi(adev->pdev);
>>> +                   pci_free_irq_vectors(adev->pdev);
>>>              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


[-- Attachment #1.2: Type: text/html, Size: 4980 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:24     ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06  6:24 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:24     ` Deng, Emily
  0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2019-11-06  6:24 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:18 ` Emily Deng
  0 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2019-11-06  6:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] drm/amdgpu: Need to disable msix when unloading driver
@ 2019-11-06  6:18 ` Emily Deng
  0 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2019-11-06  6:18 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-06 15:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  6:23 [PATCH] drm/amdgpu: Need to disable msix when unloading driver 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
  -- strict thread matches above, loose matches on Subject: below --
2019-11-06  6:18 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
2019-11-06  6:24     ` Deng, Emily

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.