Commit 9ac7d53d authored by Lyude Paul's avatar Lyude Paul Committed by Jani Nikula

drm/i915: Auto detect DPCD backlight support by default

Turns out we actually already have some companies, such as Lenovo,
shipping machines with AMOLED screens that don't allow controlling the
backlight through the usual PWM interface and only allow controlling it
through the standard EDP DPCD interface. One example of one of these
laptops is the X1 Extreme 2nd Generation.

Since we've got systems that need this turned on by default now to have
backlight controls working out of the box, let's start auto-detecting it
for systems by default based on what the VBT tells us. We do this by
changing the default value for the enable_dpcd_backlight module param
from 0 to -1.
Tested-by: default avatarAceLan Kao <acelan.kao@canonical.com>
Tested-by: default avatarPerry Yuan <pyuan@redhat.com>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200116211623.53799-6-lyude@redhat.com
parent 662884a9
...@@ -172,7 +172,7 @@ i915_param_named_unsafe(inject_probe_failure, uint, 0400, ...@@ -172,7 +172,7 @@ i915_param_named_unsafe(inject_probe_failure, uint, 0400,
i915_param_named(enable_dpcd_backlight, int, 0600, i915_param_named(enable_dpcd_backlight, int, 0600,
"Enable support for DPCD backlight control" "Enable support for DPCD backlight control"
"(-1=use per-VBT LFP backlight type setting, 0=disabled [default], 1=enabled)"); "(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enabled)");
#if IS_ENABLED(CONFIG_DRM_I915_GVT) #if IS_ENABLED(CONFIG_DRM_I915_GVT)
i915_param_named(enable_gvt, bool, 0400, i915_param_named(enable_gvt, bool, 0400,
......
...@@ -66,7 +66,7 @@ struct drm_printer; ...@@ -66,7 +66,7 @@ struct drm_printer;
param(int, reset, 3, 0600) \ param(int, reset, 3, 0600) \
param(unsigned int, inject_probe_failure, 0, 0600) \ param(unsigned int, inject_probe_failure, 0, 0600) \
param(int, fastboot, -1, 0600) \ param(int, fastboot, -1, 0600) \
param(int, enable_dpcd_backlight, 0, 0600) \ param(int, enable_dpcd_backlight, -1, 0600) \
param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \ param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
param(unsigned long, fake_lmem_start, 0, 0400) \ param(unsigned long, fake_lmem_start, 0, 0400) \
/* leave bools at the end to not create holes */ \ /* leave bools at the end to not create holes */ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment