From patchwork Thu Oct 23 15:24:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Daniel X-Patchwork-Id: 5141381 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0261E9F349 for ; Thu, 23 Oct 2014 15:26:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 309C62017E for ; Thu, 23 Oct 2014 15:26:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4D06820173 for ; Thu, 23 Oct 2014 15:26:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 914136E49C; Thu, 23 Oct 2014 08:26:02 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 975BD6E49C for ; Thu, 23 Oct 2014 08:26:01 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 23 Oct 2014 08:24:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,775,1406617200"; d="scan'208";a="610027133" Received: from thomasda-linux2.isw.intel.com ([10.102.226.52]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2014 08:24:47 -0700 From: Thomas Daniel To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Oct 2014 16:24:46 +0100 Message-Id: <1414077886-19017-1-git-send-email-thomas.daniel@intel.com> X-Mailer: git-send-email 1.7.9.5 Cc: shuang.he@linux.intel.com Subject: [Intel-gfx] [PATCH 2/2] drm/i915/bdw: Setup global hardware status page in execlists mode 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=-5.6 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 Write HWS_PGA address even in execlists mode as the global hardware status page is still required. This address was previously uninitialized and HWSP writes would clobber whatever buffer happened to reside at GGTT address 0. Issue: VIZ-2020 Signed-off-by: Thomas Daniel --- drivers/gpu/drm/i915/intel_lrc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 666cb28..ad36d66 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1678,6 +1678,7 @@ int intel_lr_context_deferred_create(struct intel_context *ctx, uint32_t context_size; struct intel_ringbuffer *ringbuf; int ret; + struct drm_i915_private *dev_priv = dev->dev_private; WARN_ON(ctx->legacy_hw_ctx.rcs_state != NULL); if (ctx->engine[ring->id].state) @@ -1750,6 +1751,10 @@ int intel_lr_context_deferred_create(struct intel_context *ctx, if (ring->status_page.page_addr == NULL) return -ENOMEM; ring->status_page.obj = ctx_obj; + + I915_WRITE(RING_HWS_PGA(ring->mmio_base), + (u32)ring->status_page.gfx_addr); + POSTING_READ(RING_HWS_PGA(ring->mmio_base)); } if (ring->id == RCS && !ctx->rcs_initialized) {