From patchwork Sun Apr 24 07:18:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 8919701 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1F169BF29F for ; Sun, 24 Apr 2016 07:19:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 34669201FA for ; Sun, 24 Apr 2016 07:19:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4C2FA201ED for ; Sun, 24 Apr 2016 07:19:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9D0C6E112; Sun, 24 Apr 2016 07:19:23 +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 334596E0D4 for ; Sun, 24 Apr 2016 07:19:21 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id r12so14232121wme.0 for ; Sun, 24 Apr 2016 00:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=LIkyZu/MP3X3217vag7mudu4vLY/AUIoLhZX4TITk5M=; b=0ppns4F3hTfrqSdaa7i9gv23BOOxvVKggOCRqhLZhhMANZQ6z1Lj6wcOvQtaIJslOo BaOxL2OEeB1fTC8yUcABMKIOdMiCaxb0SvoFm9vOGuU73PHz/C+uCYHXRshEgTCJ5vKg r/4Iz/Qb/lb7T6R71Q8BRsbhEpWvhwuBY08BESOFXDG3kL5R/GIcfLla0wj/Drks98lS I84d2hJtmdBvOh2ExCXB1DJXoIJrxmju2FsO3sqsZiktyinHuViBhIeJv4D6WiZUzupk wUHflmPYmHM6HTEYEjJhFvRlmhZIsbBV77Ml3Ueil5bZSZvIbrnDlYTSe2y1L9h4Ts/E M1Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=LIkyZu/MP3X3217vag7mudu4vLY/AUIoLhZX4TITk5M=; b=b/t9XdIHfIMQkw1b1CgdPEjXzX7XuBxQXhk3RB2gE5jmxaj+AN9HnLuspEAeBv37Qr KmR9ccvjAuSgzzcI2EhKEaQMS08oo74sU5HsyfAZSJWoVITjuLcakQ7PUAm4W7iasPI2 pYqzvhnttmoRcm6iWkaIwff4XNK20pkvKCMoSugdkfmpmoAUuYzVdOXI+ZBXkiDiC/TJ Wl8cYKtZUXJF5+LfE5LdJBXxOCNCXJelhtg6zVkv0IIrCrrrAOwRnCsGqsLbZTvXNE+L Jp4dSvIjFkgCGm+u7pMIIHz7k1wkm0T+xE8TRsBr85JnjLaW+nFDoFPHHsYCLBUHVELa fiNw== X-Gm-Message-State: AOPr4FXqMSEbvbfvlocfIYFQP4DOjCKZrcZgS/FkXbt1XPusaYNsP6x6BheTXZ5VrMov6Q== X-Received: by 10.28.97.213 with SMTP id v204mr5936589wmb.50.1461482359700; Sun, 24 Apr 2016 00:19:19 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id i11sm16937119wjn.36.2016.04.24.00.19.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 00:19:18 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Sun, 24 Apr 2016 08:18:41 +0100 Message-Id: <1461482332-21975-10-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461482332-21975-1-git-send-email-chris@chris-wilson.co.uk> References: <1461482332-21975-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 10/21] drm/i915: Remove early l3-remap 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-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Since we do the l3-remap on context switch, we can remove the redundant early call to set the mapping prior to performing the first context switch. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem.c | 10 +--------- drivers/gpu/drm/i915/i915_gem_context.c | 4 ++-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e35e190722fb..7dd79c9a8ce3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3147,7 +3147,6 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj, bool force); int __must_check i915_gem_init(struct drm_device *dev); int i915_gem_init_engines(struct drm_device *dev); int __must_check i915_gem_init_hw(struct drm_device *dev); -int i915_gem_l3_remap(struct drm_i915_gem_request *req, int slice); void i915_gem_init_swizzling(struct drm_device *dev); void i915_gem_cleanup_engines(struct drm_device *dev); int __must_check i915_gpu_idle(struct drm_device *dev); diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d3e226b714fa..aafcb4942acf 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4838,7 +4838,7 @@ i915_gem_init_hw(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine_cs *engine; - int ret, j; + int ret; if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) return -EIO; @@ -4920,14 +4920,6 @@ i915_gem_init_hw(struct drm_device *dev) break; } - if (engine->id == RCS) { - for (j = 0; j < NUM_L3_SLICES(dev); j++) { - ret = i915_gem_l3_remap(req, j); - if (ret) - goto err_request; - } - } - ret = i915_ppgtt_init_ring(req); if (ret) goto err_request; diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 1c63bea32211..e5b3d74f8222 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -601,7 +601,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) return ret; } -int i915_gem_l3_remap(struct drm_i915_gem_request *req, int slice) +static int remap_l3(struct drm_i915_gem_request *req, int slice) { u32 *remap_info = req->i915->l3_parity.remap_info[slice]; struct intel_engine_cs *engine = req->engine; @@ -799,7 +799,7 @@ static int do_rcs_switch(struct drm_i915_gem_request *req) if (!(to->remap_slice & (1<