From patchwork Mon Oct 20 13:53:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Daniel X-Patchwork-Id: 5149851 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 0EBFFC11AC for ; Fri, 24 Oct 2014 21:28:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 32E1020268 for ; Fri, 24 Oct 2014 21:28:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6E2C0201C7 for ; Fri, 24 Oct 2014 21:28:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3968D6EA6D; Fri, 24 Oct 2014 14:24:37 -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 C18566E0A1 for ; Mon, 20 Oct 2014 06:53:51 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 20 Oct 2014 06:53:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,756,1406617200"; d="scan'208";a="617229552" Received: from thomasda-linux2.isw.intel.com ([10.102.226.52]) by fmsmga002.fm.intel.com with ESMTP; 20 Oct 2014 06:53:49 -0700 From: Thomas Daniel To: intel-gfx@lists.freedesktop.org Date: Mon, 20 Oct 2014 14:53:47 +0100 Message-Id: <1413813227-9305-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] 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 Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- 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) {