Use VBT LFP info pointers by default

On some machines it appears that the LFP info pointers give us more
accurate panel info than if we index into the LFP data table using the
panel type index.  Early reports indicate that using the pointers
doesn't cause regressions, so switch to them by default to help 8xx
machines.

Fixes bug 17310 (and hopefully 17658 too).
This commit is contained in:
Jesse Barnes 2008-09-30 12:46:20 -07:00
parent f315e9d1ad
commit fa2586a40f
1 changed files with 7 additions and 6 deletions

View File

@ -88,8 +88,8 @@ static void
parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
{
struct bdb_lvds_options *lvds_options;
struct bdb_lvds_lfp_data *lvds_lfp_data;
struct bdb_lvds_lfp_data_entry *entry;
struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
int timing_offset;
DisplayModePtr fixed_mode;
unsigned char *timing_ptr;
@ -104,12 +104,13 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
if (lvds_options->panel_type == 0xff)
return;
lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
if (!lvds_lfp_data)
lvds_lfp_data_ptrs = find_section(bdb, BDB_LVDS_LFP_DATA_PTRS);
if (!lvds_lfp_data_ptrs)
return;
entry = &lvds_lfp_data->data[lvds_options->panel_type];
timing_ptr = (unsigned char *)&entry->dvo_timing;
timing_offset =
lvds_lfp_data_ptrs->ptr[lvds_options->panel_type].dvo_timing_offset;
timing_ptr = (unsigned char *)bdb + timing_offset;
fixed_mode = xnfalloc(sizeof(DisplayModeRec));
memset(fixed_mode, 0, sizeof(*fixed_mode));