From patchwork Tue Oct 6 14:52:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Hoath X-Patchwork-Id: 7335441 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 6CD62BEEA4 for ; Tue, 6 Oct 2015 14:52:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97DA12064E for ; Tue, 6 Oct 2015 14:52:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A47D820738 for ; Tue, 6 Oct 2015 14:52:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB5846EB05; Tue, 6 Oct 2015 07:52:39 -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 7B1D26EB05 for ; Tue, 6 Oct 2015 07:52:37 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 06 Oct 2015 07:52:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,644,1437462000"; d="scan'208";a="658896894" Received: from nthoath-linux2.isw.intel.com ([10.102.226.45]) by orsmga003.jf.intel.com with ESMTP; 06 Oct 2015 07:52:33 -0700 From: Nick Hoath To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Oct 2015 15:52:04 +0100 Message-Id: <1444143124-16030-5-git-send-email-nicholas.hoath@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444143124-16030-1-git-send-email-nicholas.hoath@intel.com> References: <1444143124-16030-1-git-send-email-nicholas.hoath@intel.com> Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Only update ringbuf address when necessary 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=-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 We now only need to update the address of the ringbuf object in the hw context when it is pinned, and the hw context is first CPU mapped Issue: VIZ-4277 Cc: David Gordon Signed-off-by: Nick Hoath --- drivers/gpu/drm/i915/intel_lrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 55a4de56..92a0ece 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -368,7 +368,6 @@ static int execlists_update_context(struct drm_i915_gem_request *rq) WARN_ON(!i915_gem_obj_is_pinned(rb_obj)); reg_state[CTX_RING_TAIL+1] = rq->tail; - reg_state[CTX_RING_BUFFER_START+1] = i915_gem_obj_ggtt_offset(rb_obj); if (ppgtt && !USES_FULL_48BIT_PPGTT(ppgtt->base.dev)) { /* True 32b PPGTT with dynamic page allocation: update PDP @@ -1046,6 +1045,9 @@ static int intel_lr_context_do_pin( if (ret) goto unpin_rb_obj; + ctx->engine[ring->id].reg_state[CTX_RING_BUFFER_START+1] = + i915_gem_obj_ggtt_offset(ringbuf->obj); + ctx_obj->dirty = true; /* Invalidate GuC TLB. */