From: Mario Limonciello <mario.limonciello@amd.com>
To: Roman.Li@amd.com, amd-gfx@lists.freedesktop.org,
Alexander.Deucher@amd.com, Aurabindo.Pillai@amd.com,
li.ma@amd.com
Cc: Mark Broadworth <mark.broadworth@amd.com>,
chiahsuan.chung@amd.com, Sunpeng.Li@amd.com,
Rodrigo.Siqueira@amd.com, jerry.zuo@amd.com,
hamza.mahfooz@amd.com, wayne.lin@amd.com, Harry.Wentland@amd.com
Subject: Re: [PATCH 1/3] drm/amd/display: Disable ips before dc interrupt setting
Date: Wed, 24 Jan 2024 11:15:22 -0600 [thread overview]
Message-ID: <b2a5d889-a36a-4099-b2f4-c09d2f31b520@amd.com> (raw)
In-Reply-To: <20240124170906.901841-1-Roman.Li@amd.com>
On 1/24/2024 11:09, Roman.Li@amd.com wrote:
> From: Roman Li <Roman.Li@amd.com>
>
> [Why]
> While in IPS2 an access to dcn registers is not allowed.
> If interrupt results in dc call, we should disable IPS.
>
> [How]
> Safeguard register access in IPS2 by disabling idle optimization
> before calling dc interrupt setting api.
>
> Signed-off-by: Roman Li <Roman.Li@amd.com>
> Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> 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 58b880acb087..3390f0d8420a 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
> @@ -711,7 +711,7 @@ static inline int dm_irq_state(struct amdgpu_device *adev,
> {
> bool st;
> enum dc_irq_source irq_source;
> -
> + struct dc *dc = adev->dm.dc;
> struct amdgpu_crtc *acrtc = adev->mode_info.crtcs[crtc_id];
>
> if (!acrtc) {
> @@ -729,6 +729,9 @@ static inline int dm_irq_state(struct amdgpu_device *adev,
>
> st = (state == AMDGPU_IRQ_STATE_ENABLE);
>
> + if (dc && dc->caps.ips_support && dc->idle_optimizations_allowed)
> + dc_allow_idle_optimizations(dc, false);
> +
> dc_interrupt_set(adev->dm.dc, irq_source, st);
> return 0;
> }
prev parent reply other threads:[~2024-01-24 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 17:09 [PATCH 1/3] drm/amd/display: Disable ips before dc interrupt setting Roman.Li
2024-01-24 17:09 ` [PATCH 2/3] drm/amd: Add a DC debug mask for IPS Roman.Li
2024-01-24 17:15 ` Mario Limonciello
2024-01-24 17:09 ` [PATCH 3/3] drm/amd/display: "Enable IPS by default" Roman.Li
2024-01-24 17:15 ` Mario Limonciello
2024-01-24 17:15 ` Mario Limonciello [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=b2a5d889-a36a-4099-b2f4-c09d2f31b520@amd.com \
--to=mario.limonciello@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Roman.Li@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chiahsuan.chung@amd.com \
--cc=hamza.mahfooz@amd.com \
--cc=jerry.zuo@amd.com \
--cc=li.ma@amd.com \
--cc=mark.broadworth@amd.com \
--cc=wayne.lin@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