Skip to contentSkip to conversation

drm/i915: Enable VBT backlight sequences

PATCH In review Vidya Srinivas 1 participant 1 message Jan 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 14/14 drm/i915: Enable VBT backlight sequences

Enable the support for backlight sequences to configure backlight settings based on VBT Backlight on/off sequence.

---
 drivers/gpu/drm/i915/intel_dsi.c           |  2 ++
 drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)
drivers/gpu/drm/i915/intel_dsi.c +2 -0
index cdcd3188..1f09f40 100644
@@ -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
drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +16 -0
index 0dc63f5..0693241 100644
@@ -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)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx