From: Andrey Grodzovsky <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>
To: Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Mikita Lipski <mikita.lipski-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 15/24] drm/amd/display: Fix deadlock when flushing irq
Date: Fri, 19 Jan 2018 13:33:51 -0500 [thread overview]
Message-ID: <2996fec0-814d-ec58-788b-883df20d2651@amd.com> (raw)
In-Reply-To: <20180118210353.18842-16-harry.wentland-5C7GfCeVMHo@public.gmane.org>
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@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@amd.com>
> Reviewed-by: Harry Wentland <Harry.Wentland@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);
> }
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-01-19 18:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 21:03 [PATCH 00/24] DC Patches Jan 18, 2018 Harry Wentland
[not found] ` <20180118210353.18842-1-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2018-01-18 21:03 ` [PATCH 01/24] drm/amd/display: dc: Remove unused display_mode_vba.c Harry Wentland
[not found] ` <20180118210353.18842-2-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2018-01-22 20:26 ` Andrey Grodzovsky
2018-01-22 21:27 ` [PATCH v2] " Harry Wentland
[not found] ` <20180122212733.18899-1-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2018-01-22 21:29 ` Deucher, Alexander
2018-01-18 21:03 ` [PATCH 02/24] drm/amd/display: Update the register GRPH_SWAP_CNTL if surface pixel format changed Harry Wentland
2018-01-18 21:03 ` [PATCH 03/24] drm/amd/display: Remove unused param in DML Harry Wentland
2018-01-18 21:03 ` [PATCH 04/24] drm/amd/display: Move output_tf to stream_state/update Harry Wentland
2018-01-18 21:03 ` [PATCH 05/24] drm/amd/display: Early return on crc get Harry Wentland
2018-01-18 21:03 ` [PATCH 06/24] drm/amd/display: Call update_stream_signal directly from amdgpu_dm Harry Wentland
2018-01-18 21:03 ` [PATCH 07/24] drm/amd/display: Demote error print to debug print when ATOM impl missing Harry Wentland
2018-01-18 21:03 ` [PATCH 08/24] drm/amd/display: Synchronize update plane addr for freesync Harry Wentland
2018-01-18 21:03 ` [PATCH 09/24] drm/amd/display: Add timing generator count to resource pool Harry Wentland
2018-01-18 21:03 ` [PATCH 10/24] drm/amd/display: fix backlight not off at resume from S4 Harry Wentland
2018-01-18 21:03 ` [PATCH 11/24] drm/amd/display: Define dpp1_set_cursor_position in header Harry Wentland
2018-01-18 21:03 ` [PATCH 12/24] drm/amd/display: disable az_clock_gating for endpoint register access only Harry Wentland
2018-01-18 21:03 ` [PATCH 13/24] drm/amd/display: revert to hacking bounding box for pipe split Harry Wentland
2018-01-18 21:03 ` [PATCH 14/24] drm/amd/display: dpms off mute az audio endpoint only Harry Wentland
2018-01-18 21:03 ` [PATCH 15/24] drm/amd/display: Fix deadlock when flushing irq Harry Wentland
[not found] ` <20180118210353.18842-16-harry.wentland-5C7GfCeVMHo@public.gmane.org>
2018-01-19 18:33 ` Andrey Grodzovsky [this message]
[not found] ` <2996fec0-814d-ec58-788b-883df20d2651-5C7GfCeVMHo@public.gmane.org>
2018-01-22 14:38 ` Lipski, Mikita
[not found] ` <BN6PR1201MB0100D9415FC07D00CBE859CCE4EF0-6iU6OBHu2P8MZuswy4CCPGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-01-22 14:57 ` Andrey Grodzovsky
[not found] ` <a5d20d38-760e-a4ef-5f79-8774e70f3a4c-5C7GfCeVMHo@public.gmane.org>
2018-01-22 15:53 ` Harry Wentland
[not found] ` <fd132165-4c3e-09e4-ec1c-d583263a2917-5C7GfCeVMHo@public.gmane.org>
2018-01-22 16:01 ` Andrey Grodzovsky
[not found] ` <98d53b0d-855f-1702-3c10-2b11ec416cc3-5C7GfCeVMHo@public.gmane.org>
2018-01-22 17:23 ` Deucher, Alexander
2018-01-18 21:03 ` [PATCH 16/24] drm/amd/display: dal 3.1.29 Harry Wentland
2018-01-18 21:03 ` [PATCH 17/24] drm/amd/display: Force full update on pixel_format_change Harry Wentland
2018-01-18 21:03 ` [PATCH 18/24] drm/amd/display: Add debug flag for p010_mpo_support Harry Wentland
2018-01-18 21:03 ` [PATCH 19/24] drm/amd/display: eDP sequence BL off first then DP blank Harry Wentland
2018-01-18 21:03 ` [PATCH 20/24] drm/amd/display: Fix unused variable compilation error Harry Wentland
2018-01-18 21:03 ` [PATCH 21/24] drm/amd/display: Add temporary delay on disconnect patch Harry Wentland
2018-01-18 21:03 ` [PATCH 22/24] drm/amd/display: Remove unnecessary register programming Harry Wentland
2018-01-18 21:03 ` [PATCH 23/24] drm/amd/display: Add temporary delay on disconnect patch Harry Wentland
2018-01-18 21:03 ` [PATCH 24/24] drm/amd/display: Fix warning about misaligned code Harry Wentland
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=2996fec0-814d-ec58-788b-883df20d2651@amd.com \
--to=andrey.grodzovsky-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
--cc=mikita.lipski-5C7GfCeVMHo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox