[Intel-gfx] [BXT MIPI PATCH v4 14/14] drm/i915: Added BXT DSI backlight support
Uma Shankar
uma.shankar at intel.com
Wed Sep 23 11:00:43 PDT 2015
DSI backlight support for bxt is added.
TODO: There is no support for backlight control in drm panel
framework. This will be added as part of VBT version patches
fixing the backlight sequence.
v2: Fixed Jani's review comments from previous patch. Added the
BXT DSI backlight code in this patch. Backlight setup and
enable/disable code for backlight is added in intel_dsi.c.
v3: Rebased on latest drm-nightly. Fixed Jani's review comments.
v4: Making backlight calls generic as per Jani's suggestion.
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
---
drivers/gpu/drm/i915/intel_dsi.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 08bade2..3e7f796 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -438,6 +438,7 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
struct drm_device *dev = encoder->base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ struct intel_connector *intel_connector = intel_dsi->attached_connector;
enum port port;
DRM_DEBUG_KMS("\n");
@@ -458,6 +459,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
intel_dsi_port_enable(encoder);
}
+
+ msleep(intel_dsi->backlight_on_delay);
+ intel_panel_enable_backlight(intel_connector);
}
static void intel_dsi_pre_enable(struct intel_encoder *encoder)
@@ -623,10 +627,14 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ struct intel_connector *intel_connector = intel_dsi->attached_connector;
u32 val;
DRM_DEBUG_KMS("\n");
+ intel_panel_disable_backlight(intel_connector);
+ msleep(intel_dsi->backlight_off_delay);
+
intel_dsi_disable(encoder);
intel_dsi_clear_device_ready(encoder);
@@ -1226,8 +1234,18 @@ void intel_dsi_init(struct drm_device *dev)
intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
- return;
+ /*
+ * Pipe parameter is not used for BXT.
+ * Passing INVALID_PIPE to adher to API requirement.
+ */
+ if (IS_BROXTON(dev))
+ intel_panel_setup_backlight(connector, INVALID_PIPE);
+ else
+ intel_panel_setup_backlight(connector,
+ intel_encoder->crtc_mask == (1 << PIPE_A) ?
+ PIPE_A : PIPE_B);
+ return;
err:
drm_encoder_cleanup(&intel_encoder->base);
kfree(intel_dsi);
--
1.7.9.5
More information about the Intel-gfx
mailing list