Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Dibin Moolakadan Subrahmanian
	<dibin.moolakadan.subrahmanian@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: Wed, 29 Apr 2026 11:31:33 -0300	[thread overview]
Message-ID: <87pl3haldm.fsf@intel.com> (raw)
In-Reply-To: <87se8dan0e.fsf@intel.com>

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

--
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

  reply	other threads:[~2026-04-29 14:31 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 [this message]
2026-04-30 11:36       ` Dibin Moolakadan Subrahmanian
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=87pl3haldm.fsf@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=dibin.moolakadan.subrahmanian@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