From patchwork Wed Apr 2 00:43:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 3926131 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17C1EBF540 for ; Wed, 2 Apr 2014 00:43:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 504DE2021F for ; Wed, 2 Apr 2014 00:43:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 672522018A for ; Wed, 2 Apr 2014 00:43:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 886976E8CF; Tue, 1 Apr 2014 17:43:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 252AE6E8CF for ; Tue, 1 Apr 2014 17:43:08 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 01 Apr 2014 17:43:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,776,1389772800"; d="scan'208";a="504731719" Received: from unknown (HELO ironside.amr.corp.intel.com) ([10.255.12.45]) by fmsmga001.fm.intel.com with ESMTP; 01 Apr 2014 17:43:07 -0700 From: Ben Widawsky To: Intel GFX Date: Tue, 1 Apr 2014 17:43:06 -0700 Message-Id: <1396399386-3825-1-git-send-email-benjamin.widawsky@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396399052-20612-2-git-send-email-benjamin.widawsky@intel.com> References: <1396399052-20612-2-git-send-email-benjamin.widawsky@intel.com> Subject: [Intel-gfx] [PATCH 2/3] [v2] drm/i915/bdw: Render ring PDP is restored with context X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 So let's not do it every time we switch. v2: v1 skipped the switch for all gens. We still need it pre-gen8. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 0e8fd1e..3b5b8ab 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -710,7 +710,8 @@ static int do_switch(struct intel_ring_buffer *ring, if (ret) goto unpin_out; - if (USES_FULL_PPGTT(ring->dev)) { + if (USES_FULL_PPGTT(ring->dev) && + (!IS_GEN8(ring->dev) || !to->is_initialized)) { ret = ppgtt->switch_mm(ppgtt, ring, false); /* The hardware context switch is emitted, but we haven't * actually changed the state - so it's probably safe to bail