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

Commit 332545b3 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel into drm-fixes

misc i915 fixes.

* tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
  drm/i915: Sink rate read should be saved in deca-kHz
  drm/i915/dp: there is no audio on port A
  drm/i915: Add missing MacBook Pro models with dual channel LVDS
  drm/i915: Assume dual channel LVDS if pixel clock necessitates it
parents fdb68e09 736a69ca
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -13635,9 +13635,6 @@ static const struct intel_dmi_quirk intel_dmi_quirks[] = {
};
};


static struct intel_quirk intel_quirks[] = {
static struct intel_quirk intel_quirks[] = {
	/* HP Mini needs pipe A force quirk (LP: #322104) */
	{ 0x27ae, 0x103c, 0x361a, quirk_pipea_force },

	/* Toshiba Protege R-205, S-209 needs pipe A force quirk */
	/* Toshiba Protege R-205, S-209 needs pipe A force quirk */
	{ 0x2592, 0x1179, 0x0001, quirk_pipea_force },
	{ 0x2592, 0x1179, 0x0001, quirk_pipea_force },


+5 −4
Original line number Original line Diff line number Diff line
@@ -1348,7 +1348,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,


	pipe_config->has_dp_encoder = true;
	pipe_config->has_dp_encoder = true;
	pipe_config->has_drrs = false;
	pipe_config->has_drrs = false;
	pipe_config->has_audio = intel_dp->has_audio;
	pipe_config->has_audio = intel_dp->has_audio && port != PORT_A;


	if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
	if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
		intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
		intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
@@ -2211,8 +2211,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
	int dotclock;
	int dotclock;


	tmp = I915_READ(intel_dp->output_reg);
	tmp = I915_READ(intel_dp->output_reg);
	if (tmp & DP_AUDIO_OUTPUT_ENABLE)

		pipe_config->has_audio = true;
	pipe_config->has_audio = tmp & DP_AUDIO_OUTPUT_ENABLE && port != PORT_A;


	if ((port == PORT_A) || !HAS_PCH_CPT(dev)) {
	if ((port == PORT_A) || !HAS_PCH_CPT(dev)) {
		if (tmp & DP_SYNC_HS_HIGH)
		if (tmp & DP_SYNC_HS_HIGH)
@@ -3812,7 +3812,8 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
			if (val == 0)
			if (val == 0)
				break;
				break;


			intel_dp->sink_rates[i] = val * 200;
			/* Value read is in kHz while drm clock is saved in deca-kHz */
			intel_dp->sink_rates[i] = (val * 200) / 10;
		}
		}
		intel_dp->num_sink_rates = i;
		intel_dp->num_sink_rates = i;
	}
	}
+24 −2
Original line number Original line Diff line number Diff line
@@ -813,12 +813,28 @@ static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
static const struct dmi_system_id intel_dual_link_lvds[] = {
static const struct dmi_system_id intel_dual_link_lvds[] = {
	{
	{
		.callback = intel_dual_link_lvds_callback,
		.callback = intel_dual_link_lvds_callback,
		.ident = "Apple MacBook Pro (Core i5/i7 Series)",
		.ident = "Apple MacBook Pro 15\" (2010)",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"),
		},
	},
	{
		.callback = intel_dual_link_lvds_callback,
		.ident = "Apple MacBook Pro 15\" (2011)",
		.matches = {
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
		},
		},
	},
	},
	{
		.callback = intel_dual_link_lvds_callback,
		.ident = "Apple MacBook Pro 15\" (2012)",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
		},
	},
	{ }	/* terminating entry */
	{ }	/* terminating entry */
};
};


@@ -848,6 +864,11 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)
	if (i915.lvds_channel_mode > 0)
	if (i915.lvds_channel_mode > 0)
		return i915.lvds_channel_mode == 2;
		return i915.lvds_channel_mode == 2;


	/* single channel LVDS is limited to 112 MHz */
	if (lvds_encoder->attached_connector->base.panel.fixed_mode->clock
	    > 112999)
		return true;

	if (dmi_check_system(intel_dual_link_lvds))
	if (dmi_check_system(intel_dual_link_lvds))
		return true;
		return true;


@@ -1111,6 +1132,8 @@ void intel_lvds_init(struct drm_device *dev)
out:
out:
	mutex_unlock(&dev->mode_config.mutex);
	mutex_unlock(&dev->mode_config.mutex);


	intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);

	lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
	lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
	DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
	DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
		      lvds_encoder->is_dual_link ? "dual" : "single");
		      lvds_encoder->is_dual_link ? "dual" : "single");
@@ -1125,7 +1148,6 @@ void intel_lvds_init(struct drm_device *dev)
	}
	}
	drm_connector_register(connector);
	drm_connector_register(connector);


	intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
	intel_panel_setup_backlight(connector, INVALID_PIPE);
	intel_panel_setup_backlight(connector, INVALID_PIPE);


	return;
	return;