From patchwork Wed Jan 10 12:23:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 762129 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5FAD39AFB for ; Wed, 10 Jan 2024 12:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MNGx1gTR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704889443; x=1736425443; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hQd43wuWJE0KnQHLnyiumQ+Z1mbd7HrXXACya2xTy5M=; b=MNGx1gTRy0vs5FmuFllD6B31xCdz/k+TgEnMKLUaoQh3QBW98ccV4thN 6XS1mF1heq895lIdqhNt/DhivKYtsVdFWWYFqJTbDSTGgM2gmssJBEXWv 5y3xUmBYjHGwp549xgZW/nQLLLsa8k8dgQxF9Y+GOk3WYPSPR9AdgiO9G FpJ98AgywnZpIP7UjhFaG1KqKlMyJA2D3xboBdd9mjUSX4x3V/E/3ZZFG NE7ssvJfHVDqhNDr1/W6Fj3HDJLsS3dLfiwZWkN1XpgXupkYofQOB8t7n ssSBT6SPEK64zNKEYwZcDn9Kfce66EOWOO57Oy0FsJEWgMqpHebRrNDh7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10948"; a="5249653" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="5249653" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2024 04:24:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10948"; a="925625214" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="925625214" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2024 04:24:00 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 19DC31205F8; Wed, 10 Jan 2024 14:23:57 +0200 (EET) From: Sakari Ailus To: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" , Andy Shevchenko , laurent.pinchart@ideasonboard.com Subject: [PATCH v2 0/2] Small runtime PM API changes Date: Wed, 10 Jan 2024 14:23:55 +0200 Message-Id: <20240110122356.142997-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi folks, Here's a small but a different set of patches for making two relatively minor changes to runtime PM API. I restarted version numbering as this is meaningfully different from the previous set. pm_runtime_get_if_active() loses its second argument as it only made sense to have ign_usage_count argument true. The other change is also small but it has an effect on callers: pm_runtime_put_autosuspend() will, in the future, be re-purposed to include a call to pm_runtime_mark_last_busy() as well. Before this, current users of the function are moved to __pm_runtime_put_autosuspend() (added by this patchset) which will continue to have the current behaviour. I haven't included the conversion patches in this set as I only want to do that once this set has been approved and merged. The tree specific patches can be found here, on linux-next master (there are some V4L2 patches there, too, please ignore them for now): Later on, users calling pm_runtime_mark_last_busy() immediately followed by __pm_runtime_put_autosuspend() will be switched back to pm_runtime_put_autosuspend() once its behaviour change has been done (a patch near top of that branch). I'll provide these once the preceding ones have been merged. Comments are welcome. since v1: - patch 1: Rename __pm_runtime_get_conditional() as pm_runtime_get_conditional(). - patch 1: Reword documentation on driver use of pm_runtime_get_conditional(). Sakari Ailus (2): pm: runtime: Simplify pm_runtime_get_if_active() usage pm: runtime: Add pm_runtime_put_autosuspend() replacement Documentation/power/runtime_pm.rst | 22 ++++++++----- drivers/accel/ivpu/ivpu_pm.c | 2 +- drivers/base/power/runtime.c | 10 ++++-- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 2 +- drivers/media/i2c/ccs/ccs-core.c | 2 +- drivers/media/i2c/ov64a40.c | 2 +- drivers/media/i2c/thp7312.c | 2 +- drivers/net/ipa/ipa_smp2p.c | 2 +- drivers/pci/pci.c | 2 +- include/linux/pm_runtime.h | 44 ++++++++++++++++++++++--- sound/hda/hdac_device.c | 2 +- 12 files changed, 68 insertions(+), 26 deletions(-)