diff mbox

drm/i915: let pin routine figure out appropriate alignment

Message ID 20091118095842.08266eff@jbarnes-piketon (mailing list archive)
State Rejected
Headers show

Commit Message

Jesse Barnes Nov. 18, 2009, 5:58 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c7d5611..b4c6b40 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1193,27 +1193,9 @@  static int
 intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_gem_object *obj)
 {
 	struct drm_i915_gem_object *obj_priv = obj->driver_private;
-	u32 alignment;
 	int ret;
 
-	switch (obj_priv->tiling_mode) {
-	case I915_TILING_NONE:
-		alignment = 64 * 1024;
-		break;
-	case I915_TILING_X:
-		/* pin() will align the object as required by fence */
-		alignment = 0;
-		break;
-	case I915_TILING_Y:
-		/* FIXME: Is this true? */
-		DRM_ERROR("Y tiled not allowed for scan out buffers\n");
-		return -EINVAL;
-	default:
-		BUG();
-	}
-
-	alignment = 256 * 1024;
-	ret = i915_gem_object_pin(obj, alignment);
+	ret = i915_gem_object_pin(obj, 0);
 	if (ret != 0)
 		return ret;