From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8874F10E09B for ; Thu, 22 Jun 2023 17:53:42 +0000 (UTC) Date: Thu, 22 Jun 2023 10:52:17 -0700 Message-ID: <87r0q3s7u6.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Anshuman Gupta In-Reply-To: <20230622060228.2885144-3-anshuman.gupta@intel.com> References: <20230622060228.2885144-1-anshuman.gupta@intel.com> <20230622060228.2885144-3-anshuman.gupta@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t v3 2/2] lib/igt_aux: Enable PM Suspend dbg messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, badal.nilawar@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, 21 Jun 2023 23:02:28 -0700, Anshuman Gupta wrote: > Hi Anshuman, > @@ -940,6 +950,14 @@ static void igt_aux_enable_pm_suspend_dbg(void) > igt_warn("Unable to open printk parameters Err:%d\n", errno); > } > > + /* pm_debug_messages depends on CONFIG_PM_SLEEP_DEBUG */ > + if (!faccessat(power_dir, "pm_debug_messages", R_OK | W_OK, 0)) { > + __pm_debug_messages_state = igt_sysfs_get_boolean(sysfs_fd, "pm_debug_messages"); > + igt_sysfs_set_boolean(power_dir, "pm_debug_messages", true); > + } > + > + igt_install_exit_handler(igt_aux_pm_suspend_dbg_restore_exit_handler); We already installed this exit handler in Patch 1 (under 'if (sysfs_fd > 0)') so we shouldn't install it twice, correct? Thanks. -- Ashutosh