All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu - Disable all irqs before disabling all CRTCs
@ 2018-03-15 21:11 mikita.lipski-5C7GfCeVMHo
       [not found] ` <1521148268-6266-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: mikita.lipski-5C7GfCeVMHo @ 2018-03-15 21:11 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	harry.wentland-5C7GfCeVMHo, andrey.grodzovsky-5C7GfCeVMHo,
	alexander.deucher-5C7GfCeVMHo
  Cc: Mikita Lipski

From: Mikita Lipski <mikita.lipski@amd.com>

By moving amdgpu_irq_disable_all earlier in the sequence
fixes an issue with disabling pflip interrupts:

*ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source

Earlier patch fixed a memory corruption and revealed irq
warnings.This way it seems to be there no obvious issues
with unloading the module.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0b798cb..0d01735 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1432,9 +1432,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
 	int i, r;
 
 	amdgpu_amdkfd_device_fini(adev);
-	/* disable all interrupts */
-	amdgpu_irq_disable_all(adev);
-
 	/* need to disable SMC first */
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if (!adev->ip_blocks[i].status.hw)
@@ -2082,6 +2079,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
 
 	DRM_INFO("amdgpu: finishing device.\n");
 	adev->shutdown = true;
+	/* disable all interrupts */
+	amdgpu_irq_disable_all(adev);
 	if (adev->mode_info.mode_config_initialized){
 		if (!amdgpu_device_has_dc_support(adev))
 			drm_crtc_force_disable_all(adev->ddev);
-- 
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] 3+ messages in thread

* Re: [PATCH] drm/amdgpu - Disable all irqs before disabling all CRTCs
       [not found] ` <1521148268-6266-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
@ 2018-03-15 22:23   ` Alex Deucher
       [not found]     ` <CADnq5_MbkCcWL5KsmffPFH0FuG3kgjimuGtzgj6n6d1aP9pqfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2018-03-15 22:23 UTC (permalink / raw)
  To: Lipski, Mikita
  Cc: Deucher, Alexander, Andrey Grodzovsky, Wentland, Harry, amd-gfx list

On Thu, Mar 15, 2018 at 5:11 PM,  <mikita.lipski@amd.com> wrote:
> From: Mikita Lipski <mikita.lipski@amd.com>
>
> By moving amdgpu_irq_disable_all earlier in the sequence
> fixes an issue with disabling pflip interrupts:
>
> *ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source
>
> Earlier patch fixed a memory corruption and revealed irq
> warnings.This way it seems to be there no obvious issues
> with unloading the module.
>
> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 0b798cb..0d01735 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1432,9 +1432,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
>         int i, r;
>
>         amdgpu_amdkfd_device_fini(adev);
> -       /* disable all interrupts */
> -       amdgpu_irq_disable_all(adev);
> -
>         /* need to disable SMC first */
>         for (i = 0; i < adev->num_ip_blocks; i++) {
>                 if (!adev->ip_blocks[i].status.hw)
> @@ -2082,6 +2079,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>
>         DRM_INFO("amdgpu: finishing device.\n");
>         adev->shutdown = true;
> +       /* disable all interrupts */
> +       amdgpu_irq_disable_all(adev);
>         if (adev->mode_info.mode_config_initialized){
>                 if (!amdgpu_device_has_dc_support(adev))
>                         drm_crtc_force_disable_all(adev->ddev);
> --
> 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] 3+ messages in thread

* Re: [PATCH] drm/amdgpu - Disable all irqs before disabling all CRTCs
       [not found]     ` <CADnq5_MbkCcWL5KsmffPFH0FuG3kgjimuGtzgj6n6d1aP9pqfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-03-16  2:09       ` Andrey Grodzovsky
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Grodzovsky @ 2018-03-16  2:09 UTC (permalink / raw)
  To: Alex Deucher, Lipski, Mikita
  Cc: Deucher, Alexander, Wentland, Harry, amd-gfx list

Sorry for jumping in late,  but did you verify MST with this change ?

Just a guess but MST relies on hpd_rx interrupt for messages and 
disabling to early might have impact. Maybe trying unload/reload with 
MST display to be sure ?

Andrey


On 03/15/2018 06:23 PM, Alex Deucher wrote:
> On Thu, Mar 15, 2018 at 5:11 PM,  <mikita.lipski@amd.com> wrote:
>> From: Mikita Lipski <mikita.lipski@amd.com>
>>
>> By moving amdgpu_irq_disable_all earlier in the sequence
>> fixes an issue with disabling pflip interrupts:
>>
>> *ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source
>>
>> Earlier patch fixed a memory corruption and revealed irq
>> warnings.This way it seems to be there no obvious issues
>> with unloading the module.
>>
>> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 0b798cb..0d01735 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -1432,9 +1432,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
>>          int i, r;
>>
>>          amdgpu_amdkfd_device_fini(adev);
>> -       /* disable all interrupts */
>> -       amdgpu_irq_disable_all(adev);
>> -
>>          /* need to disable SMC first */
>>          for (i = 0; i < adev->num_ip_blocks; i++) {
>>                  if (!adev->ip_blocks[i].status.hw)
>> @@ -2082,6 +2079,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>>
>>          DRM_INFO("amdgpu: finishing device.\n");
>>          adev->shutdown = true;
>> +       /* disable all interrupts */
>> +       amdgpu_irq_disable_all(adev);
>>          if (adev->mode_info.mode_config_initialized){
>>                  if (!amdgpu_device_has_dc_support(adev))
>>                          drm_crtc_force_disable_all(adev->ddev);
>> --
>> 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] 3+ messages in thread

end of thread, other threads:[~2018-03-16  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 21:11 [PATCH] drm/amdgpu - Disable all irqs before disabling all CRTCs mikita.lipski-5C7GfCeVMHo
     [not found] ` <1521148268-6266-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2018-03-15 22:23   ` Alex Deucher
     [not found]     ` <CADnq5_MbkCcWL5KsmffPFH0FuG3kgjimuGtzgj6n6d1aP9pqfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-16  2:09       ` Andrey Grodzovsky

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.