Revert "drm/i915: Parsing LFP brightness control from VBT"
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 Revert "drm/i915: Parsing LFP brightness control from VBT"
This reverts commit 371abae844ede392066bfc21202b2e40f4a654d1.
This data seems unreliable and causing many issues and blocking other teams and feature implementation. Safest way is to revert that for now.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88081
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88039
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_bios.c | 20 -------------------- drivers/gpu/drm/i915/intel_bios.h | 11 ----------- 3 files changed, 32 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -1411,7 +1411,6 @@ struct intel_vbt_data {bool present;bool active_low_pwm;u8 min_brightness;/* min_brightness/255 of max */ -u8 controller;/* brightness controller number */ } backlight;/* MIPI DSI */
drivers/gpu/drm/i915/intel_bios.c +0 -20
@@ -314,7 +314,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) {const struct bdb_lfp_backlight_data *backlight_data;const struct bdb_lfp_backlight_data_entry *entry; -const struct bdb_lfp_backlight_control_data *bl_ctrl_data; backlight_data =find_section (bdb,BDB_LVDS_BACKLIGHT );if (!backlight_data)
@@ -327,7 +326,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) } entry = &backlight_data->data[panel_type]; - bl_ctrl_data = &backlight_data->blc_ctl[panel_type]; dev_priv->vbt.backlight.present = entry->type ==BDB_BACKLIGHT_TYPE_PWM ;if (!dev_priv->vbt.backlight.present) {
@@ -339,30 +337,12 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; dev_priv->vbt.backlight.min_brightness = entry->min_brightness; - - dev_priv->vbt.backlight.controller =0 ; -if (bdb->version >=191 ) { - dev_priv->vbt.backlight.present = - bl_ctrl_data->pin ==BLC_CONTROL_PIN_DDI ; -if (!dev_priv->vbt.backlight.present) { -DRM_DEBUG_KMS ("BL control pin is not DDI (pin %u)\n" , - bl_ctrl_data->pin); -return ; - } -if (bl_ctrl_data->controller ==1 ) - dev_priv->vbt.backlight.controller = - bl_ctrl_data->controller; - } -DRM_DEBUG_KMS ("VBT backlight PWM modulation frequency %u Hz, " "active %s, min brightness %u, level %u\n" , dev_priv->vbt.backlight.pwm_freq_hz, 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 */
drivers/gpu/drm/i915/intel_bios.h +0 -11
@@ -402,21 +402,10 @@ struct bdb_lfp_backlight_data_entry {u8 obsolete3; } __packed; -#define BLC_CONTROL_PIN_PMIC 0 -#define BLC_CONTROL_PIN_LPSS_PWM 1 -#define BLC_CONTROL_PIN_DDI 2 -#define BLC_CONTROL_PIN_CABC 3 - -struct bdb_lfp_backlight_control_data { -u8 controller:4 ; -u8 pin:4 ; -} __packed; -struct bdb_lfp_backlight_data {u8 entry_size;struct bdb_lfp_backlight_data_entry data[16 ];u8 level[16 ]; -struct bdb_lfp_backlight_control_data blc_ctl[16 ]; } __packed;struct aimdb_header {
Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Rodrigo Vivi
This reverts commit
371abae844ede392066bfc21202b2e40f4a654d1.This data seems unreliable and causing many issues and blocking other teams and feature implementation. Safest way is to revert that for now.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88081
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88039Cc Ben Widawsky <[email protected]>Cc Kristian Høgsberg <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
When submitting a revert please include the cc/submitter/reviewers from the original patch too. I've done that now.
-Daniel
Quoted 102 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_bios.c | 20 -------------------- drivers/gpu/drm/i915/intel_bios.h | 11 ----------- 3 files changed, 32 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -1411,7 +1411,6 @@ struct intel_vbt_data {bool present;bool active_low_pwm;u8 min_brightness;/* min_brightness/255 of max */ -u8 controller;/* brightness controller number */ } backlight;/* MIPI DSI */ drivers/gpu/drm/i915/intel_bios.c +0
-20@@ -314,7 +314,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) {const struct bdb_lfp_backlight_data *backlight_data;const struct bdb_lfp_backlight_data_entry *entry; -const struct bdb_lfp_backlight_control_data *bl_ctrl_data; backlight_data =find_section (bdb,BDB_LVDS_BACKLIGHT );if (!backlight_data)@@ -327,7 +326,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) } entry = &backlight_data->data[panel_type]; - bl_ctrl_data = &backlight_data->blc_ctl[panel_type]; dev_priv->vbt.backlight.present = entry->type ==BDB_BACKLIGHT_TYPE_PWM ;if (!dev_priv->vbt.backlight.present) {@@ -339,30 +337,12 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; dev_priv->vbt.backlight.min_brightness = entry->min_brightness; - - dev_priv->vbt.backlight.controller =0 ; -if (bdb->version >=191 ) { - dev_priv->vbt.backlight.present = - bl_ctrl_data->pin ==BLC_CONTROL_PIN_DDI ; -if (!dev_priv->vbt.backlight.present) { -DRM_DEBUG_KMS ("BL control pin is not DDI (pin %u)\n" , - bl_ctrl_data->pin); -return ; - } -if (bl_ctrl_data->controller ==1 ) - dev_priv->vbt.backlight.controller = - bl_ctrl_data->controller; - } -DRM_DEBUG_KMS ("VBT backlight PWM modulation frequency %u Hz, " "active %s, min brightness %u, level %u\n" , dev_priv->vbt.backlight.pwm_freq_hz, 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 */ drivers/gpu/drm/i915/intel_bios.h +0
-11@@ -402,21 +402,10 @@ struct bdb_lfp_backlight_data_entry {u8 obsolete3; } __packed; -#define BLC_CONTROL_PIN_PMIC 0 -#define BLC_CONTROL_PIN_LPSS_PWM 1 -#define BLC_CONTROL_PIN_DDI 2 -#define BLC_CONTROL_PIN_CABC 3 - -struct bdb_lfp_backlight_control_data { -u8 controller:4 ; -u8 pin:4 ; -} __packed; -struct bdb_lfp_backlight_data {u8 entry_size;struct bdb_lfp_backlight_data_entry data[16 ];u8 level[16 ]; -struct bdb_lfp_backlight_control_data blc_ctl[16 ]; } __packed;struct aimdb_header {Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Rodrigo Vivi
This reverts commit
371abae844ede392066bfc21202b2e40f4a654d1.This data seems unreliable and causing many issues and blocking other teams and feature implementation. Safest way is to revert that for now.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88081
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88039
IMO s/Reference/Bugzilla/
Also
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87671
Quoted 10 lines
Quoted 3 lines
Cc Ben Widawsky <[email protected]>Cc Kristian Høgsberg <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>Cc Vandana Kannan <[email protected]>Cc Deepak M <[email protected]>Cc Jani Nikula <[email protected]>When submitting a revert please include the cc/submitter/reviewers from the original patch too. I've done that now.
The code agrees with the spec, but the VBT on these machines quite obviously does not agree with the spec.
Vandana, I think you're in a better position than us to figure out what's going on with VBT vs. the spec.
Daniel, please just pick this up now.
Quoted 109 lines
-Daniel
Quoted 102 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_bios.c | 20 -------------------- drivers/gpu/drm/i915/intel_bios.h | 11 ----------- 3 files changed, 32 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -1411,7 +1411,6 @@ struct intel_vbt_data {bool present;bool active_low_pwm;u8 min_brightness;/* min_brightness/255 of max */ -u8 controller;/* brightness controller number */ } backlight;/* MIPI DSI */ drivers/gpu/drm/i915/intel_bios.c +0
-20@@ -314,7 +314,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) {const struct bdb_lfp_backlight_data *backlight_data;const struct bdb_lfp_backlight_data_entry *entry; -const struct bdb_lfp_backlight_control_data *bl_ctrl_data; backlight_data =find_section (bdb,BDB_LVDS_BACKLIGHT );if (!backlight_data)@@ -327,7 +326,6 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) } entry = &backlight_data->data[panel_type]; - bl_ctrl_data = &backlight_data->blc_ctl[panel_type]; dev_priv->vbt.backlight.present = entry->type ==BDB_BACKLIGHT_TYPE_PWM ;if (!dev_priv->vbt.backlight.present) {@@ -339,30 +337,12 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; dev_priv->vbt.backlight.min_brightness = entry->min_brightness; - - dev_priv->vbt.backlight.controller =0 ; -if (bdb->version >=191 ) { - dev_priv->vbt.backlight.present = - bl_ctrl_data->pin ==BLC_CONTROL_PIN_DDI ; -if (!dev_priv->vbt.backlight.present) { -DRM_DEBUG_KMS ("BL control pin is not DDI (pin %u)\n" , - bl_ctrl_data->pin); -return ; - } -if (bl_ctrl_data->controller ==1 ) - dev_priv->vbt.backlight.controller = - bl_ctrl_data->controller; - } -DRM_DEBUG_KMS ("VBT backlight PWM modulation frequency %u Hz, " "active %s, min brightness %u, level %u\n" , dev_priv->vbt.backlight.pwm_freq_hz, 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 */ drivers/gpu/drm/i915/intel_bios.h +0
-11@@ -402,21 +402,10 @@ struct bdb_lfp_backlight_data_entry {u8 obsolete3; } __packed; -#define BLC_CONTROL_PIN_PMIC 0 -#define BLC_CONTROL_PIN_LPSS_PWM 1 -#define BLC_CONTROL_PIN_DDI 2 -#define BLC_CONTROL_PIN_CABC 3 - -struct bdb_lfp_backlight_control_data { -u8 controller:4 ; -u8 pin:4 ; -} __packed; -struct bdb_lfp_backlight_data {u8 entry_size;struct bdb_lfp_backlight_data_entry data[16 ];u8 level[16 ]; -struct bdb_lfp_backlight_control_data blc_ctl[16 ]; } __packed;struct aimdb_header {Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 11 lines · Jani Nikula
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Rodrigo Vivi
This reverts commit
371abae844ede392066bfc21202b2e40f4a654d1.This data seems unreliable and causing many issues and blocking other teams and feature implementation. Safest way is to revert that for now.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88081
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=88039IMO s/Reference/Bugzilla/
Yup, Bugzilla is for bugs fixed by this patch, References: is more for fyi stuff and mailing lists. Regressions should always have a bugzilla, otherwise QA has let something slip through.
Quoted 19 lines
Also
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87671
Quoted 10 lines
Quoted 3 lines
Cc Ben Widawsky <[email protected]>Cc Kristian Høgsberg <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>Cc Vandana Kannan <[email protected]>Cc Deepak M <[email protected]>Cc Jani Nikula <[email protected]>When submitting a revert please include the cc/submitter/reviewers from the original patch too. I've done that now.
The code agrees with the spec, but the VBT on these machines quite obviously does not agree with the spec.
Quoted 6 lines
Vandana, I think you're in a better position than us to figure out what's going on with VBT vs. the spec.
Daniel, please just pick this up now.
Reviewed-by Jani Nikula <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx