From patchwork Thu Oct 30 15:30:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gordon X-Patchwork-Id: 5198411 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 EEBB39F349 for ; Thu, 30 Oct 2014 15:30:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29AF1201ED for ; Thu, 30 Oct 2014 15:30:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6102120165 for ; Thu, 30 Oct 2014 15:30:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF1686E4E1; Thu, 30 Oct 2014 08:30:44 -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 A713D6E4E1 for ; Thu, 30 Oct 2014 08:30:43 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 30 Oct 2014 08:30:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,286,1413270000"; d="scan'208";a="614163964" Received: from dsgordon-linux.isw.intel.com ([10.102.226.64]) by fmsmga001.fm.intel.com with ESMTP; 30 Oct 2014 08:30:32 -0700 From: Dave Gordon To: intel-gfx@lists.freedesktop.org Date: Thu, 30 Oct 2014 15:30:03 +0000 Message-Id: <1414683003-17211-1-git-send-email-david.s.gordon@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Intel-gfx] [PATCH] drm/i915: Fix execlist cleanup bug 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.8 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 From: John Harrison Check whether each engine exists before trying to clean up the corresponding logical ring. Change-Id: I31b1ed941824db2d6bd7233360dbce05671979a8 Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/intel_lrc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index cd74e5c..7a7d30a 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1444,13 +1444,17 @@ int intel_logical_rings_init(struct drm_device *dev) return 0; cleanup_bsd2_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); + if (HAS_BSD2(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); cleanup_vebox_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VECS]); + if (HAS_VEBOX(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VECS]); cleanup_blt_ring: - intel_logical_ring_cleanup(&dev_priv->ring[BCS]); + if (HAS_BLT(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[BCS]); cleanup_bsd_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VCS]); + if (HAS_BSD(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VCS]); cleanup_render_ring: intel_logical_ring_cleanup(&dev_priv->ring[RCS]);