NP. Alex just a reminder to push your patch from SWDEV-143068 into the tree. Thanks, Andrey On 01/22/2018 10:53 AM, Harry Wentland wrote: > On 2018-01-22 09:57 AM, Andrey Grodzovsky wrote: >> You guys just need to revert it on dal-dev branch and don't promote to amd-staging-drm-next. >> > K. I'll leave it out of amd-staging-drm-next and we'll revert on our internal branch. > > Thanks for following up on this and good to hear we found a better solution. > > Harry > >> So NAK for the change. >> >> >> >> Thanks, >> >> Andrey >> >> >> On 01/22/2018 09:38 AM, Lipski, Mikita wrote: >>> Hi Andrey, >>> >>> >>> I've checked to revert this change and use Alex's change on switching irq destruction sequence and it worked no problem. >>> You can reject this change if Alex's change is pulled in. >>> >>> >>> Thanks, >>> >>> Nick >>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >>> *From:* Grodzovsky, Andrey >>> *Sent:* Friday, January 19, 2018 1:33:51 PM >>> *To:* Wentland, Harry; amd-gfx at lists.freedesktop.org >>> *Cc:* Lipski, Mikita >>> *Subject:* Re: [PATCH 15/24] drm/amd/display: Fix deadlock when flushing irq >>> >>> What this spin lock is protecting here ? Seems to me it's just a read of >>> an array element which is always there. >>> >>> Regarding subsequent remove_timer_handler and timer queue destruction it >>> seems to me to be obsolete code, I don't think DAL is still using the >>> timer queue, >>> >>> so seems to me everything related to it should be removed. >>> >>> Thanks, >>> >>> Andrey >>> >>> >>> On 01/18/2018 04:03 PM, Harry Wentland wrote: >>>> From: Mikita Lipski <mikita.lipski at amd.com> >>>> >>>> Lock irq table when reading a work in queue, >>>> unlock to flush the work, lock again till all tasks >>>> are cleared >>>> >>>> Signed-off-by: Mikita Lipski <mikita.lipski at amd.com> >>>> Reviewed-by: Harry Wentland <Harry.Wentland at amd.com> >>>> --- >>>> Â Â drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 5 +++-- >>>> Â Â 1 file changed, 3 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c >>>> index 1874b6cee6af..fb60c91a1bfe 100644 >>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c >>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c >>>> @@ -400,14 +400,15 @@ void amdgpu_dm_irq_fini(struct amdgpu_device *adev) >>>> Â Â { >>>> Â Â Â Â Â Â Â int src; >>>> Â Â Â Â Â Â Â struct irq_list_head *lh; >>>> +Â Â Â Â unsigned long irq_table_flags; >>>> Â Â Â Â Â Â Â DRM_DEBUG_KMS("DM_IRQ: releasing resources.\n"); >>>> - >>>> Â Â Â Â Â Â Â for (src = 0; src < DAL_IRQ_SOURCES_NUMBER; src++) { >>>> - >>>> +Â Â Â Â Â Â Â Â Â Â Â Â DM_IRQ_TABLE_LOCK(adev, irq_table_flags); >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /* The handler was removed from the table, >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â * it means it is safe to flush all the 'work' >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â * (because no code can schedule a new one). */ >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â lh = &adev->dm.irq_handler_list_low_tab[src]; >>>> +Â Â Â Â Â Â Â Â Â Â Â Â DM_IRQ_TABLE_UNLOCK(adev, irq_table_flags); >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â flush_work(&lh->work); >>>> Â Â Â Â Â Â Â } >>>>