Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5019914c authored by Zhenyu Wang's avatar Zhenyu Wang Committed by Eric Anholt
Browse files

drm/i915: Fix for LVDS VBT change on IGDNG



IGDNG mobile chip's LVDS data block removes panel fitting
register definition. So this fixes offset for LVDS timing
block parsing. Thanks for Michael Fu to catch this.

Signed-off-by: default avatarZhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent d05ca301
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ static void
parse_lfp_panel_data(struct drm_i915_private *dev_priv,
			    struct bdb_header *bdb)
{
	struct drm_device *dev = dev_priv->dev;
	struct bdb_lvds_options *lvds_options;
	struct bdb_lvds_lfp_data *lvds_lfp_data;
	struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
@@ -132,6 +133,13 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
	entry = (struct bdb_lvds_lfp_data_entry *)
		((uint8_t *)lvds_lfp_data->data + (lfp_data_size *
						   lvds_options->panel_type));

	/* On IGDNG mobile, LVDS data block removes panel fitting registers.
	   So dec 2 dword from dvo_timing offset */
	if (IS_IGDNG(dev))
		dvo_timing = (struct lvds_dvo_timing *)
					((u8 *)&entry->dvo_timing - 8);
	else
		dvo_timing = &entry->dvo_timing;

	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);