Skip to content

Commit

Permalink
Merge tag 'drm-intel-fixes-2013-09-26' of git://people.freedesktop.or…
Browse files Browse the repository at this point in the history
…g/~danvet/drm-intel into drm-fixes

Just a few fixes for regressions and other serious stuff.

Two fix state tracking mismatches, together with an additional patch that
I've submitted to stable (somehow forgotten to tag it) we should have them
fixed now (I hope).

* tag 'drm-intel-fixes-2013-09-26' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: Fix up usage of SHRINK_STOP
  drm/i915: preserve pipe A quirk in i9xx_set_pipeconf
  drm/i915/tv: clear adjusted_mode.flags
  drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
  drm/i915: Use a temporary va_list for two-pass string handling
  • Loading branch information
Dave Airlie committed Sep 27, 2013
2 parents 4a10c2a + d322704 commit 36dec40
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4800,10 +4800,10 @@ i915_gem_inactive_count(struct shrinker *shrinker, struct shrink_control *sc)

if (!mutex_trylock(&dev->struct_mutex)) {
if (!mutex_is_locked_by(&dev->struct_mutex, current))
return SHRINK_STOP;
return 0;

if (dev_priv->mm.shrinker_no_lock_stealing)
return SHRINK_STOP;
return 0;

unlock = false;
}
Expand Down Expand Up @@ -4901,10 +4901,10 @@ i915_gem_inactive_scan(struct shrinker *shrinker, struct shrink_control *sc)

if (!mutex_trylock(&dev->struct_mutex)) {
if (!mutex_is_locked_by(&dev->struct_mutex, current))
return 0;
return SHRINK_STOP;

if (dev_priv->mm.shrinker_no_lock_stealing)
return 0;
return SHRINK_STOP;

unlock = false;
}
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/i915_gpu_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ static void i915_error_vprintf(struct drm_i915_error_state_buf *e,

/* Seek the first printf which is hits start position */
if (e->pos < e->start) {
len = vsnprintf(NULL, 0, f, args);
if (!__i915_error_seek(e, len))
va_list tmp;

va_copy(tmp, args);
if (!__i915_error_seek(e, vsnprintf(NULL, 0, f, tmp)))
return;
}

Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -4775,6 +4775,10 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc)

pipeconf = 0;

if (dev_priv->quirks & QUIRK_PIPEA_FORCE &&
I915_READ(PIPECONF(intel_crtc->pipe)) & PIPECONF_ENABLE)
pipeconf |= PIPECONF_ENABLE;

if (intel_crtc->pipe == 0 && INTEL_INFO(dev)->gen < 4) {
/* Enable pixel doubling when the dot clock is > 90% of the (display)
* core speed.
Expand Down
13 changes: 12 additions & 1 deletion drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
DRM_DEBUG_KMS("aux_ch native nack\n");
return -EREMOTEIO;
case AUX_NATIVE_REPLY_DEFER:
udelay(100);
/*
* For now, just give more slack to branch devices. We
* could check the DPCD for I2C bit rate capabilities,
* and if available, adjust the interval. We could also
* be more careful with DP-to-Legacy adapters where a
* long legacy cable may force very low I2C bit rates.
*/
if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
DP_DWN_STRM_PORT_PRESENT)
usleep_range(500, 600);
else
usleep_range(300, 400);
continue;
default:
DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/i915/intel_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,14 @@ intel_tv_compute_config(struct intel_encoder *encoder,
DRM_DEBUG_KMS("forcing bpc to 8 for TV\n");
pipe_config->pipe_bpp = 8*3;

/* TV has it's own notion of sync and other mode flags, so clear them. */
pipe_config->adjusted_mode.flags = 0;

/*
* FIXME: We don't check whether the input mode is actually what we want
* or whether userspace is doing something stupid.
*/

return true;
}

Expand Down

0 comments on commit 36dec40

Please sign in to comment.