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

Commit fb09185a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Radeon is most of the work, one regression, one BUG fix in the new
  prime code, some fixes to init code to make streamout not lock up the
  hardware, and just some code to enable users to test HDMI audio on
  later hw (its off by default).

  Intel adds edp edid caching for some strange Dell Vostros that black
  screen on startup if keep reading their EDID, and a fix for a DP
  regression.

  Otherwise fix for via/sis and one to stop udl binding to multiple
  non-video usb."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: cache the EDID for eDP panels
  Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"
  drm/i915: eDP aux needs vdd
  drm/i915: don't enumerate HDMID if an eDP panel is already active on the port
  drm/radeon: add support for STRMOUT_BASE_UPDATE on 7xx
  drm/radeon: add some additional 6xx/7xx/EG register init
  drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
  drm sis: initialize object_idr
  drm via: initialize object_idr
  drm/radeon/prime: reserve/unreserve around pin
  drm/radeon: fix regression in dynpm due to multi-ring rework
  vga_switcheroo.h: fix pci_dev warning
  drm/udl: only bind to the video devices on the hub.
parents 41a328b9 c4af5c45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6558,7 +6558,7 @@ static void intel_setup_outputs(struct drm_device *dev)
		if (I915_READ(HDMIC) & PORT_DETECTED)
			intel_hdmi_init(dev, HDMIC);

		if (I915_READ(HDMID) & PORT_DETECTED)
		if (!dpd_is_edp && I915_READ(HDMID) & PORT_DETECTED)
			intel_hdmi_init(dev, HDMID);

		if (I915_READ(PCH_DP_C) & DP_DETECTED)
+53 −7
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "drm.h"
#include "drm_crtc.h"
#include "drm_crtc_helper.h"
#include "drm_edid.h"
#include "intel_drv.h"
#include "i915_drm.h"
#include "i915_drv.h"
@@ -67,6 +68,8 @@ struct intel_dp {
	struct drm_display_mode *panel_fixed_mode;  /* for eDP */
	struct delayed_work panel_vdd_work;
	bool want_panel_vdd;
	struct edid *edid; /* cached EDID for eDP */
	int edid_mode_count;
};

/**
@@ -371,7 +374,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
	int recv_bytes;
	uint32_t status;
	uint32_t aux_clock_divider;
	int try, precharge = 5;
	int try, precharge;

	intel_dp_check_edp(intel_dp);
	/* The clock divider is based off the hrawclk,
@@ -391,6 +394,11 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
	else
		aux_clock_divider = intel_hrawclk(dev) / 2;

	if (IS_GEN6(dev))
		precharge = 3;
	else
		precharge = 5;

	/* Try to wait for any previous AUX channel activity */
	for (try = 0; try < 3; try++) {
		status = I915_READ(ch_ctl);
@@ -1973,6 +1981,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp)
	if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT))
		return;

	ironlake_edp_panel_vdd_on(intel_dp);

	if (intel_dp_aux_native_read_retry(intel_dp, DP_SINK_OUI, buf, 3))
		DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n",
			      buf[0], buf[1], buf[2]);
@@ -1980,6 +1990,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp)
	if (intel_dp_aux_native_read_retry(intel_dp, DP_BRANCH_OUI, buf, 3))
		DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n",
			      buf[0], buf[1], buf[2]);

	ironlake_edp_panel_vdd_off(intel_dp, false);
}

static bool
@@ -2116,10 +2128,22 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
{
	struct intel_dp *intel_dp = intel_attached_dp(connector);
	struct edid	*edid;
	int size;

	if (is_edp(intel_dp)) {
		if (!intel_dp->edid)
			return NULL;

		size = (intel_dp->edid->extensions + 1) * EDID_LENGTH;
		edid = kmalloc(size, GFP_KERNEL);
		if (!edid)
			return NULL;

		memcpy(edid, intel_dp->edid, size);
		return edid;
	}

	ironlake_edp_panel_vdd_on(intel_dp);
	edid = drm_get_edid(connector, adapter);
	ironlake_edp_panel_vdd_off(intel_dp, false);
	return edid;
}

@@ -2129,9 +2153,17 @@ intel_dp_get_edid_modes(struct drm_connector *connector, struct i2c_adapter *ada
	struct intel_dp *intel_dp = intel_attached_dp(connector);
	int	ret;

	ironlake_edp_panel_vdd_on(intel_dp);
	if (is_edp(intel_dp)) {
		drm_mode_connector_update_edid_property(connector,
							intel_dp->edid);
		ret = drm_add_edid_modes(connector, intel_dp->edid);
		drm_edid_to_eld(connector,
				intel_dp->edid);
		connector->display_info.raw_edid = NULL;
		return intel_dp->edid_mode_count;
	}

	ret = intel_ddc_get_modes(connector, adapter);
	ironlake_edp_panel_vdd_off(intel_dp, false);
	return ret;
}

@@ -2321,6 +2353,7 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder)
	i2c_del_adapter(&intel_dp->adapter);
	drm_encoder_cleanup(encoder);
	if (is_edp(intel_dp)) {
		kfree(intel_dp->edid);
		cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
		ironlake_panel_vdd_off_sync(intel_dp);
	}
@@ -2504,11 +2537,14 @@ intel_dp_init(struct drm_device *dev, int output_reg)
			break;
	}

	intel_dp_i2c_init(intel_dp, intel_connector, name);

	/* Cache some DPCD data in the eDP case */
	if (is_edp(intel_dp)) {
		bool ret;
		struct edp_power_seq	cur, vbt;
		u32 pp_on, pp_off, pp_div;
		struct edid *edid;

		pp_on = I915_READ(PCH_PP_ON_DELAYS);
		pp_off = I915_READ(PCH_PP_OFF_DELAYS);
@@ -2576,9 +2612,19 @@ intel_dp_init(struct drm_device *dev, int output_reg)
			intel_dp_destroy(&intel_connector->base);
			return;
		}
	}

	intel_dp_i2c_init(intel_dp, intel_connector, name);
		ironlake_edp_panel_vdd_on(intel_dp);
		edid = drm_get_edid(connector, &intel_dp->adapter);
		if (edid) {
			drm_mode_connector_update_edid_property(connector,
								edid);
			intel_dp->edid_mode_count =
				drm_add_edid_modes(connector, edid);
			drm_edid_to_eld(connector, edid);
			intel_dp->edid = edid;
		}
		ironlake_edp_panel_vdd_off(intel_dp, false);
	}

	intel_encoder->hot_plug = intel_dp_hot_plug;

+3 −1
Original line number Diff line number Diff line
@@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,

	if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) {
		r600_hdmi_enable(encoder);
		if (ASIC_IS_DCE4(rdev))
		if (ASIC_IS_DCE6(rdev))
			; /* TODO (use pointers instead of if-s?) */
		else if (ASIC_IS_DCE4(rdev))
			evergreen_hdmi_setmode(encoder, adjusted_mode);
		else
			r600_hdmi_setmode(encoder, adjusted_mode);
+3 −0
Original line number Diff line number Diff line
@@ -1932,6 +1932,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
	smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets);
	WREG32(SMX_DC_CTL0, smx_dc_ctl0);

	if (rdev->family <= CHIP_SUMO2)
		WREG32(SMX_SAR_CTL0, 0x00010000);

	WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) |
					POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) |
					SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1)));
+0 −3
Original line number Diff line number Diff line
@@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
	struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
	uint32_t offset;

	if (ASIC_IS_DCE5(rdev))
		return;

	/* Silent, r600_hdmi_enable will raise WARN for us */
	if (!dig->afmt->enabled)
		return;
Loading