summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2021-01-15 01:17:05 +0300
committerJani Nikula <jani.nikula@intel.com>2021-01-15 17:19:12 +0300
commit31b10c1a947d5c4b023591367cd4b08d158df531 (patch)
treec2d5890b78790b954f0f06cf8b2dc1a270f6be0f /drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
parenta1f6bfe1793141f817e5a49c3563bb222ea03e24 (diff)
downloadlinux-31b10c1a947d5c4b023591367cd4b08d158df531.tar.xz
drm/i915: Pass port to intel_panel_bl_funcs.get()
In the next commit where we split PWM related backlight functions from higher-level backlight functions, we'll want to be able to retrieve the backlight level for the current display panel from the intel_panel_bl_funcs->setup() function using pwm_funcs->get(). Since intel_panel_bl_funcs->setup() is called before we've fully read in the current hardware state into our atomic state, we can't grab atomic modesetting locks safely anyway in intel_panel_bl_funcs->setup(), and some PWM backlight functions (vlv_get_backlight() in particular) require knowing the currently used pipe we need to be able to discern the current display pipe through other means. Luckily, we're already passing the current display pipe to intel_panel_bl_funcs->setup() so all we have to do in order to achieve this is pass down that parameter to intel_panel_bl_funcs->get(). So, fix this by accepting an additional pipe parameter in intel_panel_bl_funcs->get(), and leave figuring out the current display pipe up to the caller. Signed-off-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210114221709.2261452-2-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
index 88628764956d..584c14c4cbd0 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
@@ -43,7 +43,7 @@
#define PANEL_PWM_MAX_VALUE 0xFF
-static u32 dcs_get_backlight(struct intel_connector *connector)
+static u32 dcs_get_backlight(struct intel_connector *connector, enum pipe unused)
{
struct intel_encoder *encoder = intel_attached_encoder(connector);
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);