summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-07-26 10:40:31 +1000
committerDave Airlie <airlied@redhat.com>2012-07-26 10:40:31 +1000
commit98c7b42375011ec37251e6fc85a0471cfe499eea (patch)
treea3b61011d6861704470a821d5136d1479d7ee2a2 /drivers/gpu/drm/i915/i915_gem.c
parent2536f7dc42556f63ee45b14e7d2d9696200f317a (diff)
parente8aeaee7b012f1cdb382765d17307445385aa87c (diff)
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-next
Daniel writes: (this pull is the one with the bad patch dropped) First pile of fixes for 3.6 already, and I'm afraid it's a bit larger than what I'd wish for. But I've moved all the feature-y stuff to -next, so this really is all -fixes. Most of it is handling fallout from the hw context stuff, discovered now that mesa git has started using them for real. Otherwise all just small fixes: - unbreak modeset=0 on gen6+ (regressed in next) - const mismatch fix for ->mode_fixup - simplify overly clever lvds modeset code (current code can totally confuse backlights, resulting in broken panels until a full power draw restores them). - fix some fallout from the flushing_list disabling (regression only introduced in -next) - DP link train improvements (this also kills the last 3.2 dp regression afaik) - bugfix for the new ddc VGA detection on newer platforms - minor backlight fixes (one of them a -next regression) - only enable the required PM interrupts (to avoid waking up the cpu unnecessarily) - some really minor bits (workaround clarification, make coverty happy, hsw init fix) * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: (23 commits) drm/i915: unbreak lastclose for failed driver init drm/i915: Set the context before setting up regs for the context. drm/i915: constify mode in crtc_mode_fixup drm/i915/lvds: ditch ->prepare special case drm/i915: dereferencing an error pointer drm/i915: fix invalid reference handling of the default ctx obj drm/i915: Add -EIO to the list of known errors for __wait_seqno drm/i915: Flush the context object from the CPU caches upon switching drm/i915: Make the lock for pageflips interruptible drm/i915: don't forget the PCH backlight registers drm/i915: Insert a flush between batches if the breadcrumb was dropped drm/i915: missing error case in init status page drm/i915: mask tiled bit when updating ILK sprites drm/i915: try to train DP even harder drm/i915: kill intel_ddc_probe drm/i915: check whether we actually received an edid in detect_ddc drm/i915: fix up PCH backlight #define mixup drm/i915: Add comments to explain the BSD tail write workaround drm/i915: Disable the BLT on pre-production SNB hardware drm/i915: initialize power wells in modeset_init_hw ...
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0fdb3d29cbbb..5c4657a54f97 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2003,6 +2003,7 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
}
switch (end) {
+ case -EIO:
case -EAGAIN: /* Wedged */
case -ERESTARTSYS: /* Signal */
return (int)end;
@@ -3726,6 +3727,22 @@ void i915_gem_init_ppgtt(struct drm_device *dev)
}
}
+static bool
+intel_enable_blt(struct drm_device *dev)
+{
+ if (!HAS_BLT(dev))
+ return false;
+
+ /* The blitter was dysfunctional on early prototypes */
+ if (IS_GEN6(dev) && dev->pdev->revision < 8) {
+ DRM_INFO("BLT not supported on this pre-production hardware;"
+ " graphics performance will be degraded.\n");
+ return false;
+ }
+
+ return true;
+}
+
int
i915_gem_init_hw(struct drm_device *dev)
{
@@ -3749,7 +3766,7 @@ i915_gem_init_hw(struct drm_device *dev)
goto cleanup_render_ring;
}
- if (HAS_BLT(dev)) {
+ if (intel_enable_blt(dev)) {
ret = intel_init_blt_ring_buffer(dev);
if (ret)
goto cleanup_bsd_ring;