From: Harry Wentland <harry.wentland@amd.com>
To: Hamza Mahfooz <hamza.mahfooz@amd.com>, amd-gfx@lists.freedesktop.org
Cc: "Stylon Wang" <stylon.wang@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
linux-kernel@vger.kernel.org, "Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
"Roman Li" <roman.li@amd.com>,
dri-devel@lists.freedesktop.org,
"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Alex Hung" <alex.hung@amd.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Mario Limonciello" <mario.limonciello@amd.com>
Subject: Re: [PATCH v3] drm/amd/display: add an ASSERT() to irq service functions
Date: Mon, 17 Oct 2022 14:48:50 -0400 [thread overview]
Message-ID: <2b472233-f432-f046-bef3-5152b18a2b79@amd.com> (raw)
In-Reply-To: <20221017161322.95808-1-hamza.mahfooz@amd.com>
On 2022-10-17 12:13, Hamza Mahfooz wrote:
> Currently, if we encounter unimplemented functions, it is difficult to
> tell what caused them just by looking at dmesg and that is compounded by
> the fact that it is often hard to reproduce said issues, for instance we
> have had reports of this condition being triggered when removing a
> secondary display that is setup in mirror mode and is connected using
> usb-c. So, to have access to more detailed debugging information, add an
> ASSERT() to dal_irq_service_ack() and dal_irq_service_set() that only
> triggers when we encounter an unimplemented function.
>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> v2: detail specific instance that I'm interested in and use ASSERT()
> instead of WARN().
>
> v3: move ASSERT()s inside the new if blocks.
> ---
> .../gpu/drm/amd/display/dc/irq/irq_service.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/irq/irq_service.c b/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> index 7bad39bba86b..d100edaedbbb 100644
> --- a/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> +++ b/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> @@ -112,8 +112,15 @@ bool dal_irq_service_set(
>
> dal_irq_service_ack(irq_service, source);
>
> - if (info->funcs && info->funcs->set)
> + if (info->funcs && info->funcs->set) {
> + if (info->funcs->set == dal_irq_service_dummy_set) {
> + DC_LOG_WARNING("%s: src: %d, st: %d\n", __func__,
> + source, enable);
> + ASSERT(0);
> + }
> +
> return info->funcs->set(irq_service, info, enable);
> + }
>
> dal_irq_service_set_generic(irq_service, info, enable);
>
> @@ -146,8 +153,14 @@ bool dal_irq_service_ack(
> return false;
> }
>
> - if (info->funcs && info->funcs->ack)
> + if (info->funcs && info->funcs->ack) {
> + if (info->funcs->ack == dal_irq_service_dummy_ack) {
> + DC_LOG_WARNING("%s: src: %d\n", __func__, source);
> + ASSERT(0);
> + }
> +
> return info->funcs->ack(irq_service, info);
> + }
>
> dal_irq_service_ack_generic(irq_service, info);
>
prev parent reply other threads:[~2022-10-17 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 16:13 Hamza Mahfooz
2022-10-17 18:48 ` Harry Wentland [this message]
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=2b472233-f432-f046-bef3-5152b18a2b79@amd.com \
--to=harry.wentland@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamza.mahfooz@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=roman.li@amd.com \
--cc=stylon.wang@amd.com \
--cc=sunpeng.li@amd.com \
/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
all inboxes | Powered by JetHome®