From patchwork Wed Nov 18 17:58:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 61108 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAIHwmDP003277 for ; Wed, 18 Nov 2009 17:58:48 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E80A9F36D; Wed, 18 Nov 2009 09:58:47 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from outbound-mail-309.bluehost.com (outbound-mail-309.bluehost.com [67.222.54.2]) by gabe.freedesktop.org (Postfix) with SMTP id 26B889E956 for ; Wed, 18 Nov 2009 09:58:45 -0800 (PST) Received: (qmail 31153 invoked by uid 0); 18 Nov 2009 17:58:44 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by outboundproxy6.bluehost.com with SMTP; 18 Nov 2009 17:58:44 -0000 Received: from [75.111.28.251] (helo=jbarnes-piketon) by box514.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1NAonk-0004Q4-6Q; Wed, 18 Nov 2009 10:58:44 -0700 Date: Wed, 18 Nov 2009 09:58:42 -0800 From: Jesse Barnes To: Kristian =?UTF-8?B?SMO4Z3NiZXJn?= Message-ID: <20091118095842.08266eff@jbarnes-piketon> In-Reply-To: <1258561518-2275-1-git-send-email-krh@bitplanet.net> References: <1258561518-2275-1-git-send-email-krh@bitplanet.net> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.28.251 authed with jbarnes@virtuousgeek.org} Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.sf.net Subject: [Intel-gfx] [PATCH] drm/i915: let pin routine figure out appropriate alignment X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org 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;