diff options
| -rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index cdd126d068a7..716409a57244 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
| @@ -99,9 +99,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv, | |||
| 99 | { | 99 | { |
| 100 | struct bdb_lvds_options *lvds_options; | 100 | struct bdb_lvds_options *lvds_options; |
| 101 | struct bdb_lvds_lfp_data *lvds_lfp_data; | 101 | struct bdb_lvds_lfp_data *lvds_lfp_data; |
| 102 | struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs; | ||
| 102 | struct bdb_lvds_lfp_data_entry *entry; | 103 | struct bdb_lvds_lfp_data_entry *entry; |
| 103 | struct lvds_dvo_timing *dvo_timing; | 104 | struct lvds_dvo_timing *dvo_timing; |
| 104 | struct drm_display_mode *panel_fixed_mode; | 105 | struct drm_display_mode *panel_fixed_mode; |
| 106 | int lfp_data_size; | ||
| 105 | 107 | ||
| 106 | /* Defaults if we can't find VBT info */ | 108 | /* Defaults if we can't find VBT info */ |
| 107 | dev_priv->lvds_dither = 0; | 109 | dev_priv->lvds_dither = 0; |
| @@ -119,9 +121,17 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv, | |||
| 119 | if (!lvds_lfp_data) | 121 | if (!lvds_lfp_data) |
| 120 | return; | 122 | return; |
| 121 | 123 | ||
| 124 | lvds_lfp_data_ptrs = find_section(bdb, BDB_LVDS_LFP_DATA_PTRS); | ||
| 125 | if (!lvds_lfp_data_ptrs) | ||
| 126 | return; | ||
| 127 | |||
| 122 | dev_priv->lvds_vbt = 1; | 128 | dev_priv->lvds_vbt = 1; |
| 123 | 129 | ||
| 124 | entry = &lvds_lfp_data->data[lvds_options->panel_type]; | 130 | lfp_data_size = lvds_lfp_data_ptrs->ptr[1].dvo_timing_offset - |
| 131 | lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset; | ||
| 132 | entry = (struct bdb_lvds_lfp_data_entry *) | ||
| 133 | ((uint8_t *)lvds_lfp_data->data + (lfp_data_size * | ||
| 134 | lvds_options->panel_type)); | ||
| 125 | dvo_timing = &entry->dvo_timing; | 135 | dvo_timing = &entry->dvo_timing; |
| 126 | 136 | ||
| 127 | panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); | 137 | panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); |
