From: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Cc: <jouni.hogander@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/psr: Use DMC wakelock instead of DC state for VBI
Date: Thu, 30 Apr 2026 17:06:47 +0530 [thread overview]
Message-ID: <2e987010-edf4-414c-9337-89224f9796fe@intel.com> (raw)
In-Reply-To: <87pl3haldm.fsf@intel.com>
On 29-04-2026 20:01, Gustavo Sousa wrote:
> Gustavo Sousa <gustavo.sousa@intel.com> writes:
>
>> Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
>> writes:
>>
>>> From display version 30+, use the DMC wakelock mechanism for
>>> preventing DC entry. Older platforms continue to use
>>> set_target_dc_state() to disable DC entry during active vblank.
>>>
>>> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/2296
>>> Fixes: acfc688bc51b ("drm/i915/dmc: Reduce wakelock hold time")
>>> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/display/intel_psr.c | 26 +++++++++++++++---------
>>> 1 file changed, 16 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
>>> index 9acd47392192..d01b4013f33f 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_psr.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
>>> @@ -4151,16 +4151,22 @@ void intel_psr_notify_vblank_enable_disable(struct intel_display *display,
>>> mutex_unlock(&intel_dp->psr.lock);
>>> break;
>>> }
>>> -
>>> - /*
>>> - * NOTE: intel_display_power_set_target_dc_state is used
>>> - * only by PSR * code for DC3CO handling. DC3CO target
>>> - * state is currently disabled in * PSR code. If DC3CO
>>> - * is taken into use we need take that into account here
>>> - * as well.
>>> - */
>>> - intel_display_power_set_target_dc_state(display, enable ? DC_STATE_DISABLE :
>>> - DC_STATE_EN_UPTO_DC6);
>>> + if (DISPLAY_VER(display) < 30) {
>> Drive-by comment:
>>
>> I think we should avoid using open-coded version check for testing
>> features. It is usually better to use the HAS_SOME_FEATURE() macros
>> that we expose in intel_display_device.h.
>>
>> In this case though, it is better to use to expose and use
>> __intel_dmc_wl_supported (dropping the "__") instead of doing a display
>> version check here, since that is what will actually tell whether the
>> driver is using the wakelock or not.
>>
>> I even think we can even drop the HAS_DMC_WAKELOCK, since it is not used
>> outside of intel_dmc_wl.c.
> For this last part:
> https://lore.kernel.org/all/20260429-drop-has_dmc_wakelock-v1-1-62cb6fab1da0@intel.com
Thanks for the review. I agree that the open-coded version check is short-sighted here.
I will refactor the code to export and use intel_dmc_wl_supported().
> --
> Gustavo Sousa
>
>> --
>> Gustavo Sousa
>>
>>> + /*
>>> + * NOTE: intel_display_power_set_target_dc_state is used
>>> + * only by PSR code for DC3CO handling. DC3CO target
>>> + * state is currently disabled in PSR code. If DC3CO
>>> + * is taken into use we need take that into account here
>>> + * as well.
>>> + */
>>> + intel_display_power_set_target_dc_state(display, enable ? DC_STATE_DISABLE :
>>> + DC_STATE_EN_UPTO_DC6);
>>> + } else {
>>> + if (enable)
>>> + intel_dmc_wl_get_noreg(display);
>>> + else
>>> + intel_dmc_wl_put_noreg(display);
>>> + }
>>> }
>>>
>>> static void
>>> --
>>> 2.43.0
next prev parent reply other threads:[~2026-04-30 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 11:00 [PATCH 0/2] drm/i915/psr: DC entry prevention during active vblank Dibin Moolakadan Subrahmanian
2026-04-29 11:00 ` [PATCH 1/2] drm/i915/psr: Unify DC state handling for PSR and Panel Replay on VBI enable Dibin Moolakadan Subrahmanian
2026-04-29 11:00 ` [PATCH 2/2] drm/i915/psr: Use DMC wakelock instead of DC state for VBI Dibin Moolakadan Subrahmanian
2026-04-29 13:56 ` Gustavo Sousa
2026-04-29 14:31 ` Gustavo Sousa
2026-04-30 11:36 ` Dibin Moolakadan Subrahmanian [this message]
2026-04-29 13:11 ` ✓ CI.KUnit: success for drm/i915/psr: DC entry prevention during active vblank Patchwork
2026-04-29 14:25 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-30 0:30 ` ✗ Xe.CI.FULL: failure " 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=2e987010-edf4-414c-9337-89224f9796fe@intel.com \
--to=dibin.moolakadan.subrahmanian@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox