From patchwork Tue Sep 8 16:20:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 7142411 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 93BE5BEEC1 for ; Tue, 8 Sep 2015 16:20:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0081207DF for ; Tue, 8 Sep 2015 16:20:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 94A03207D1 for ; Tue, 8 Sep 2015 16:20:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D6FF72144; Tue, 8 Sep 2015 09:20:32 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 86D0772144 for ; Tue, 8 Sep 2015 09:20:31 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 08 Sep 2015 09:20:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,490,1437462000"; d="scan'208";a="557659642" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.50]) by FMSMGA003.fm.intel.com with ESMTP; 08 Sep 2015 09:20:29 -0700 Received: by rosetta (Postfix, from userid 1000) id 9D00F80088; Tue, 8 Sep 2015 19:20:28 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Tue, 8 Sep 2015 19:20:23 +0300 Message-Id: <1441729223-28269-1-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 2.1.4 Subject: [Intel-gfx] [PATCH 1/1] drm/i915/gtt: Mark newly created ppgtt dirty 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 mark ppgtt dirty when vm area grows. As one needs to allocate atleast one batchbuffer object before running anything in vm space, this was considered adequate. However in init, we run batch which doesn't need to allocate anything. This is the render state initialization batch, part of context init. Newly created ppgtt is not marked dirty as no allocations for it are done. This results bb emission skip the pdps writing to hw, and we start the batch with uninitialized (zero) pdp registers causing gpu hangs early in the init. Always mark newly created ppgtts dirty to ensure that pdps are pushed before first bb. Cc: Michel Thierry Cc: Arun Siluvery Cc: Chris Wilson Cc: Imre Deak Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 8786281..41dcfca 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -2134,6 +2134,8 @@ int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt) i915_init_vm(dev_priv, &ppgtt->base); } + mark_tlbs_dirty(ppgtt); + return ret; }