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

Commit e819eb86 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: Include the connector name in the output_poll_execute() debug message
  drm/radeon/kms: fix bug in r600_gpu_is_lockup
  drm/radeon/kms: reorder display resume to avoid problems
  drm/radeon/kms/evergreen: reset the grbm blocks at resume and init
  drm/radeon/kms: fix evergreen asic reset
  Revert "drm: Don't try and disable an encoder that was never enabled"
  drm/radeon: Add early unregister of firmware fb's
  drm/radeon: use aperture size not vram size for overlap tests
  drm/radeon/kms/evergreen: flush hdp cache when flushing gart tlb
  drm/radeon/kms: disable the r600 cb offset checker for linear surfaces
  drm/radeon/kms: disable ss fixed ref divide
  drm/i915/bios: Reverse order of 100/120 Mhz SSC clocks
  agp/intel: Fix missed cached memory flags setting in i965_write_entry()
  drm/i915/sdvo: Only use the SDVO pin if it is in the valid range
  drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD
  drm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter
parents ca5f73a0 0f16830e
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -1192,12 +1192,19 @@ static void i9xx_chipset_flush(void)
		writel(1, intel_private.i9xx_flush_page);
		writel(1, intel_private.i9xx_flush_page);
}
}


static void i965_write_entry(dma_addr_t addr, unsigned int entry,
static void i965_write_entry(dma_addr_t addr,
			     unsigned int entry,
			     unsigned int flags)
			     unsigned int flags)
{
{
	u32 pte_flags;

	pte_flags = I810_PTE_VALID;
	if (flags == AGP_USER_CACHED_MEMORY)
		pte_flags |= I830_PTE_SYSTEM_CACHED;

	/* Shift high bits down */
	/* Shift high bits down */
	addr |= (addr >> 28) & 0xf0;
	addr |= (addr >> 28) & 0xf0;
	writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
	writel(addr | pte_flags, intel_private.gtt + entry);
}
}


static bool gen6_check_flags(unsigned int flags)
static bool gen6_check_flags(unsigned int flags)
+5 −2
Original line number Original line Diff line number Diff line
@@ -241,7 +241,7 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
	}
	}


	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
		if (encoder->crtc && !drm_helper_encoder_in_use(encoder)) {
		if (!drm_helper_encoder_in_use(encoder)) {
			drm_encoder_disable(encoder);
			drm_encoder_disable(encoder);
			/* disconnector encoder from any connector */
			/* disconnector encoder from any connector */
			encoder->crtc = NULL;
			encoder->crtc = NULL;
@@ -874,7 +874,10 @@ static void output_poll_execute(struct work_struct *work)
			continue;
			continue;


		connector->status = connector->funcs->detect(connector, false);
		connector->status = connector->funcs->detect(connector, false);
		DRM_DEBUG_KMS("connector status updated to %d\n", connector->status);
		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
			      connector->base.id,
			      drm_get_connector_name(connector),
			      old_status, connector->status);
		if (old_status != connector->status)
		if (old_status != connector->status)
			changed = true;
			changed = true;
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -270,7 +270,7 @@ parse_general_features(struct drm_i915_private *dev_priv,
					general->ssc_freq ? 66 : 48;
					general->ssc_freq ? 66 : 48;
			else if (IS_GEN5(dev) || IS_GEN6(dev))
			else if (IS_GEN5(dev) || IS_GEN6(dev))
				dev_priv->lvds_ssc_freq =
				dev_priv->lvds_ssc_freq =
					general->ssc_freq ? 100 : 120;
					general->ssc_freq ? 120 : 100;
			else
			else
				dev_priv->lvds_ssc_freq =
				dev_priv->lvds_ssc_freq =
					general->ssc_freq ? 100 : 96;
					general->ssc_freq ? 100 : 96;
+30 −7
Original line number Original line Diff line number Diff line
@@ -479,6 +479,7 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
	uint16_t address = algo_data->address;
	uint16_t address = algo_data->address;
	uint8_t msg[5];
	uint8_t msg[5];
	uint8_t reply[2];
	uint8_t reply[2];
	unsigned retry;
	int msg_bytes;
	int msg_bytes;
	int reply_bytes;
	int reply_bytes;
	int ret;
	int ret;
@@ -513,7 +514,7 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
		break;
		break;
	}
	}


	for (;;) {
	for (retry = 0; retry < 5; retry++) {
		ret = intel_dp_aux_ch(intel_dp,
		ret = intel_dp_aux_ch(intel_dp,
				      msg, msg_bytes,
				      msg, msg_bytes,
				      reply, reply_bytes);
				      reply, reply_bytes);
@@ -521,6 +522,25 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
			DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
			DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
			return ret;
			return ret;
		}
		}

		switch (reply[0] & AUX_NATIVE_REPLY_MASK) {
		case AUX_NATIVE_REPLY_ACK:
			/* I2C-over-AUX Reply field is only valid
			 * when paired with AUX ACK.
			 */
			break;
		case AUX_NATIVE_REPLY_NACK:
			DRM_DEBUG_KMS("aux_ch native nack\n");
			return -EREMOTEIO;
		case AUX_NATIVE_REPLY_DEFER:
			udelay(100);
			continue;
		default:
			DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
				  reply[0]);
			return -EREMOTEIO;
		}

		switch (reply[0] & AUX_I2C_REPLY_MASK) {
		switch (reply[0] & AUX_I2C_REPLY_MASK) {
		case AUX_I2C_REPLY_ACK:
		case AUX_I2C_REPLY_ACK:
			if (mode == MODE_I2C_READ) {
			if (mode == MODE_I2C_READ) {
@@ -528,17 +548,20 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
			}
			}
			return reply_bytes - 1;
			return reply_bytes - 1;
		case AUX_I2C_REPLY_NACK:
		case AUX_I2C_REPLY_NACK:
			DRM_DEBUG_KMS("aux_ch nack\n");
			DRM_DEBUG_KMS("aux_i2c nack\n");
			return -EREMOTEIO;
			return -EREMOTEIO;
		case AUX_I2C_REPLY_DEFER:
		case AUX_I2C_REPLY_DEFER:
			DRM_DEBUG_KMS("aux_ch defer\n");
			DRM_DEBUG_KMS("aux_i2c defer\n");
			udelay(100);
			udelay(100);
			break;
			break;
		default:
		default:
			DRM_ERROR("aux_ch invalid reply 0x%02x\n", reply[0]);
			DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]);
			return -EREMOTEIO;
			return -EREMOTEIO;
		}
		}
	}
	}

	DRM_ERROR("too many retries, giving up\n");
	return -EREMOTEIO;
}
}


static int
static int
+8 −11
Original line number Original line Diff line number Diff line
@@ -696,20 +696,17 @@ int intel_wait_ring_buffer(struct drm_device *dev,
	drm_i915_private_t *dev_priv = dev->dev_private;
	drm_i915_private_t *dev_priv = dev->dev_private;
	u32 head;
	u32 head;


	head = intel_read_status_page(ring, 4);
	if (head) {
		ring->head = head & HEAD_ADDR;
		ring->space = ring->head - (ring->tail + 8);
		if (ring->space < 0)
			ring->space += ring->size;
		if (ring->space >= n)
			return 0;
	}

	trace_i915_ring_wait_begin (dev);
	trace_i915_ring_wait_begin (dev);
	end = jiffies + 3 * HZ;
	end = jiffies + 3 * HZ;
	do {
	do {
		ring->head = I915_READ_HEAD(ring) & HEAD_ADDR;
		/* If the reported head position has wrapped or hasn't advanced,
		 * fallback to the slow and accurate path.
		 */
		head = intel_read_status_page(ring, 4);
		if (head < ring->actual_head)
			head = I915_READ_HEAD(ring);
		ring->actual_head = head;
		ring->head = head & HEAD_ADDR;
		ring->space = ring->head - (ring->tail + 8);
		ring->space = ring->head - (ring->tail + 8);
		if (ring->space < 0)
		if (ring->space < 0)
			ring->space += ring->size;
			ring->space += ring->size;
Loading