From patchwork Sat Sep 19 01:57:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kasireddy, Vivek" X-Patchwork-Id: 7221541 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C88639F380 for ; Sat, 19 Sep 2015 02:01:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F140420690 for ; Sat, 19 Sep 2015 02:01:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2F20E2065D for ; Sat, 19 Sep 2015 02:01:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57A206E75F; Fri, 18 Sep 2015 19:01:12 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C08F6E75F for ; Fri, 18 Sep 2015 19:01:11 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 18 Sep 2015 19:01:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,555,1437462000"; d="scan'208";a="807929140" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga002.jf.intel.com with ESMTP; 18 Sep 2015 19:01:11 -0700 Received: from orsmsx155.amr.corp.intel.com (10.22.240.21) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 18 Sep 2015 19:01:10 -0700 Received: from vkasired-desk2.fm.intel.com (10.22.254.139) by ORSMSX155.amr.corp.intel.com (10.22.240.21) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 18 Sep 2015 19:01:09 -0700 From: Vivek Kasireddy To: Date: Fri, 18 Sep 2015 18:57:48 -0700 Message-ID: <1442627868-25290-1-git-send-email-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <55FA950E.4000306@linux.intel.com> References: <55FA950E.4000306@linux.intel.com> MIME-Version: 1.0 X-Originating-IP: [10.22.254.139] Cc: Vivek Kasireddy Subject: [Intel-gfx] [PATCH] drm/i915: Skip fence installation for objects with rotated views (v2) 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v2: Look at the object's map_and_fenceable flag to determine whether to install a fence or not (Chris). v1: While pinning a fb object to the display plane, only install a fence if the object is using a normal view. This corresponds with the behavior found in i915_gem_object_do_pin() where the fencability criteria is determined only for objects with normal views. Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 52fb3f2..108c000 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2357,7 +2357,8 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane, * framebuffer compression. For simplicity, we always install * a fence as the cost is not that onerous. */ - ret = i915_gem_object_get_fence(obj); + if (obj->map_and_fenceable) + ret = i915_gem_object_get_fence(obj); if (ret == -EDEADLK) { /* * -EDEADLK means there are no free fences