From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Manna, Animesh" <animesh.manna@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: Dibin Moolakadan Subrahmanian
<dibin.moolakadan.subrahmanian@intel.com>,
"Shankar, Uma" <uma.shankar@intel.com>
Subject: RE: [PATCH] drm/i915/cmtg: Disable CMTG after PSR exit to avoid disable timeout
Date: Fri, 07 Aug 2026 11:16:16 +0300 [thread overview]
Message-ID: <636908b4af9b34f638e05e574e18438ef4f28bc2@intel.com> (raw)
In-Reply-To: <DS0PR11MB8049B57E8E753BDDBEBE62E9F9D12@DS0PR11MB8049.namprd11.prod.outlook.com>
On Fri, 07 Aug 2026, "Manna, Animesh" <animesh.manna@intel.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula <jani.nikula@linux.intel.com>
>> Sent: Friday, August 7, 2026 1:33 PM
>> To: Manna, Animesh <animesh.manna@intel.com>; intel-
>> gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
>> Cc: Manna, Animesh <animesh.manna@intel.com>; Dibin Moolakadan
>> Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>; Shankar,
>> Uma <uma.shankar@intel.com>
>> Subject: Re: [PATCH] drm/i915/cmtg: Disable CMTG after PSR exit to avoid
>> disable timeout
>>
>> On Fri, 07 Aug 2026, Animesh Manna <animesh.manna@intel.com> wrote:
>> > CMTG is enabled in sync-to-port mode, so its running state
>> > (CMTG_STATE) can only clear while the port is actively timing. In
>> > hsw_crtc_disable() the CMTG was torn down at the very beginning of the
>> > sequence, before the encoders were disabled. At that point PSR may
>> > still be active on the eDP, leaving the port timing generator idle. As
>> > a result, after clearing CMTG_ENABLE the wait for CMTG_STATE to clear
>> never completes and triggers:
>> >
>> > xe 0000:00:02.0: [drm] CMTG: A disable timeout
>> > WARNING: drivers/gpu/drm/i915/display/intel_cmtg.c:205
>> > intel_cmtg_disable+0x331/0x3d0 [xe]
>> >
>> > This is intermittently seen with igt@kms_hdr@bpc-switch-suspend, which
>> > repeatedly cycles the eDP in and out of PSR across suspend/resume.
>> >
>> > Move the CMTG disable to after intel_encoders_disable() (so PSR is
>> > exited) but before intel_encoders_post_disable()/intel_dpll_disable(),
>> > so the transcoder timing generator and port PLL are still active while
>> > CMTG_STATE is polled. The ordering requirement of disabling CMTG
>> > before the transcoder and port PLL are brought down is preserved.
>> >
>> > Cc: Dibin Moolakadan Subrahmanian
>> > <dibin.moolakadan.subrahmanian@intel.com>
>> > Cc: Uma Shankar <uma.shankar@intel.com>
>> > Signed-off-by: Animesh Manna <animesh.manna@intel.com>
>>
>> Fixes: ?
>> Cc: stable ?
>
> Sure, will add in next version.
If there is no next version otherwise, you don't have to and should not
send a new version just to amend these trailers. Just reply with them to
the patch.
BR,
Jani.
>
> Regards,
> Animesh
>>
>> > ---
>> > drivers/gpu/drm/i915/display/intel_display.c | 18 ++++++++++++++----
>> > 1 file changed, 14 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
>> > b/drivers/gpu/drm/i915/display/intel_display.c
>> > index 829d7a411dcc..cc4d20fdda44 100644
>> > --- a/drivers/gpu/drm/i915/display/intel_display.c
>> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> > @@ -1791,15 +1791,25 @@ static void hsw_crtc_disable(struct
>> intel_atomic_state *state,
>> > intel_atomic_get_old_crtc_state(state, crtc);
>> > struct intel_crtc *pipe_crtc;
>> >
>> > - if (crtc->cmtg.enabled && intel_cmtg_is_allowed(old_crtc_state)) {
>> > - intel_cmtg_set_clk_select(old_crtc_state);
>> > - intel_cmtg_disable(old_crtc_state);
>> > - }
>> > /*
>> > * FIXME collapse everything to one hook.
>> > * Need care with mst->ddi interactions.
>> > */
>> > intel_encoders_disable(state, crtc);
>> > +
>> > + /*
>> > + * Disable CMTG after the encoders are disabled (so PSR is exited) but
>> > + * before the transcoder timing generator and port PLL are torn down
>> in
>> > + * intel_encoders_post_disable()/intel_dpll_disable(). CMTG is
>> synced to
>> > + * the port, so its running state (CMTG_STATE) can only clear while
>> the
>> > + * port is actively timing. Doing this while PSR is still active leaves
>> > + * the port idle and makes the CMTG_STATE clear wait time out.
>> > + */
>> > + if (crtc->cmtg.enabled && intel_cmtg_is_allowed(old_crtc_state)) {
>> > + intel_cmtg_set_clk_select(old_crtc_state);
>> > + intel_cmtg_disable(old_crtc_state);
>> > + }
>> > +
>> > intel_encoders_post_disable(state, crtc);
>> >
>> > intel_dpll_disable(old_crtc_state);
>>
>> --
>> Jani Nikula, Intel
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-08-07 8:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 5:54 [PATCH] drm/i915/cmtg: Disable CMTG after PSR exit to avoid disable timeout Animesh Manna
2026-08-07 7:18 ` ✓ CI.KUnit: success for " Patchwork
2026-08-07 8:02 ` [PATCH] " Jani Nikula
2026-08-07 8:09 ` Manna, Animesh
2026-08-07 8:16 ` Jani Nikula [this message]
2026-08-07 8:05 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-08-07 16:53 ` ✗ i915.CI.BAT: failure " Patchwork
2026-08-07 17:56 ` ✓ Xe.CI.FULL: success " Patchwork
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=636908b4af9b34f638e05e574e18438ef4f28bc2@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=animesh.manna@intel.com \
--cc=dibin.moolakadan.subrahmanian@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=uma.shankar@intel.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 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.