From patchwork Tue Oct 25 16:40:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9395063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A54E960762 for ; Tue, 25 Oct 2016 16:40:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95BCE28E41 for ; Tue, 25 Oct 2016 16:40:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A71229219; Tue, 25 Oct 2016 16:40:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 93F4029278 for ; Tue, 25 Oct 2016 16:40:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D15C6E19E; Tue, 25 Oct 2016 16:40:48 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C38C66E19E for ; Tue, 25 Oct 2016 16:40:46 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id m83so1584774wmc.6 for ; Tue, 25 Oct 2016 09:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wmRZJlZMuyG128utIAlYe+O65mFGfShwlJRwzPVMNE0=; b=hCO5f/cT2mfQs7CX5Kjg4MDiQ2og2b7DHaTGtiMlSCApMcqzJ/G867d+yFrvtKGfbJ HsMAA66AA+nmTqljAdKjLtOEj5Lxd1oyBdUKQ8jfHnD0jRbL822HWtRZ5pM7fNyr45po wX9SKVCn1drr+DoL99CEaWXzx4n1I+PXcHopvlMM6QFiXB9cC7f2OoPO9RgFBFndk6BY 1GdJOCOp13gdqBBXBTtPVumupNLVN+0nr+Zp1xBRHo9WdbQ7WIzYnyYsR3mZRq68izdn 5lYIkGmsAqhI+NS0bwgKMytdi6rjPd6tVseCHQvPzbaTM0xb16g7Z6ZOfX1bcg7pRY3E I+Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wmRZJlZMuyG128utIAlYe+O65mFGfShwlJRwzPVMNE0=; b=WgxZTHyUg+cKXevSr7r/pUmIEVGsLdCouBVbUmCh8ZJ9roqfPg4akDwQZN5AZkTVbF nrKyNRSUQt8AOc7w962D5O+RtSRyz40NVUplIZlBm9KQmUCc3xoE1weZ0wuGFIIgtPdA l37tjpxQk4QFJtPpE3dV6X9C6Jzfvfpap1I+SOVoTeU5pqWpqXIxcpzT4cCYPSNJiYka Ub4rdA24vhF7Om5em6NsXjgAqU3ulE0k4s4zIoy7imNvn2uezraDXAIkHk52kTUB2yIW AktJMFSu4+/D6dGqEy9W2we7oZMCNUMBWcmPRl9Ky6hLe44wPynhpTb5JsxgGs4Y9TyO E9YQ== X-Gm-Message-State: ABUngveaZVTOlzgdYl4/A84FfOIbRDz/l5QMwXLYJHoYYomLtDk4w/RQeb8wTeLuO57GJg== X-Received: by 10.194.136.37 with SMTP id px5mr17161919wjb.110.1477413645340; Tue, 25 Oct 2016 09:40:45 -0700 (PDT) Received: from e31.Home ([2a02:c7d:9bd6:b000:3aa4:b23f:bb90:84b]) by smtp.gmail.com with ESMTPSA id g17sm25950746wjs.38.2016.10.25.09.40.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 09:40:44 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Tue, 25 Oct 2016 17:40:35 +0100 Message-Id: <1477413635-3876-1-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20161025140750.GC21423@nuc-i3427.alporthouse.com> References: <20161025140750.GC21423@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH v2 1/2] drm/i915: Rotated view does not need a fence X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin We do not need to set up a fence for the rotated view. Display does not need it and no one can access it. v2: Move code to __i915_vma_set_map_and_fenceable. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to the VMA") Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9361c7b54a7f..eb524bdf0c35 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3790,7 +3790,12 @@ void __i915_vma_set_map_and_fenceable(struct i915_vma *vma) mappable = (vma->node.start + fence_size <= dev_priv->ggtt.mappable_end); - if (mappable && fenceable) + /* + * Explicitly disable for rotated VMA since the display does not + * need the fence and the VMA is not accessible to other users. + */ + if (mappable && fenceable && + vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED) vma->flags |= I915_VMA_CAN_FENCE; else vma->flags &= ~I915_VMA_CAN_FENCE;