drm/i915: BUG() if fences are used on unsupported platform

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Ben Widawsky 2012-12-18 10:31:22 -08:00 committed by Daniel Vetter
parent 4d7bb01162
commit 7dbf9d6e0f
2 changed files with 3 additions and 1 deletions

View File

@ -2649,7 +2649,7 @@ static void i915_gem_write_fence(struct drm_device *dev, int reg,
case 4: i965_write_fence_reg(dev, reg, obj); break; case 4: i965_write_fence_reg(dev, reg, obj); break;
case 3: i915_write_fence_reg(dev, reg, obj); break; case 3: i915_write_fence_reg(dev, reg, obj); break;
case 2: i830_write_fence_reg(dev, reg, obj); break; case 2: i830_write_fence_reg(dev, reg, obj); break;
default: break; default: BUG();
} }
} }

View File

@ -1106,6 +1106,8 @@ static void i915_gem_record_fences(struct drm_device *dev,
error->fence[i] = I915_READ(FENCE_REG_830_0 + (i * 4)); error->fence[i] = I915_READ(FENCE_REG_830_0 + (i * 4));
break; break;
default:
BUG();
} }
} }