Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp782611ybe; Fri, 13 Sep 2019 06:19:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWO6jer9m8M75rB103jtmaYZL68pqYiyx+doePlp1LeD+HnQ51VKHxoDGa2M5WPvtx4POe X-Received: by 2002:a17:906:b2c7:: with SMTP id cf7mr2564750ejb.124.1568380752043; Fri, 13 Sep 2019 06:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568380752; cv=none; d=google.com; s=arc-20160816; b=xDcC7nid1fjgGm5FrCjJB8T9fsHjudVuekqSQ8lMbWmvTyYAzffmeeniuCxVOAAyX0 o6knVNLOxxNkDq4mhmvOmAVnRp8/3BJkY3tqDOn6vUZYsmr+wPL9sh5kuP8INrCNw4u7 0BpqL/H/0+kjaVCW6Gs2p9Hvk5TFH/Ay+lGdbyAzKKS0nDFEQ1jrmH8O46KgXOVHUd4l 4mE5/OWxwIGv4rRzgs+ePJn0VyYjnKINu38r7c+C6FN9HU8FG5SUtKJsVY55kW5ffpKT M7y0yubCw/VhTE9lgLlrPSlh1S50DWLSQVjRKnmKzEQCKTbh4a9xvZJO+/hZasJ+mpPB EAjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XwIgGEZco0swG9erf8pqt93G1lql60wihXYe97PJxy8=; b=FZ1CGasZpmPhE6gXtH/szDWBkAfZ/kxSOWC8TedAdEE5m7jwHg8yNw/AUoyXr1W7kQ gfINIr3IfCctv5HPgq4zXS87LNhHyxurxNN2nE+527RJp8LgLN+2axEFMvRkdmv8AlWW 9G/Gu38Pti9bp5816lGI0jfHXhf3RSqvcwutk3oebVkLVKIo60/cN0r0a9d17ZHNxwoa OcTwSdbYxx6vAfWjG87+vrr6gI9c9D6/IBnCuSwj4zf452koUY3Y11l6xebSJ7WKF8d/ xOkbB5zci7hMzP/kj5cUuo4qKh1iVUJAB8qacCaQTS879vetZOZIoBWOozDi4y5Wc4kw UEKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nHOl4zUA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e50si17126295edb.177.2019.09.13.06.18.48; Fri, 13 Sep 2019 06:19:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nHOl4zUA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389430AbfIMNN5 (ORCPT + 99 others); Fri, 13 Sep 2019 09:13:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:39724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389423AbfIMNNz (ORCPT ); Fri, 13 Sep 2019 09:13:55 -0400 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F974206BB; Fri, 13 Sep 2019 13:13:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380435; bh=VM9gZTOqYFhqgMLCQXm93qWHgPVp58xi3KhFJpgjjYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nHOl4zUAYFHe7RbMFz0jA403nK5PNdGsGNQlESXQWGyj9MsQkR9LuV8uSk+PRJZsk xoQV8vk2keos5Kf1cE9R39yqeGrwAVeKbus5YC7kMEPlhOoo+WfVPquqJl44ZcTs6Z RNrb4yNHaWckVw0q85JpxJWkdmBC+CZCOfh2bM8s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Wilson , Mika Kuoppala , Sasha Levin Subject: [PATCH 4.19 063/190] drm/i915: Cleanup gt powerstate from gem Date: Fri, 13 Sep 2019 14:05:18 +0100 Message-Id: <20190913130604.799129279@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913130559.669563815@linuxfoundation.org> References: <20190913130559.669563815@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 30b710840e4b9c9699d3d4b33fb19ad8880d4614 ] Since the gt powerstate is allocated by i915_gem_init, clean it from i915_gem_fini for symmetry and to correct the imbalance on error. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180812223642.24865-1-chris@chris-wilson.co.uk Signed-off-by: Sasha Levin --- drivers/gpu/drm/i915/i915_gem.c | 3 +++ drivers/gpu/drm/i915/intel_display.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 5019dfd8bcf16..e81abd468a15d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5624,6 +5624,7 @@ err_uc_misc: void i915_gem_fini(struct drm_i915_private *dev_priv) { i915_gem_suspend_late(dev_priv); + intel_disable_gt_powersave(dev_priv); /* Flush any outstanding unpin_work. */ i915_gem_drain_workqueue(dev_priv); @@ -5635,6 +5636,8 @@ void i915_gem_fini(struct drm_i915_private *dev_priv) i915_gem_contexts_fini(dev_priv); mutex_unlock(&dev_priv->drm.struct_mutex); + intel_cleanup_gt_powersave(dev_priv); + intel_uc_fini_misc(dev_priv); i915_gem_cleanup_userptr(dev_priv); diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2622dfc7d2d9a..6902fd2da19ca 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15972,8 +15972,6 @@ void intel_modeset_cleanup(struct drm_device *dev) flush_work(&dev_priv->atomic_helper.free_work); WARN_ON(!llist_empty(&dev_priv->atomic_helper.free_list)); - intel_disable_gt_powersave(dev_priv); - /* * Interrupts and polling as the first thing to avoid creating havoc. * Too much stuff here (turning of connectors, ...) would @@ -16001,8 +15999,6 @@ void intel_modeset_cleanup(struct drm_device *dev) intel_cleanup_overlay(dev_priv); - intel_cleanup_gt_powersave(dev_priv); - intel_teardown_gmbus(dev_priv); destroy_workqueue(dev_priv->modeset_wq); -- 2.20.1