drm/i915: enable/disable backlight for eDP

Like we already do for the LVDS panels. This seems to help greatly
in setting up the backlight, since the BIOS might refuse to cooperate.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

v2: Move the backlight_off call from panel_off to edp_backlight_off,
noticed by Paulo Zanoni.

Reviewed-by: Paulo Zanoni <przanoni@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2012-10-20 20:57:42 +02:00
Родитель 82ed61fa1a
Коммит 035aa3dec8
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1164,6 +1164,7 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
{ {
struct drm_device *dev = intel_dp->base.base.dev; struct drm_device *dev = intel_dp->base.base.dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe = to_intel_crtc(intel_dp->base.base.crtc)->pipe;
u32 pp; u32 pp;
if (!is_edp(intel_dp)) if (!is_edp(intel_dp))
@ -1181,6 +1182,8 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
pp |= EDP_BLC_ENABLE; pp |= EDP_BLC_ENABLE;
I915_WRITE(PCH_PP_CONTROL, pp); I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL); POSTING_READ(PCH_PP_CONTROL);
intel_panel_enable_backlight(dev, pipe);
} }
static void ironlake_edp_backlight_off(struct intel_dp *intel_dp) static void ironlake_edp_backlight_off(struct intel_dp *intel_dp)
@ -1192,6 +1195,8 @@ static void ironlake_edp_backlight_off(struct intel_dp *intel_dp)
if (!is_edp(intel_dp)) if (!is_edp(intel_dp))
return; return;
intel_panel_disable_backlight(dev);
DRM_DEBUG_KMS("\n"); DRM_DEBUG_KMS("\n");
pp = ironlake_get_pp_control(dev_priv); pp = ironlake_get_pp_control(dev_priv);
pp &= ~EDP_BLC_ENABLE; pp &= ~EDP_BLC_ENABLE;