From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Daniel Charles <daniel.charles@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Subject: Re: drm/i915/dmc_wl: Remove macro HAS_DMC_WAKELOCK()
Date: Tue, 19 May 2026 15:34:44 -0300 [thread overview]
Message-ID: <87mrxvp7sr.fsf@intel.com> (raw)
In-Reply-To: <6a1d98fd-21d0-4f9f-88e2-de7a230fd9bc@intel.com>
Daniel Charles <daniel.charles@intel.com> writes:
> On 4/29/2026 7:26 AM, Gustavo Sousa wrote:
>> The macro HAS_DMC_WAKELOCK() is currently only used inside
>> intel_dmc_wl.c and doesn't need to be exposed to the rest of the driver.
>> Furthermore, there is a distinction between the display IP having
>> support for the feature and the driver actually using it, so using
>> HAS_DMC_WAKELOCK() outside of intel_dmc_wl.c would potentially be wrong
>> anyway.
>>
>> Let's drop that macro. If other part of the driver needs to check if
>> the driver is using the DMC wakelock feature, we would need actually to
>> expose the function __intel_dmc_wl_supported().
>>
>> Since HAS_DMC_WAKELOCK() was kind of self-documenting in the sense that
>> it tells us what display IPs have support for the feature and we are now
>> dropping it, let's also take this opportunity to add a documentation
>> note on the subject.
>>
>> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_display_device.h | 1 -
>> drivers/gpu/drm/i915/display/intel_dmc_wl.c | 9 ++++++++-
>> 2 files changed, 8 insertions(+), 2 deletions(-)
>>
>>
>> ---
>> base-commit: 9ee30ac229d686465b572e6404250178b28b616b
>> change-id: 20260429-drop-has_dmc_wakelock-e939d11588a7
>>
>> Best regards,
>> --
>> Gustavo Sousa <gustavo.sousa@intel.com>
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
>> index 074e3ba8fb77..12e5a522a299 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
>> @@ -162,7 +162,6 @@ struct intel_display_platforms {
>> #define HAS_DDI(__display) (DISPLAY_INFO(__display)->has_ddi)
>> #define HAS_DISPLAY(__display) (DISPLAY_RUNTIME_INFO(__display)->pipe_mask != 0)
>> #define HAS_DMC(__display) (DISPLAY_RUNTIME_INFO(__display)->has_dmc)
>> -#define HAS_DMC_WAKELOCK(__display) (DISPLAY_VER(__display) >= 20)
>> #define HAS_DOUBLE_BUFFERED_M_N(__display) (IS_DISPLAY_VER((__display), 9, 14) || (__display)->platform.broadwell)
>> #define HAS_DOUBLE_BUFFERED_LUT(__display) (DISPLAY_VER(__display) >= 30)
>> #define HAS_DOUBLE_WIDE(__display) (DISPLAY_VER(__display) < 4)
>> diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> index ddf1a1f1ebc3..7769860e17ea 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
>> @@ -39,6 +39,13 @@
>> * current implementation, we only need one wakelock, so only
>> * DMC_WAKELOCK1_CTL is used. The other definitions are here for
>> * potential future use.
>> + *
>> + * This is available starting with Xe2_LPD (display version 20) as an
>> + * experimental feature and on Xe3_LPD (display version 30) as the
>> + * first display release with official support. That means that we
>> + * only enable the feature by default on the latter and using it on
>> + * the former requires explicitly using the enable_dmc_wl module
>> + * parameter.
>> */
>>
>> /*
>> @@ -286,7 +293,7 @@ static void intel_dmc_wl_sanitize_param(struct intel_display *display)
>> {
>> const char *desc;
>>
>> - if (!HAS_DMC_WAKELOCK(display)) {
>> + if (DISPLAY_VER(display) < 20) {
>> display->params.enable_dmc_wl = ENABLE_DMC_WL_DISABLED;
>> } else if (display->params.enable_dmc_wl < 0) {
>> if (DISPLAY_VER(display) >= 30)
>
> LGTM
>
> Reviewed-by: Daniel Charles <daniel.charles@intel.com>
Pushed to drm-intel-next. Thanks Daniel for the review!
--
Gustavo Sousa
prev parent reply other threads:[~2026-05-19 18:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 14:26 [PATCH] drm/i915/dmc_wl: Remove macro HAS_DMC_WAKELOCK() Gustavo Sousa
2026-04-29 15:53 ` ✓ CI.KUnit: success for " Patchwork
2026-04-29 16:00 ` ✓ i915.CI.BAT: " Patchwork
2026-04-29 17:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-30 1:06 ` ✗ i915.CI.Full: failure " Patchwork
2026-05-19 18:09 ` Gustavo Sousa
2026-04-30 4:01 ` ✗ Xe.CI.FULL: " Patchwork
2026-05-19 18:12 ` Gustavo Sousa
2026-05-11 16:51 ` Daniel Charles
2026-05-19 18:34 ` Gustavo Sousa [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=87mrxvp7sr.fsf@intel.com \
--to=gustavo.sousa@intel.com \
--cc=daniel.charles@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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.