From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 513DDC433E0 for ; Thu, 11 Mar 2021 14:57:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84E5064FAB for ; Thu, 11 Mar 2021 14:57:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84E5064FAB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 82E738D02C1; Thu, 11 Mar 2021 09:57:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78F198D02B2; Thu, 11 Mar 2021 09:57:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E1828D02C1; Thu, 11 Mar 2021 09:57:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 3EAAA8D02B2 for ; Thu, 11 Mar 2021 09:57:11 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EC063824999B for ; Thu, 11 Mar 2021 14:57:10 +0000 (UTC) X-FDA: 77907896220.14.226DC57 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf06.hostedemail.com (Postfix) with ESMTP id 7FECEC0007D7 for ; Thu, 11 Mar 2021 14:57:09 +0000 (UTC) IronPort-SDR: yc2fvkrTMG3TazdNfH/uDI3izCc1SORdaSet+1I8uqRtDQwEZiS5LboP5eRWgNVPQ+cHYhqRSL gQowtoVbA++g== X-IronPort-AV: E=McAfee;i="6000,8403,9920"; a="175790291" X-IronPort-AV: E=Sophos;i="5.81,240,1610438400"; d="scan'208";a="175790291" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2021 06:57:07 -0800 IronPort-SDR: bZLHUbU5lneKMCBYas2V2r3BJKdyXm2SdvIVCwHjyPj4+Y4rSPauRNbsxZDTWKnVTYRvEWayYN TUY2jDJfgbMg== X-IronPort-AV: E=Sophos;i="5.81,240,1610438400"; d="scan'208";a="404094375" Received: from ideak-desk.fi.intel.com ([10.237.68.141]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2021 06:57:04 -0800 Date: Thu, 11 Mar 2021 16:57:00 +0200 From: Imre Deak To: Xing Zhengjun Cc: kernel test robot , Khaled Almahallawy , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , LKML , Linux Memory Management List , lkp@lists.01.org, lkp@intel.com Subject: Re: [LKP] Re: [drm/i915] 7962893ecb: WARNING:at_drivers/gpu/drm/i915/intel_runtime_pm.c:#intel_runtime_pm_driver_release[i915] Message-ID: <20210311145700.GA2970909@ideak-desk.fi.intel.com> Reply-To: imre.deak@intel.com References: <20210303055517.GB2708@xsang-OptiPlex-9020> <20210304005518.GD1137473@ideak-desk.fi.intel.com> <9575be26-f9e5-814b-b24c-a2497847980e@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9575be26-f9e5-814b-b24c-a2497847980e@linux.intel.com> X-Stat-Signature: h3srnrsisu6ei5p4ey4ckgsxyy1ou7ah X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7FECEC0007D7 Received-SPF: none (intel.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mga02.intel.com; client-ip=134.134.136.20 X-HE-DKIM-Result: none/none X-HE-Tag: 1615474629-64938 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, On Thu, Mar 11, 2021 at 09:32:04AM +0800, Xing Zhengjun wrote: > On 3/4/2021 8:55 AM, Imre Deak wrote: > > Hi Oliver, > > > > On Wed, Mar 03, 2021 at 01:55:17PM +0800, kernel test robot wrote: > > > > > > Greeting, > > > > > > FYI, we noticed the following commit (built with gcc-9): > > > > > > commit: 7962893ecb853aa7c8925ce237ab6c4274cfc1c7 ("drm/i915: Disable runtime power management during shutdown") > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > > [...] > > > If you fix the issue, kindly add following tag > > > Reported-by: kernel test robot > > > > > > > > > [ 49.686892] ------------[ cut here ]------------ > > > [ 49.691510] i915 0000:00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup > > > > > > THanks for the report. I couldn't reproduce this. Could you add the > > following kconfig option for these tests (and if possible reproduce the > > problem with that?): > > > > CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y > > > I add "CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y" to the kernel config, re-test it, > the issue still happened. The kernel log is in the attachment. thanks, the following should fix this: https://patchwork.freedesktop.org/patch/423617/?series=87883&rev=1 The leaked wakeref was due to not handling the case where the DMC firmware is missing: [ 20.316022] i915 0000:00:02.0: Direct firmware load for i915/skl_dmc_ver1_27.bin failed with error -2 [ 20.338032] i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915 ... [ 47.439434] i915 0000:00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup ... [ 47.646836] Call Trace: [ 47.650215] pci_device_shutdown+0x34/0x60 [ 47.655264] device_shutdown+0x162/0x1d0 [ 47.660103] kernel_restart+0xe/0x40 [ 47.664615] __do_sys_reboot+0x1d2/0x210 [ 47.669445] ? __check_object_size+0x136/0x150 [ 47.674792] ? rcu_nocb_try_bypass+0x1f2/0x340 [ 47.680132] ? get_max_files+0x10/0x10 [ 47.684781] ? exit_to_user_mode_prepare+0x112/0x150 [ 47.690672] do_syscall_64+0x33/0x40 ... [ 47.831502] i915 Wakeref count: 1 [ 47.835731] i915 Wakeref x1 taken at: [ 47.835731] track_intel_runtime_pm_wakeref+0x19/0xa0 [i915] [ 47.835731] intel_display_power_get+0x25/0x60 [i915] [ 47.835731] intel_csr_runtime_pm_get+0x22/0x60 [i915] [ 47.835731] intel_csr_ucode_init+0x49/0x270 [i915] [ 47.835731] intel_modeset_init_noirq+0x65/0x280 [i915] [ 47.835731] i915_driver_probe+0x518/0x990 [i915] [ 47.835731] i915_pci_probe+0x54/0x140 [i915] [ 47.835731] local_pci_probe+0x42/0x80 This could also be a real problem if the FW loading hadn't yet finished by shutdown/reboot. --Imre