From patchwork Tue Apr 19 11:40:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 8878981 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 B5CCCBF29F for ; Tue, 19 Apr 2016 11:41:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A586B20145 for ; Tue, 19 Apr 2016 11:41:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5C6B32026F for ; Tue, 19 Apr 2016 11:41:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 261F56E743; Tue, 19 Apr 2016 11:41:07 +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 0B4026E741 for ; Tue, 19 Apr 2016 11:41:06 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id e201so2242939wme.2 for ; Tue, 19 Apr 2016 04:41:05 -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=dJcykBNFAmrFd970YR0fr9oAC/DRxifT9hirVU09eB8=; b=qjRrU7J9wWuxu3biApam9Q8PNN15FmlFUcFCUR7j7fMkXUDSWAOz0mwUm7oxI9MZwk fqb4MySRqbLLFqR+GPl/4Gj8nkXatlZQ/JyPY44eEau35bWIXb5rHdFWh1vArypq/bwu eowFlC6xBJ9JBQ47s2r386CSRaoNUZOalQVl+ytlt+ancGefj1VtxGzTrG0RXQNp7wgN HNT0etpeuVviqrHltWF+zA+mY9VoCMGCMwIDgF6uXREK7nKw8YKZ13/NUeSX4AIalDFI xSr3YVf54b6cEPz+tSdn7FcUqwq1qOAggNKpwj3ou71uNZif58TlVB6sBKnrudg4ZggX hDEg== 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=dJcykBNFAmrFd970YR0fr9oAC/DRxifT9hirVU09eB8=; b=ArEd9BoSTzAt3h4v+uVIHoWtLEy0WoMsKe5sfZJPfhIa/YQMS3SvOpYk5Vp0a5xgNA e6UkeYyBWfN89KUIqWyFAKFoq8l2nnyJ91bXsgP2bqie8exKpzuMGAgGkLI2xVlc27gi sTG/ptXPrlGyf4rvgP9x48BSEcxl2MX7gozh3jXzfPcspN8EX6k258Wh1ggh6t/dbJsg x/oa9M1d8oAQBty6wtc3J27h9LM5cl4PkIbzoRDYsImMGSmpjHzjFCBeCSbWPgaUYLLp ayzsWCF4OQm09CV+EVRKlXRKOJPy1gnad8wbplqd1nXN/7tqj/XV2NAeRW4N7Cb0WbJA 61Pg== X-Gm-Message-State: AOPr4FVrEc0LZeAWv6HIcJT16S16ESsf7EIA2icbMLgS1KA1UOZwHKy+Dca1g8eAO4pFIQ== X-Received: by 10.194.71.226 with SMTP id y2mr2696379wju.127.1461066064428; Tue, 19 Apr 2016 04:41:04 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id ys9sm68886569wjc.35.2016.04.19.04.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Apr 2016 04:41:03 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Apr 2016 12:40:45 +0100 Message-Id: <1461066053-30072-5-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1461066053-30072-1-git-send-email-chris@chris-wilson.co.uk> References: <1461066053-30072-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH v2 04/12] 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 595037bec2de..7b347c20880d 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3145,7 +3145,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 ec928c8701c3..4874d265d528 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4834,7 +4834,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; @@ -4916,14 +4916,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 bde757f790d5..e44bf9ad8d96 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -610,7 +610,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; @@ -808,7 +808,7 @@ static int do_rcs_switch(struct drm_i915_gem_request *req) if (!(to->remap_slice & (1<