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 <uma.shankar@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240412094148.808179-4-luciano.coelho@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
fe3b3ed7ff
commit
8a8dcb23b6
@ -116,6 +116,11 @@ intel_display_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
|
||||
"(0=disabled, 1=enabled) "
|
||||
"Default: 1");
|
||||
|
||||
intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
|
||||
"Enable DMC wakelock "
|
||||
"(0=disabled, 1=enabled) "
|
||||
"Default: 0");
|
||||
|
||||
__maybe_unused
|
||||
static void _param_print_bool(struct drm_printer *p, const char *driver_name,
|
||||
const char *name, bool val)
|
||||
|
@ -46,6 +46,7 @@ struct drm_i915_private;
|
||||
param(int, enable_psr, -1, 0600) \
|
||||
param(bool, psr_safest_params, false, 0400) \
|
||||
param(bool, enable_psr2_sel_fetch, true, 0400) \
|
||||
param(bool, enable_dmc_wl, false, 0400) \
|
||||
|
||||
#define MEMBER(T, member, ...) T member;
|
||||
struct intel_display_params {
|
||||
|
@ -109,7 +109,8 @@ static bool intel_dmc_wl_check_range(u32 address)
|
||||
static bool __intel_dmc_wl_supported(struct drm_i915_private *i915)
|
||||
{
|
||||
if (DISPLAY_VER(i915) < 20 ||
|
||||
!intel_dmc_has_payload(i915))
|
||||
!intel_dmc_has_payload(i915) ||
|
||||
!i915->display.params.enable_dmc_wl)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -120,7 +121,8 @@ void intel_dmc_wl_init(struct drm_i915_private *i915)
|
||||
struct intel_dmc_wl *wl = &i915->display.wl;
|
||||
|
||||
/* don't call __intel_dmc_wl_supported(), DMC is not loaded yet */
|
||||
if (DISPLAY_VER(i915) < 20)
|
||||
if (DISPLAY_VER(i915) < 20 ||
|
||||
!i915->display.params.enable_dmc_wl)
|
||||
return;
|
||||
|
||||
INIT_DELAYED_WORK(&wl->work, intel_dmc_wl_work);
|
||||
|
Loading…
x
Reference in New Issue
Block a user