aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_panel.c')
-rw-r--r--drivers/gpu/drm/i915/intel_panel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index c65992df458d..286995a9a84a 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -281,3 +281,17 @@ void intel_panel_setup_backlight(struct drm_device *dev)
281 dev_priv->backlight_level = intel_panel_get_backlight(dev); 281 dev_priv->backlight_level = intel_panel_get_backlight(dev);
282 dev_priv->backlight_enabled = dev_priv->backlight_level != 0; 282 dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
283} 283}
284
285enum drm_connector_status
286intel_panel_detect(struct drm_device *dev)
287{
288 struct drm_i915_private *dev_priv = dev->dev_private;
289
290 /* Assume that the BIOS does not lie through the OpRegion... */
291 if (dev_priv->opregion.lid_state)
292 return ioread32(dev_priv->opregion.lid_state) & 0x1 ?
293 connector_status_connected :
294 connector_status_disconnected;
295
296 return connector_status_unknown;
297}