Skip to content

Commit 8a8dcb2

Browse files
lucacoelhojnikula
authored andcommitted
drm/i915/display: add module parameter to enable DMC wakelock
This feature should be disabled by default until properly tested and mature. Add a module parameter to enable the feature for testing, while keeping it disabled by default for now. Reviewed-by: Uma Shankar <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]>
1 parent fe3b3ed commit 8a8dcb2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

drivers/gpu/drm/i915/display/intel_display_params.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ intel_display_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
116116
"(0=disabled, 1=enabled) "
117117
"Default: 1");
118118

119+
intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
120+
"Enable DMC wakelock "
121+
"(0=disabled, 1=enabled) "
122+
"Default: 0");
123+
119124
__maybe_unused
120125
static void _param_print_bool(struct drm_printer *p, const char *driver_name,
121126
const char *name, bool val)

drivers/gpu/drm/i915/display/intel_display_params.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct drm_i915_private;
4646
param(int, enable_psr, -1, 0600) \
4747
param(bool, psr_safest_params, false, 0400) \
4848
param(bool, enable_psr2_sel_fetch, true, 0400) \
49+
param(bool, enable_dmc_wl, false, 0400) \
4950

5051
#define MEMBER(T, member, ...) T member;
5152
struct intel_display_params {

drivers/gpu/drm/i915/display/intel_dmc_wl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ static bool intel_dmc_wl_check_range(u32 address)
109109
static bool __intel_dmc_wl_supported(struct drm_i915_private *i915)
110110
{
111111
if (DISPLAY_VER(i915) < 20 ||
112-
!intel_dmc_has_payload(i915))
112+
!intel_dmc_has_payload(i915) ||
113+
!i915->display.params.enable_dmc_wl)
113114
return false;
114115

115116
return true;
@@ -120,7 +121,8 @@ void intel_dmc_wl_init(struct drm_i915_private *i915)
120121
struct intel_dmc_wl *wl = &i915->display.wl;
121122

122123
/* don't call __intel_dmc_wl_supported(), DMC is not loaded yet */
123-
if (DISPLAY_VER(i915) < 20)
124+
if (DISPLAY_VER(i915) < 20 ||
125+
!i915->display.params.enable_dmc_wl)
124126
return;
125127

126128
INIT_DELAYED_WORK(&wl->work, intel_dmc_wl_work);

0 commit comments

Comments
 (0)