@@ -1633,6 +1633,7 @@ struct intel_vbt_data {
bool present;
bool active_low_pwm;
u8 min_brightness; /* min_brightness/255 of max */
+ u8 controller; /* brightness controller number */
enum intel_backlight_type type;
} backlight;
@@ -330,6 +330,8 @@ static u32 get_blocksize(const void *block_data)
method = &backlight_data->backlight_control[panel_type];
dev_priv->vbt.backlight.type = method->type;
+ dev_priv->vbt.backlight.controller = 0;
+ dev_priv->vbt.backlight.controller = method->controller;
}
dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
@@ -341,6 +343,9 @@ static u32 get_blocksize(const void *block_data)
dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
dev_priv->vbt.backlight.min_brightness,
backlight_data->level[panel_type]);
+
+ DRM_DEBUG_KMS("VBT BL controller %u\n",
+ dev_priv->vbt.backlight.controller);
}
/* Try to find sdvo panel data */
@@ -1612,7 +1612,7 @@ static int vlv_setup_backlight(struct intel_connector *connector, enum pipe pipe
* For BXT hard coding the Backlight controller to 0.
* TODO : Read the controller value from VBT and generalize
*/
- panel->backlight.controller = 0;
+ panel->backlight.controller = dev_priv->vbt.backlight.controller;
pwm_ctl = I915_READ(BXT_BLC_PWM_CTL(panel->backlight.controller));