Commit 35ffda48 authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915: hsw backlight registers need transcoder instead of pipe

v2: Make TRANSCODER_EDP handling more explicit. (Imre)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 81a07809
...@@ -2087,6 +2087,10 @@ ...@@ -2087,6 +2087,10 @@
#define BLM_PIPE_A (0 << 29) #define BLM_PIPE_A (0 << 29)
#define BLM_PIPE_B (1 << 29) #define BLM_PIPE_B (1 << 29)
#define BLM_PIPE_C (2 << 29) /* ivb + */ #define BLM_PIPE_C (2 << 29) /* ivb + */
#define BLM_TRANSCODER_A BLM_PIPE_A /* hsw */
#define BLM_TRANSCODER_B BLM_PIPE_B
#define BLM_TRANSCODER_C BLM_PIPE_C
#define BLM_TRANSCODER_EDP (3 << 29)
#define BLM_PIPE(pipe) ((pipe) << 29) #define BLM_PIPE(pipe) ((pipe) << 29)
#define BLM_POLARITY_I965 (1 << 28) /* gen4 only */ #define BLM_POLARITY_I965 (1 << 28) /* gen4 only */
#define BLM_PHASE_IN_INTERUPT_STATUS (1 << 26) #define BLM_PHASE_IN_INTERUPT_STATUS (1 << 26)
......
...@@ -344,6 +344,8 @@ void intel_panel_enable_backlight(struct drm_device *dev, ...@@ -344,6 +344,8 @@ void intel_panel_enable_backlight(struct drm_device *dev,
enum pipe pipe) enum pipe pipe)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
enum transcoder cpu_transcoder =
intel_pipe_to_cpu_transcoder(dev_priv, pipe);
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&dev_priv->backlight.lock, flags); spin_lock_irqsave(&dev_priv->backlight.lock, flags);
...@@ -374,7 +376,10 @@ void intel_panel_enable_backlight(struct drm_device *dev, ...@@ -374,7 +376,10 @@ void intel_panel_enable_backlight(struct drm_device *dev,
else else
tmp &= ~BLM_PIPE_SELECT; tmp &= ~BLM_PIPE_SELECT;
tmp |= BLM_PIPE(pipe); if (cpu_transcoder == TRANSCODER_EDP)
tmp |= BLM_TRANSCODER_EDP;
else
tmp |= BLM_PIPE(cpu_transcoder);
tmp &= ~BLM_PWM_ENABLE; tmp &= ~BLM_PWM_ENABLE;
I915_WRITE(reg, tmp); I915_WRITE(reg, tmp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment