From patchwork Tue Oct 20 09:23:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Hoath X-Patchwork-Id: 7445271 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 442F9BEEA4 for ; Tue, 20 Oct 2015 09:28:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CD832084E for ; Tue, 20 Oct 2015 09:28:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B2C042084A for ; Tue, 20 Oct 2015 09:28:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1DB9B7217A; Tue, 20 Oct 2015 02:28:12 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 31F546E78C for ; Tue, 20 Oct 2015 02:28:05 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 20 Oct 2015 02:28:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,706,1437462000"; d="scan'208";a="815078839" Received: from nthoath-linux2.isw.intel.com ([10.102.226.45]) by fmsmga001.fm.intel.com with ESMTP; 20 Oct 2015 02:24:10 -0700 From: Nick Hoath To: intel-gfx@lists.freedesktop.org Date: Tue, 20 Oct 2015 10:23:56 +0100 Message-Id: <1445333036-22164-7-git-send-email-nicholas.hoath@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445333036-22164-1-git-send-email-nicholas.hoath@intel.com> References: <1445333036-22164-1-git-send-email-nicholas.hoath@intel.com> Subject: [Intel-gfx] [PATCH 6/6] 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, 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 Signed-off-by: Nick Hoath Cc: David Gordon --- 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 a35efcd..2e529a4 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 @@ -1027,6 +1026,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. */