@@ -537,6 +537,7 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
}
intel_panel_enable_backlight(intel_dsi->attached_connector);
+ drm_panel_backlight_on(intel_dsi->panel);
}
static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
@@ -619,6 +620,7 @@ static void intel_dsi_pre_disable(struct intel_encoder *encoder,
DRM_DEBUG_KMS("\n");
intel_panel_disable_backlight(intel_dsi->attached_connector);
+ drm_panel_backlight_off(intel_dsi->panel);
/*
* Disable Device ready before the port shutdown in order
@@ -567,6 +567,20 @@ static int vbt_panel_reset(struct drm_panel *panel)
return 0;
}
+static int vbt_panel_backlight_on(struct drm_panel *panel)
+{
+ generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_ON);
+
+ return 0;
+}
+
+static int vbt_panel_backlight_off(struct drm_panel *panel)
+{
+ generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_OFF);
+
+ return 0;
+}
+
static const struct drm_panel_funcs vbt_panel_funcs = {
.disable = vbt_panel_disable,
.unprepare = vbt_panel_unprepare,
@@ -576,6 +590,8 @@ static int vbt_panel_reset(struct drm_panel *panel)
.power_off = vbt_panel_power_off,
.enable = vbt_panel_enable,
.get_modes = vbt_panel_get_modes,
+ .backlight_on = vbt_panel_backlight_on,
+ .backlight_off = vbt_panel_backlight_off,
};
struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id)
Enable the support for backlight sequences to configure backlight settings based on VBT Backlight on/off sequence. Signed-off-by: Uma Shankar <uma.shankar@intel.com> --- drivers/gpu/drm/i915/intel_dsi.c | 2 ++ drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+)