[Intel-gfx] [PATCH 14/14] drm/i915: Enable VBT backlight sequences
Vidya Srinivas
vidya.srinivas at intel.com
Mon Jan 9 09:16:29 UTC 2017
Enable the support for backlight sequences to configure
backlight settings based on VBT Backlight on/off sequence.
Signed-off-by: Uma Shankar <uma.shankar at 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(+)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index cdcd3188..1f09f40 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -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
diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
index 0dc63f5..0693241 100644
--- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
@@ -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)
--
1.9.1
More information about the Intel-gfx
mailing list