Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2962339imu; Mon, 19 Nov 2018 08:40:57 -0800 (PST) X-Google-Smtp-Source: AJdET5fq/qEVYLcf4PkM+/LweR3WROQAFEChR8K0AXi/4oSfCsSGcdE/lM7fUOh62UaW+3m6x8CD X-Received: by 2002:a63:2d46:: with SMTP id t67mr21179181pgt.140.1542645657681; Mon, 19 Nov 2018 08:40:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645657; cv=none; d=google.com; s=arc-20160816; b=VveblYFGWErtlUoejFalWBp6aq/LYNKChzGe7PWTrUjUpV+E+Nw1Idt5MC+i2BkTDA fJzgGMcv97epv/m0RuC/ywwLFpmkI9a36kxPi2FLRWtM4/Y7ODhPVEp9yTRAVg+FruVM Kh1haDPULaFdFz4gDO1fe+urXYbBDejPnnjA4Nt5pe4FbkSJFbnu4CwrrUg64LL2Jols Mrhnb14Mf1+K5u6rYfGVDHJAeHQXeYGuVAUCb7MWR43MrWlCoIifm3DzL4D+Yrqz34HZ IwvJnrf4t3MmNMwfmwJ5MIWiqHK90gUW2S6zgw6KA7JfEiLTMuxAWdT02MYZ6t9TCvMJ E5hA== 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=mFEedc7KJjngcG8zUxQDyJIvk/PWxZPYdSxaxcOzBwY=; b=JXv0Pp4R0oQqxdmwbq1yu+ddGDI9kAm1xPZB3qKc3j7O0syd5xt1rnmhEMgNMRylht ABN0HDvFS2tlSex7W2fN+2lf341sPGqVRx5Hw5cT06Y2/r/h/X6QM8VWxzImDkdOcTJt fZcIInxFPR7Uttb/1wmAHXefuSceucfT7sjxT/q5Yj+G67yEMOQVah+jA63/mUT5qJFg q/uZusP555+KTSDdG0u6CQeqbkecqz8uOq1zWrq+meTwDYicfAzQoBFXAsmXXwkpCV4g t1fBqwZ1QZn58Jp6PKfE7elg0/vIcFMGF7UJ4wsSKNnea/h3EU6fEAHwYa8hRGMOQ/NU lL2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="XQQwk/Ih"; 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 i127-v6si45883410pfc.148.2018.11.19.08.40.42; Mon, 19 Nov 2018 08:40:57 -0800 (PST) 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="XQQwk/Ih"; 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 S1732581AbeKTDDA (ORCPT + 99 others); Mon, 19 Nov 2018 22:03:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:35456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731835AbeKTDC7 (ORCPT ); Mon, 19 Nov 2018 22:02:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 8FCBE20989; Mon, 19 Nov 2018 16:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645530; bh=cdscZSLh9d43Vwj9Xe0SPohKsWQdMckvjGwRytDr1nA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQQwk/IhvWHgkvmBQii3plON/Km+j8aCF+uDP/zFHZZN4pObD8pBRXbO1CWZS7IYn 6YIhtJdrp9KLZRQeZRFvUrLeTEgtDWKTJePOw2+dT77GZP+DJhjDObKV1B75ebjBN3 7djh/z+VTha1bGkbuVgP0twA0t0tcAbRfj4Fmn50= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Chris Wilson , Joonas Lahtinen Subject: [PATCH 4.19 198/205] drm/i915: Dont oops during modeset shutdown after lpe audio deinit Date: Mon, 19 Nov 2018 17:28:25 +0100 Message-Id: <20181119162642.506771617@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrjälä commit 6a8915d0f8cf323e1beb792a33095cf652db4056 upstream. We deinit the lpe audio device before we call drm_atomic_helper_shutdown(), which means the platform device may already be gone when it comes time to shut down the crtc. As we don't know when the last reference to the platform device gets dropped by the audio driver we can't assume that the device and its data are still around when turning off the crtc. Mark the platform device as gone as soon as we do the audio deinit. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181105194604.6994-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit f45a7977d1140c11f334e01a9f77177ed68e3bfa) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_lpe_audio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/intel_lpe_audio.c +++ b/drivers/gpu/drm/i915/intel_lpe_audio.c @@ -297,8 +297,10 @@ void intel_lpe_audio_teardown(struct drm lpe_audio_platdev_destroy(dev_priv); irq_free_desc(dev_priv->lpe_audio.irq); -} + dev_priv->lpe_audio.irq = -1; + dev_priv->lpe_audio.platdev = NULL; +} /** * intel_lpe_audio_notify() - notify lpe audio event