From patchwork Fri Oct 4 09:41:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB756CFA74C for ; Fri, 4 Oct 2024 09:41:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4207310E28A; Fri, 4 Oct 2024 09:41:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ml9s8l7I"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D30610E28A for ; Fri, 4 Oct 2024 09:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034875; x=1759570875; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6lTT+2P3JX3u/VnV1rFuyhImRRDU09jf/XX9CEWXNj0=; b=ml9s8l7IeOB1mtL9UUgprKI3mmOXc5wKxEQ3+IrdzPbwN6vBlsIKwp2W QiiAwRQrcsbH1NJiw1Vt6z3HB3yhZ/LfFWZEDF7c1EaqG7K2NBwSQ+1UH il65IRhlj7Sm4zknPZxsLnibAbQjTd2A/VkL42X3vp3XnKn0WnOFM+DTS f73eKPe/XuIfQeZpq+pi6EFBH0hXn53CmRyydvHr8OgdOQkeL46TVQN5R pDAKYD7AwlBsSklvyH8sYdXjyO3/6lwnOfKIASk9indgkEiULu5aN/+O2 QKsXtww7FgviHPnPCfjYSVIA/rLiSvTCSK1nS62sosjd/tKCMZ/Qjw33S A==; X-CSE-ConnectionGUID: 9t2joxd6RmmIuYhjaB/Gfw== X-CSE-MsgGUID: w+aQ951uTc6nZTs8T7Tp/g== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856172" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856172" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:15 -0700 X-CSE-ConnectionGUID: vJGnCLCJQLyYZOrv5gr1Sw== X-CSE-MsgGUID: 8uHWlphdQeC9x2WD7sbDHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331917" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:13 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 907CF11F7E7; Fri, 4 Oct 2024 12:41:11 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoB-000TUk-1r; Fri, 04 Oct 2024 12:41:11 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Jacek Lawrynowicz , Stanislaw Gruszka , Oded Gabbay Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 01/51] accel/ivpu: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:11 +0300 Message-Id: <20241004094111.113368-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus Reviewed-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 2 +- drivers/accel/ivpu/ivpu_pm.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index c91400ecf926..4140ff55a4e6 100644 --- a/drivers/accel/ivpu/ivpu_drv.c +++ b/drivers/accel/ivpu/ivpu_drv.c @@ -104,7 +104,7 @@ static void file_priv_release(struct kref *ref) mutex_lock(&vdev->context_list_lock); file_priv_unbind(vdev, file_priv); mutex_unlock(&vdev->context_list_lock); - pm_runtime_put_autosuspend(vdev->drm.dev); + __pm_runtime_put_autosuspend(vdev->drm.dev); mutex_destroy(&file_priv->ms_lock); mutex_destroy(&file_priv->lock); diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 59d3170f5e35..643854e51fa0 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -143,7 +143,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work) kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt); pm_runtime_mark_last_busy(vdev->drm.dev); - pm_runtime_put_autosuspend(vdev->drm.dev); + __pm_runtime_put_autosuspend(vdev->drm.dev); } void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason) @@ -303,7 +303,7 @@ int ivpu_rpm_get(struct ivpu_device *vdev) void ivpu_rpm_put(struct ivpu_device *vdev) { pm_runtime_mark_last_busy(vdev->drm.dev); - pm_runtime_put_autosuspend(vdev->drm.dev); + __pm_runtime_put_autosuspend(vdev->drm.dev); } void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev) @@ -339,7 +339,7 @@ void ivpu_pm_reset_done_cb(struct pci_dev *pdev) ivpu_dbg(vdev, PM, "Post-reset done.\n"); pm_runtime_mark_last_busy(vdev->drm.dev); - pm_runtime_put_autosuspend(vdev->drm.dev); + __pm_runtime_put_autosuspend(vdev->drm.dev); } void ivpu_pm_init(struct ivpu_device *vdev) @@ -381,7 +381,7 @@ void ivpu_pm_enable(struct ivpu_device *vdev) pm_runtime_set_active(dev); pm_runtime_allow(dev); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); } void ivpu_pm_disable(struct ivpu_device *vdev) From patchwork Fri Oct 4 09:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6D42CFA758 for ; Fri, 4 Oct 2024 09:41:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A009F10E9C6; Fri, 4 Oct 2024 09:41:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RotWumEo"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B3E310E9C9; Fri, 4 Oct 2024 09:41:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034879; x=1759570879; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=opkEn8fF7zfWp9qZu6xZSkE5K0XQ7Loqw3FtWiM4MKg=; b=RotWumEo/njq1RnHbo8V0fV+6QMBo12sYLY3gvnuI0TV07inokYkWHlM cFSdockrSsosmtIYAX5qD9/oSzs/bIFgr9WprOR2ZP2phX52Y468/LF5N XFXXXZS7xqK1vlzh3lPCtG77kInK+NaDNFtKd+ZRC+lUpWmHJlZmUf3om VWirb78hJ+upTKjlLKvbGju2z012TOh0gy3Vby/ivcOtyttQInkaePTR8 jJRk9UugUelYjFiwNXxA0oX36WtFTNTuUlzG+QTIv/NB4F4eYhf6ZAcCQ 5Lrjurl0uFun5PWfPoANlQc60fYfJRIe5PYxDJGImDfGHr6tFEk+SKisY Q==; X-CSE-ConnectionGUID: qlv01cT8S7K6+7HlaeXDTg== X-CSE-MsgGUID: jSsQnMFjR5uazg8DVrN54w== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856201" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856201" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:19 -0700 X-CSE-ConnectionGUID: TxfR2o+sRXuh0r4F13wasg== X-CSE-MsgGUID: byQfcOEhRbmbPuMMg3bZqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331925" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:17 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 4792C120E62; Fri, 4 Oct 2024 12:41:12 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoC-000TWw-0t; Fri, 04 Oct 2024 12:41:12 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , David Airlie , Simona Vetter Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 09/51] drm/amd: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:12 +0300 Message-Id: <20241004094112.113504-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 120 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 4 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 178 +++++++++--------- 14 files changed, 177 insertions(+), 177 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index f85ace0384d2..1027873da5ea 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -495,7 +495,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev, /* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event(adev_to_drm(adev)); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); } } /* TODO: check other events */ diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 344e0a9ee08a..c31969f5c6ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -714,7 +714,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -739,7 +739,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -865,7 +865,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -924,7 +924,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force) out: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -1025,7 +1025,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1151,7 +1151,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force) exit: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -1375,7 +1375,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1451,7 +1451,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) out: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort || diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 37d8657f0776..045c7e9a47eb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -116,13 +116,13 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -130,7 +130,7 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) || (se_bank != 0xFFFFFFFF && se_bank >= adev->gfx.config.max_shader_engines)) { pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return -EINVAL; } @@ -180,7 +180,7 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, mutex_unlock(&adev->pm.mutex); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return result; @@ -240,13 +240,13 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -256,7 +256,7 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off if ((rd->id.grbm.sh != 0xFFFFFFFF && rd->id.grbm.sh >= adev->gfx.config.max_sh_per_se) || (rd->id.grbm.se != 0xFFFFFFFF && rd->id.grbm.se >= adev->gfx.config.max_shader_engines)) { pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); mutex_unlock(&rd->lock); return -EINVAL; @@ -311,7 +311,7 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off mutex_unlock(&rd->lock); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return result; @@ -407,19 +407,19 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } data = kcalloc(1024, sizeof(*data), GFP_KERNEL); if (!data) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return -ENOMEM; } @@ -447,7 +447,7 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz mutex_unlock(&adev->grbm_idx_mutex); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (!x) { result = -EINVAL; @@ -527,13 +527,13 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -558,7 +558,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf, r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -587,13 +587,13 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -618,7 +618,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -650,13 +650,13 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -677,7 +677,7 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf, r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -709,13 +709,13 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -737,7 +737,7 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -769,13 +769,13 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -796,7 +796,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf, r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -828,13 +828,13 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user * r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -856,7 +856,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user * r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); amdgpu_virt_disable_access_debugfs(adev); return r; } @@ -991,20 +991,20 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (r) { amdgpu_virt_disable_access_debugfs(adev); @@ -1073,13 +1073,13 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1095,7 +1095,7 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf, mutex_unlock(&adev->grbm_idx_mutex); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (!x) { amdgpu_virt_disable_access_debugfs(adev); @@ -1193,7 +1193,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf, mutex_unlock(&adev->grbm_idx_mutex); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); while (size) { uint32_t value; @@ -1215,7 +1215,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf, return result; err: - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); kfree(data); return r; } @@ -1243,7 +1243,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1267,7 +1267,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1294,7 +1294,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1316,7 +1316,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1342,7 +1342,7 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1366,7 +1366,7 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1393,7 +1393,7 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct file *f, const char __user *bu r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1415,7 +1415,7 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct file *f, const char __user *bu r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1441,7 +1441,7 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1461,7 +1461,7 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf, r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1478,7 +1478,7 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *bu r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1502,7 +1502,7 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *bu r = result; out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1665,7 +1665,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -1702,7 +1702,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused) up_write(&adev->reset_domain->sem); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; } @@ -1715,14 +1715,14 @@ static int amdgpu_debugfs_evict_vram(void *data, u64 *val) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } *val = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; } @@ -1736,14 +1736,14 @@ static int amdgpu_debugfs_evict_gtt(void *data, u64 *val) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } *val = amdgpu_ttm_evict_resources(adev, TTM_PL_TT); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; } @@ -1756,14 +1756,14 @@ static int amdgpu_debugfs_benchmark(void *data, u64 val) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } r = amdgpu_benchmark(adev, val); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -1995,7 +1995,7 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) ret = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (ret < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return ret; } @@ -2015,7 +2015,7 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return ret; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index b119d27271c1..b2bd0cfaacbb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -348,7 +348,7 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set, adev->have_disp_power_ref = false; out: /* drop the power reference we got coming in here */ - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index bb06cb20041c..57dce06b246a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2182,7 +2182,7 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev) if (p) { pm_runtime_get_sync(&p->dev); pm_runtime_mark_last_busy(&p->dev); - pm_runtime_put_autosuspend(&p->dev); + __pm_runtime_put_autosuspend(&p->dev); pci_dev_put(p); } } @@ -2391,7 +2391,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, pm_runtime_allow(ddev->dev); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); pci_wake_from_d3(pdev, TRUE); @@ -2810,7 +2810,7 @@ long amdgpu_drm_ioctl(struct file *filp, pm_runtime_mark_last_busy(dev->dev); out: - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 2f24a6aa13bf..cf555ec0f816 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -307,7 +307,7 @@ bool amdgpu_fence_process(struct amdgpu_ring *ring) dma_fence_signal(fence); dma_fence_put(fence); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); } while (last_seq != seq); return true; @@ -948,7 +948,7 @@ static int gpu_recover_get(void *data, u64 *val) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; } @@ -958,7 +958,7 @@ static int gpu_recover_get(void *data, u64 *val) *val = atomic_read(&adev->reset_domain->reset_res); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 2fe75c920a73..278527cdddef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -1495,14 +1495,14 @@ static ssize_t amdgpu_gfx_set_run_cleaner_shader(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_gfx_run_cleaner_shader(adev, value); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return ret; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 016a6f6c4267..2d0e9bebaafd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -1383,7 +1383,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) out_suspend: pm_runtime_mark_last_busy(dev->dev); pm_put: - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -1450,7 +1450,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, file_priv->driver_priv = NULL; pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c index 123bcf5c2bb1..5f85cb9102a3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c @@ -60,7 +60,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf, ret = pm_runtime_get_sync(dev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -102,7 +102,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf, amdgpu_gfx_off_ctrl(adev, true); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return size; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 1d9eda883bb8..00f270a604b6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3511,7 +3511,7 @@ static void amdgpu_ras_counte_dw(struct work_struct *work) pm_runtime_mark_last_busy(dev->dev); Out: - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } static int amdgpu_get_ras_schema(struct amdgpu_device *adev) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c index 41ebe690eeff..d461181e10f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c @@ -110,7 +110,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u ret = pm_runtime_get_sync(dev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -160,7 +160,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u } pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return size; } diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index d07acf1b2f93..3011fe9927f4 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -1081,7 +1081,7 @@ static void kfd_process_destroy_pdds(struct kfd_process *p) */ if (pdd->runtime_inuse) { pm_runtime_mark_last_busy(adev_to_drm(pdd->dev->adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev); pdd->runtime_inuse = false; } @@ -1766,7 +1766,7 @@ struct kfd_process_device *kfd_bind_process_to_device(struct kfd_node *dev, if (!pdd->runtime_inuse) { err = pm_runtime_get_sync(adev_to_drm(dev->adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev); return ERR_PTR(err); } } diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index d1ca9e709946..a7be15e8c06e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10102,7 +10102,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) * displays anymore */ for (i = 0; i < crtc_disable_count; i++) - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); pm_runtime_mark_last_busy(dev->dev); } diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index d5d6ab484e5a..dce775edc1cd 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -147,14 +147,14 @@ static ssize_t amdgpu_get_power_dpm_state(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } amdgpu_dpm_get_current_power_state(adev, &pm); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return sysfs_emit(buf, "%s\n", (pm == POWER_STATE_TYPE_BATTERY) ? "battery" : @@ -187,14 +187,14 @@ static ssize_t amdgpu_set_power_dpm_state(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } amdgpu_dpm_set_power_state(adev, state); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; } @@ -275,14 +275,14 @@ static ssize_t amdgpu_get_power_dpm_force_performance_level(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } level = amdgpu_dpm_get_performance_level(adev); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return sysfs_emit(buf, "%s\n", (level == AMD_DPM_FORCED_LEVEL_AUTO) ? "auto" : @@ -338,14 +338,14 @@ static ssize_t amdgpu_set_power_dpm_force_performance_level(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } mutex_lock(&adev->pm.stable_pstate_ctx_lock); if (amdgpu_dpm_force_performance_level(adev, level)) { pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); mutex_unlock(&adev->pm.stable_pstate_ctx_lock); return -EINVAL; } @@ -354,7 +354,7 @@ static ssize_t amdgpu_set_power_dpm_force_performance_level(struct device *dev, mutex_unlock(&adev->pm.stable_pstate_ctx_lock); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; } @@ -376,7 +376,7 @@ static ssize_t amdgpu_get_pp_num_states(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -384,7 +384,7 @@ static ssize_t amdgpu_get_pp_num_states(struct device *dev, memset(&data, 0, sizeof(data)); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); buf_len = sysfs_emit(buf, "states: %d\n", data.nums); for (i = 0; i < data.nums; i++) @@ -414,7 +414,7 @@ static ssize_t amdgpu_get_pp_cur_state(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -423,7 +423,7 @@ static ssize_t amdgpu_get_pp_cur_state(struct device *dev, ret = amdgpu_dpm_get_pp_num_states(adev, &data); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return ret; @@ -487,7 +487,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -509,13 +509,13 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev, } pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; err_out: pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -546,14 +546,14 @@ static ssize_t amdgpu_get_pp_table(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } size = amdgpu_dpm_get_pp_table(adev, &table); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (size <= 0) return size; @@ -582,14 +582,14 @@ static ssize_t amdgpu_set_pp_table(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_dpm_set_pp_table(adev, buf, count); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return ret; @@ -810,7 +810,7 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -832,13 +832,13 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, } pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; err_out: pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return -EINVAL; } @@ -867,7 +867,7 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -889,7 +889,7 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -931,14 +931,14 @@ static ssize_t amdgpu_set_pp_features(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_dpm_set_ppfeature_status(adev, featuremask); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return -EINVAL; @@ -962,7 +962,7 @@ static ssize_t amdgpu_get_pp_features(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -971,7 +971,7 @@ static ssize_t amdgpu_get_pp_features(struct device *dev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -1031,7 +1031,7 @@ static ssize_t amdgpu_get_pp_dpm_clock(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -1043,7 +1043,7 @@ static ssize_t amdgpu_get_pp_dpm_clock(struct device *dev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -1104,14 +1104,14 @@ static ssize_t amdgpu_set_pp_dpm_clock(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_dpm_force_clock_level(adev, type, mask); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return -EINVAL; @@ -1285,14 +1285,14 @@ static ssize_t amdgpu_get_pp_sclk_od(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } value = amdgpu_dpm_get_sclk_od(adev); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return sysfs_emit(buf, "%d\n", value); } @@ -1319,14 +1319,14 @@ static ssize_t amdgpu_set_pp_sclk_od(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } amdgpu_dpm_set_sclk_od(adev, (uint32_t)value); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; } @@ -1347,14 +1347,14 @@ static ssize_t amdgpu_get_pp_mclk_od(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } value = amdgpu_dpm_get_mclk_od(adev); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return sysfs_emit(buf, "%d\n", value); } @@ -1381,14 +1381,14 @@ static ssize_t amdgpu_set_pp_mclk_od(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } amdgpu_dpm_set_mclk_od(adev, (uint32_t)value); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; } @@ -1429,7 +1429,7 @@ static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -1438,7 +1438,7 @@ static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -1494,14 +1494,14 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_dpm_set_power_profile_mode(adev, parameter, parameter_size); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (!ret) return count; @@ -1522,7 +1522,7 @@ static int amdgpu_hwmon_get_sensor_generic(struct amdgpu_device *adev, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1530,7 +1530,7 @@ static int amdgpu_hwmon_get_sensor_generic(struct amdgpu_device *adev, r = amdgpu_dpm_read_sensor(adev, sensor, query, &size); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -1641,14 +1641,14 @@ static ssize_t amdgpu_get_pcie_bw(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } amdgpu_asic_get_pcie_usage(adev, &count0, &count1); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return sysfs_emit(buf, "%llu %llu %i\n", count0, count1, pcie_get_mps(adev->pdev)); @@ -1772,7 +1772,7 @@ static ssize_t amdgpu_get_apu_thermal_cap(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -1783,7 +1783,7 @@ static ssize_t amdgpu_get_apu_thermal_cap(struct device *dev, size = sysfs_emit(buf, "failed to get thermal limit\n"); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -1809,7 +1809,7 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -1820,7 +1820,7 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev, } pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return count; } @@ -1851,14 +1851,14 @@ static ssize_t amdgpu_get_pm_metrics(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } size = amdgpu_dpm_get_pm_metrics(adev, buf, PAGE_SIZE); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -1892,7 +1892,7 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } @@ -1907,7 +1907,7 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev, out: pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return size; } @@ -2010,7 +2010,7 @@ static ssize_t amdgpu_set_smartshift_bias(struct device *dev, r = pm_runtime_get_sync(ddev->dev); if (r < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return r; } @@ -2030,7 +2030,7 @@ static ssize_t amdgpu_set_smartshift_bias(struct device *dev, out: pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return r; } @@ -2337,14 +2337,14 @@ static ssize_t amdgpu_set_pm_policy_attr(struct device *dev, ret = pm_runtime_get_sync(ddev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); return ret; } ret = amdgpu_dpm_set_pm_policy(adev, policy_attr->id, val); pm_runtime_mark_last_busy(ddev->dev); - pm_runtime_put_autosuspend(ddev->dev); + __pm_runtime_put_autosuspend(ddev->dev); if (ret) return ret; @@ -2774,14 +2774,14 @@ static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev, ret = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (ret < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return ret; } ret = amdgpu_dpm_get_fan_control_mode(adev, &pwm_mode); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (ret) return -EINVAL; @@ -2819,14 +2819,14 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev, ret = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (ret < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return ret; } ret = amdgpu_dpm_set_fan_control_mode(adev, pwm_mode); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (ret) return -EINVAL; @@ -2868,7 +2868,7 @@ static ssize_t amdgpu_hwmon_set_pwm1(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } @@ -2886,7 +2886,7 @@ static ssize_t amdgpu_hwmon_set_pwm1(struct device *dev, out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -2909,14 +2909,14 @@ static ssize_t amdgpu_hwmon_get_pwm1(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } err = amdgpu_dpm_get_fan_speed_pwm(adev, &speed); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -2939,14 +2939,14 @@ static ssize_t amdgpu_hwmon_get_fan1_input(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } err = amdgpu_dpm_get_fan_speed_rpm(adev, &speed); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -3003,14 +3003,14 @@ static ssize_t amdgpu_hwmon_get_fan1_target(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } err = amdgpu_dpm_get_fan_speed_rpm(adev, &rpm); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -3038,7 +3038,7 @@ static ssize_t amdgpu_hwmon_set_fan1_target(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } @@ -3055,7 +3055,7 @@ static ssize_t amdgpu_hwmon_set_fan1_target(struct device *dev, out: pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -3078,14 +3078,14 @@ static ssize_t amdgpu_hwmon_get_fan1_enable(struct device *dev, ret = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (ret < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return ret; } ret = amdgpu_dpm_get_fan_control_mode(adev, &pwm_mode); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (ret) return -EINVAL; @@ -3121,14 +3121,14 @@ static ssize_t amdgpu_hwmon_set_fan1_enable(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } err = amdgpu_dpm_set_fan_control_mode(adev, pwm_mode); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return -EINVAL; @@ -3250,7 +3250,7 @@ static ssize_t amdgpu_hwmon_show_power_cap_generic(struct device *dev, r = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (r < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; } @@ -3263,7 +3263,7 @@ static ssize_t amdgpu_hwmon_show_power_cap_generic(struct device *dev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return size; } @@ -3341,14 +3341,14 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev, err = pm_runtime_get_sync(adev_to_drm(adev)->dev); if (err < 0) { - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return err; } err = amdgpu_dpm_set_power_limit(adev, value); pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); - pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); + __pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); if (err) return err; @@ -3789,7 +3789,7 @@ static int amdgpu_retrieve_od_settings(struct amdgpu_device *adev, ret = pm_runtime_get_sync(adev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(adev->dev); + __pm_runtime_put_autosuspend(adev->dev); return ret; } @@ -3798,7 +3798,7 @@ static int amdgpu_retrieve_od_settings(struct amdgpu_device *adev, size = sysfs_emit(buf, "\n"); pm_runtime_mark_last_busy(adev->dev); - pm_runtime_put_autosuspend(adev->dev); + __pm_runtime_put_autosuspend(adev->dev); return size; } @@ -3899,14 +3899,14 @@ amdgpu_distribute_custom_od_settings(struct amdgpu_device *adev, } pm_runtime_mark_last_busy(adev->dev); - pm_runtime_put_autosuspend(adev->dev); + __pm_runtime_put_autosuspend(adev->dev); return count; err_out1: pm_runtime_mark_last_busy(adev->dev); err_out0: - pm_runtime_put_autosuspend(adev->dev); + __pm_runtime_put_autosuspend(adev->dev); return ret; } @@ -4760,7 +4760,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -4778,7 +4778,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused) out: pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } From patchwork Fri Oct 4 09:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8774CFA753 for ; Fri, 4 Oct 2024 09:41:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D52F10E9C8; Fri, 4 Oct 2024 09:41:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="HLRDiEaB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA98C10E9CF; Fri, 4 Oct 2024 09:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034879; x=1759570879; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WSV6SFm0w3w9EfW6AtheB9fonChTpsMqSs+jbqN/wG0=; b=HLRDiEaBCpdyqy0BtUNPmoi0G3uZjptiBoNK4fL0wVpU9J5v6ABDSdej Frda7c+GVz8MmV8g3Z42DE3tgRBwNrHkNCSAgPjNkuRWVHXbPU6CaqD4K Dct0cu8JeLPIs6s7gHBqQool4cUWsNG3EjVKGvDRZf5Lf2o1peUUgVyMN iTBXOYGzbhpnokvI4IG/PfWGrDrblwoDqAADxcHSl8b+KchsSs5lZBcmQ 5D1aZ4R7E9d3Xtzisq3nws8ncHn6L74E2GLdbftwoT0hFm9wALv5Pqt4m YKekTf6OfO1B+u9Q3HSwF7EEN1URccUgbLrvw2dmPo8p/7kyEqnzE4Q3F w==; X-CSE-ConnectionGUID: qAS1PGOdRnG/JKHUGP2PrA== X-CSE-MsgGUID: JvzA0Z0yTFGCdWhxK7GuVw== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856194" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856194" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:19 -0700 X-CSE-ConnectionGUID: MxHwf+16QlyXeifsa0++VQ== X-CSE-MsgGUID: MVHqVS/eSeqizZg6ugwROQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331926" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:17 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 5B325120E8F; Fri, 4 Oct 2024 12:41:12 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoC-000TXD-1A; Fri, 04 Oct 2024 12:41:12 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Karol Herbst , Lyude Paul , Danilo Krummrich , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH 10/51] drm/nouveau: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:12 +0300 Message-Id: <20241004094112.113521-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 10 +++++----- drivers/gpu/drm/nouveau/nouveau_connector.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 8 ++++---- drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_drm.c | 10 +++++----- drivers/gpu/drm/nouveau/nouveau_gem.c | 10 +++++----- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index eed579a6c858..63710ce16ec2 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1205,7 +1205,7 @@ nv50_mstc_detect(struct drm_connector *connector, ret = pm_runtime_get_sync(connector->dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } @@ -1216,7 +1216,7 @@ nv50_mstc_detect(struct drm_connector *connector, out: pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return ret; } @@ -2405,7 +2405,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) /* Drop the RPM ref we got from nv50_disp_atomic_commit() */ pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } static void @@ -2426,7 +2426,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, ret = pm_runtime_get_sync(dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -2475,7 +2475,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (ret) drm_atomic_helper_unprepare_planes(dev, state); done: - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 8d5c9c74cbb9..cd42a198b658 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -582,7 +582,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) } else { ret = pm_runtime_get_sync(dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); nouveau_connector_set_edid(nv_connector, NULL); return conn_status; } @@ -674,7 +674,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) drm_dp_cec_unset_edid(&nv_connector->aux); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return conn_status; } diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index e83db051e851..2967772b8623 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -55,7 +55,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data) ret = pm_runtime_get_sync(drm->dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(drm->dev->dev); + __pm_runtime_put_autosuspend(drm->dev->dev); return ret; } @@ -63,7 +63,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data) nvif_rd32(&drm->client.device.object, 0x101000)); pm_runtime_mark_last_busy(drm->dev->dev); - pm_runtime_put_autosuspend(drm->dev->dev); + __pm_runtime_put_autosuspend(drm->dev->dev); return 0; } @@ -184,13 +184,13 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, ret = pm_runtime_get_sync(drm->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(drm->dev); + __pm_runtime_put_autosuspend(drm->dev); return ret; } ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); - pm_runtime_put_autosuspend(drm->dev); + __pm_runtime_put_autosuspend(drm->dev); if (ret < 0) return ret; diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index e2fd561cd23f..8cb906684a78 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -536,7 +536,7 @@ nouveau_display_hpd_work(struct work_struct *work) pm_runtime_mark_last_busy(drm->dev->dev); noop: - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } #ifdef CONFIG_ACPI @@ -557,7 +557,7 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val, * where we can't wake it up, it can handle * it's own hotplug events. */ - pm_runtime_put_autosuspend(drm->dev->dev); + __pm_runtime_put_autosuspend(drm->dev->dev); } else if (ret == 0 || ret == -EINPROGRESS) { /* We've started resuming the GPU already, so * it will handle scheduling a full reprobe diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 84d692d68817..ecb1fc98f758 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -1165,7 +1165,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) /* need to bring up power immediately if opening device */ ret = pm_runtime_get_sync(dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -1197,7 +1197,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) } pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -1231,7 +1231,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) nouveau_cli_fini(cli); kfree(cli); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); drm_dev_exit(dev_index); } @@ -1265,7 +1265,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ret = pm_runtime_get_sync(dev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -1279,7 +1279,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 9ae2cee1c7c5..37814e22d91f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -83,7 +83,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem) ret = pm_runtime_get_sync(dev); if (WARN_ON(ret < 0 && ret != -EACCES)) { - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return; } @@ -93,7 +93,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem) ttm_bo_put(&nvbo->bo); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); } int @@ -121,7 +121,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) ret = pm_runtime_get_sync(dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); goto out; } @@ -131,7 +131,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) else ret = 0; pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); out: ttm_bo_unreserve(&nvbo->bo); return ret; @@ -211,7 +211,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) nouveau_gem_object_unmap(nvbo, vma); pm_runtime_mark_last_busy(dev); } - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); } } ttm_bo_unreserve(&nvbo->bo); From patchwork Fri Oct 4 09:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D72A1CFA755 for ; Fri, 4 Oct 2024 09:41:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B88110E9C9; Fri, 4 Oct 2024 09:41:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="A6Kir43M"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DFC910E9CC; Fri, 4 Oct 2024 09:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034886; x=1759570886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6StNSwM35mQOJbtexHIyrpLz7dSJF2qUthmLq1Chdb8=; b=A6Kir43MMDb2Piw8v8siwqvk5bNW8HwB/BahA8AcYwXbOqtNL3Dow9sB T/BE91jtxH+qeyZbxrwoLP2NksnnyxQatqIGY5RhW1LFeAllKWUDLjg+2 ZPabEKwIWtNwugBHc8gyrxrUvNLZ81ivdm1siKBrJDISW3yE6ybnoVVZ6 adJJ9BsNyN66Fd1M39zuF3beFkKBYca9aLybul3nB4cqrqK3VnQXjN4K9 fveG2vEkrtmoUnlpx2OxQR9gF8mwCBxY4sMJmXcRgedP/1zLnZbOgzlzo f22nk6AAo3L+V6jD0OvL9VbpmjUZFCO6hU8NErv/1Yfxx19n4xNTpUtXO w==; X-CSE-ConnectionGUID: 4cuYTv+NSwGQPUZ6Pqnouw== X-CSE-MsgGUID: zNlNgLAPTE6PDf7p8QMicA== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856232" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856232" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:26 -0700 X-CSE-ConnectionGUID: F8yrWQk5SIKhs2vb8g2dhg== X-CSE-MsgGUID: +ax1NQV+TXqDlTFdovZukQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331932" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:24 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 6D8F711F727; Fri, 4 Oct 2024 12:41:22 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoC-000TXU-1P; Fri, 04 Oct 2024 12:41:12 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , David Airlie , Simona Vetter Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 11/51] drm/radeon: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:12 +0300 Message-Id: <20241004094112.113538-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/gpu/drm/radeon/radeon_acpi.c | 2 +- drivers/gpu/drm/radeon/radeon_connectors.c | 20 ++++++++++---------- drivers/gpu/drm/radeon/radeon_display.c | 6 +++--- drivers/gpu/drm/radeon/radeon_drv.c | 4 ++-- drivers/gpu/drm/radeon/radeon_fbdev.c | 4 ++-- drivers/gpu/drm/radeon/radeon_kms.c | 10 +++++----- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index 22ce61bdfc06..92721df2e43c 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -409,7 +409,7 @@ static int radeon_atif_handler(struct radeon_device *rdev, /* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event(rdev_to_drm(rdev)); pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev); - pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); + __pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); } } /* TODO: check other events */ diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 528a8f3677c2..d6c58af369e5 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -848,7 +848,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -877,7 +877,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -996,7 +996,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1068,7 +1068,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force) out: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -1138,7 +1138,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1156,7 +1156,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -1224,7 +1224,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1414,7 +1414,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) exit: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; @@ -1643,7 +1643,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force) if (!drm_kms_helper_is_poll_worker()) { r = pm_runtime_get_sync(connector->dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); return connector_status_disconnected; } } @@ -1726,7 +1726,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force) out: if (!drm_kms_helper_is_poll_worker()) { pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + __pm_runtime_put_autosuspend(connector->dev->dev); } return ret; diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 8f5f8abcb1b4..3fe641bad5bc 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -634,7 +634,7 @@ radeon_crtc_set_config(struct drm_mode_set *set, ret = pm_runtime_get_sync(dev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } @@ -656,12 +656,12 @@ radeon_crtc_set_config(struct drm_mode_set *set, /* if we have no active crtcs, then drop the power ref we got before */ if (!active && rdev->have_disp_power_ref) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); rdev->have_disp_power_ref = false; } /* drop the power reference we got coming in here */ - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 900b05d8aa5c..ad4431a60508 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -494,14 +494,14 @@ long radeon_drm_ioctl(struct file *filp, dev = file_priv->minor->dev; ret = pm_runtime_get_sync(dev->dev); if (ret < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } ret = drm_ioctl(filp, cmd, arg); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return ret; } diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c index 0aa20c8df546..a302cd3dc8a3 100644 --- a/drivers/gpu/drm/radeon/radeon_fbdev.c +++ b/drivers/gpu/drm/radeon/radeon_fbdev.c @@ -156,7 +156,7 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user) err_pm_runtime_mark_last_busy: pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev); - pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); + __pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); return ret; } @@ -166,7 +166,7 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user) struct radeon_device *rdev = fb_helper->dev->dev_private; pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev); - pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); + __pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev); return 0; } diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 645e33bf7947..265912c96232 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -171,7 +171,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) pm_runtime_set_active(dev->dev); pm_runtime_allow(dev->dev); pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } out: @@ -635,7 +635,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) r = pm_runtime_get_sync(dev->dev); if (r < 0) { - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -678,7 +678,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) } pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return 0; err_vm_fini: @@ -688,7 +688,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) err_suspend: pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); return r; } @@ -738,7 +738,7 @@ void radeon_driver_postclose_kms(struct drm_device *dev, file_priv->driver_priv = NULL; } pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + __pm_runtime_put_autosuspend(dev->dev); } /* From patchwork Fri Oct 4 09:41:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9329CFA74C for ; Fri, 4 Oct 2024 09:41:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 298B710E9C2; Fri, 4 Oct 2024 09:41:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gdPP5X4+"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id C776910E9CC for ; Fri, 4 Oct 2024 09:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034887; x=1759570887; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j7sPlG4N95eUNYngpMoe8l5ATZ3EuQND1WAujk61OGA=; b=gdPP5X4+GYviqONkRfTWTyrWCydnSuSFjH9sfgY3PNzsXbzoxmh6dRaW QtXoebreF0hgrcxRsZQCXRTlpeu1/0ZE/vn3ghCUZJn3nwI08i9E+aCdB +rrkGvRinHPLv1ZoR4Rq00vmILanXDMSqOOsqR8G0cE3GsrONZDD2ACxV pN/5Omukp/v63y8Sg/IrZnvNQzoRR1+o5anQkLTE/s4NUioBDkusrHzUQ q4ilyzYJahimu9AGMu48fAbo9XnsiXgQgAB9GaMP+G4zn2hRChBxuwc/d 0+zOrA6TTfeCG2zIgW6HqUK0lBbnDkU3lb1ZeLk4VGAkxiRyTGBkH/AsA g==; X-CSE-ConnectionGUID: yedaZQslReGjgGd3Dvj4oA== X-CSE-MsgGUID: ETBiZ5C1T0mPyElbPyzIYw== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856238" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856238" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:26 -0700 X-CSE-ConnectionGUID: 2+qRRZU0QKG653iOQhZkWA== X-CSE-MsgGUID: eM0ZWME1T5S7B6yj3OiT0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331933" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:24 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 6FF3F11F7E7; Fri, 4 Oct 2024 12:41:22 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoM-000TXj-1Q; Fri, 04 Oct 2024 12:41:22 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Boris Brezillon , Rob Herring , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 12/51] drm/panfrost: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:12 +0300 Message-Id: <20241004094112.113555-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/gpu/drm/panfrost/panfrost_job.c | 4 ++-- drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 ++-- drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 9b8e82fb8bc4..c15ded70a4a3 100644 --- a/drivers/gpu/drm/panfrost/panfrost_job.c +++ b/drivers/gpu/drm/panfrost/panfrost_job.c @@ -474,7 +474,7 @@ static void panfrost_job_handle_err(struct panfrost_device *pfdev, if (signal_fence) dma_fence_signal_locked(job->done_fence); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); if (panfrost_exception_needs_reset(pfdev, js_status)) { atomic_set(&pfdev->reset.pending, 1); @@ -493,7 +493,7 @@ static void panfrost_job_handle_done(struct panfrost_device *pfdev, panfrost_devfreq_record_idle(&pfdev->pfdevfreq); dma_fence_signal_locked(job->done_fence); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); } static void panfrost_job_handle_irq(struct panfrost_device *pfdev, u32 status) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index b91019cd5acb..4c73abb65a1d 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -284,7 +284,7 @@ static void panfrost_mmu_flush_range(struct panfrost_device *pfdev, if (pm_runtime_active(pfdev->dev)) mmu_hw_do_operation(pfdev, mmu, iova, size, AS_COMMAND_FLUSH_PT); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); } static int mmu_map_sg(struct panfrost_device *pfdev, struct panfrost_mmu *mmu, @@ -562,7 +562,7 @@ static void panfrost_mmu_release_ctx(struct kref *kref) pm_runtime_get_noresume(pfdev->dev); if (pm_runtime_active(pfdev->dev)) panfrost_mmu_disable(pfdev, mmu->as); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); clear_bit(mmu->as, &pfdev->as_alloc_mask); clear_bit(mmu->as, &pfdev->as_in_use_mask); diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c index ba9b6e2b2636..9d91cf537b2b 100644 --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c @@ -202,7 +202,7 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev, panfrost_gem_mapping_put(perfcnt->mapping); perfcnt->mapping = NULL; pm_runtime_mark_last_busy(pfdev->dev); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); return 0; } @@ -278,7 +278,7 @@ void panfrost_perfcnt_close(struct drm_file *file_priv) panfrost_perfcnt_disable_locked(pfdev, file_priv); mutex_unlock(&perfcnt->lock); pm_runtime_mark_last_busy(pfdev->dev); - pm_runtime_put_autosuspend(pfdev->dev); + __pm_runtime_put_autosuspend(pfdev->dev); } int panfrost_perfcnt_init(struct panfrost_device *pfdev) From patchwork Fri Oct 4 09:41:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 13821989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6B7CCFA753 for ; Fri, 4 Oct 2024 09:41:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D33610E9CC; Fri, 4 Oct 2024 09:41:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="SL8oDSkj"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2F1E10E9CC for ; Fri, 4 Oct 2024 09:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728034886; x=1759570886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3xjNspXK3jxMBLqy7YizOyjs2GjBbNcnEUxgvbeFtQ8=; b=SL8oDSkjOHw29tZs9dE2H39TM5+mh+Dbzr52/K9xOiHfTJ8w2DglLUPE uER3DIdHRWoBLYa38o0Zv4Gb1dky1PAHkiFx2azYn8jvtJusatzRsYt2u awJ0fkZn1jwiMM/BlLwzy+EUfi4oxUo84acHr3dR9x+jhwRYkruam7dtq Qie2+k6cSSmvVgmK70pe1Fs/LG//SOCroE1yGc33bHPw7LdsUPON84fZR JBVj6uDBep+CHVjVfB7ySpJAq0HHCIsYcKamZRJidzaKms3VOyM/DB/V8 Y/gkcfRbQI0YvTdaSTElYik0+aDsB1eypUDhayXHm9FfMzl7DGXm2DbI/ A==; X-CSE-ConnectionGUID: JWGoe3yvQk+SIGq8YIfUCA== X-CSE-MsgGUID: 2XseBD7PT0GGhWM1pul+iw== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="37856228" X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="37856228" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:26 -0700 X-CSE-ConnectionGUID: k1DoCC5XTt+aYD01V+gWTw== X-CSE-MsgGUID: ch87iJCtQ+Gv0F8617134A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,177,1725346800"; d="scan'208";a="74331934" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 02:41:24 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 8321511FA28; Fri, 4 Oct 2024 12:41:22 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1sweoM-000TY2-1g; Fri, 04 Oct 2024 12:41:22 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 13/51] drivers: drm: Switch to __pm_runtime_put_autosuspend() Date: Fri, 4 Oct 2024 12:41:22 +0300 Message-Id: <20241004094122.113572-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241004094101.113349-1-sakari.ailus@linux.intel.com> References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend(). Signed-off-by: Sakari Ailus --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++-- drivers/gpu/drm/bridge/parade-ps8640.c | 4 ++-- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 14 +++++++------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 12 ++++++------ drivers/gpu/drm/exynos/exynos_drm_fimc.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 6 +++--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- drivers/gpu/drm/imx/dcss/dcss-crtc.c | 2 +- drivers/gpu/drm/lima/lima_sched.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 4 ++-- drivers/gpu/drm/msm/msm_submitqueue.c | 2 +- drivers/gpu/drm/panel/panel-edp.c | 8 ++++---- drivers/gpu/drm/panel/panel-samsung-atna33xc20.c | 6 +++--- drivers/gpu/drm/panel/panel-simple.c | 6 +++--- drivers/gpu/drm/panthor/panthor_device.c | 2 +- drivers/gpu/drm/panthor/panthor_sched.c | 6 +++--- drivers/gpu/drm/tegra/submit.c | 2 +- drivers/gpu/drm/tidss/tidss_drv.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 2 +- 26 files changed, 54 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index bfa88409a7ff..42681a76ee67 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1543,7 +1543,7 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux, ret = analogix_dp_transfer(dp, msg); out: pm_runtime_mark_last_busy(dp->dev); - pm_runtime_put_autosuspend(dp->dev); + __pm_runtime_put_autosuspend(dp->dev); return ret; } diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index a2675b121fe4..f7dd55407ea9 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1521,7 +1521,7 @@ static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux, pm_runtime_get_sync(dev); ret = _anx7625_hpd_polling(ctx, wait_us); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return ret; } @@ -1771,7 +1771,7 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux, ret = anx7625_aux_trans(ctx, msg->request, msg->address, msg->size, msg->buffer); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); mutex_unlock(&ctx->aux_lock); return ret; diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c index 14d4dcf239da..a0faf4bd8866 100644 --- a/drivers/gpu/drm/bridge/parade-ps8640.c +++ b/drivers/gpu/drm/bridge/parade-ps8640.c @@ -200,7 +200,7 @@ static int ps8640_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_u pm_runtime_get_sync(dev); ret = _ps8640_wait_hpd_asserted(ps_bridge, wait_us); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return ret; } @@ -355,7 +355,7 @@ static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux, } ret = ps8640_aux_transfer_msg(aux, msg); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); exit: mutex_unlock(&ps_bridge->aux_lock); diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 9e31f750fd88..06e9e538f351 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -420,7 +420,7 @@ static int status_show(struct seq_file *s, void *data) seq_printf(s, "[0x%02x] = 0x%08x\n", reg, val); } - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); return 0; } @@ -626,7 +626,7 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux, exit: mutex_unlock(&pdata->comms_mutex); pm_runtime_mark_last_busy(pdata->dev); - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); if (ret) return ret; @@ -721,7 +721,7 @@ static int ti_sn_attach_host(struct auxiliary_device *adev, struct ti_sn65dsi86 /* check if continuous dsi clock is required or not */ pm_runtime_get_sync(dev); regmap_read(pdata->regmap, SN_DPPLL_SRC_REG, &val); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); if (!(val & DPPLL_CLK_SRC_DSICLK)) dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS; @@ -1201,7 +1201,7 @@ static enum drm_connector_status ti_sn_bridge_detect(struct drm_bridge *bridge) pm_runtime_get_sync(pdata->dev); regmap_read(pdata->regmap, SN_HPD_DISABLE_REG, &val); - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); return val & HPD_DEBOUNCED_STATE ? connector_status_connected : connector_status_disconnected; @@ -1694,7 +1694,7 @@ static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset) */ pm_runtime_get_sync(pdata->dev); ret = regmap_read(pdata->regmap, SN_GPIO_IO_REG, &val); - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); if (ret) return ret; @@ -1745,7 +1745,7 @@ static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip, * it off and when it comes back it will have lost all state, but * that's OK because the default is input and we're now an input. */ - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); return 0; } @@ -1771,7 +1771,7 @@ static int ti_sn_bridge_gpio_direction_output(struct gpio_chip *chip, SN_GPIO_MUX_OUTPUT << shift); if (ret) { clear_bit(offset, pdata->gchip_output); - pm_runtime_put_autosuspend(pdata->dev); + __pm_runtime_put_autosuspend(pdata->dev); } return ret; diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 7c7f97793ddd..ffcf76af9585 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -896,14 +896,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) mutex_unlock(&gpu->lock); pm_runtime_mark_last_busy(gpu->dev); - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); return 0; fail: pm_runtime_mark_last_busy(gpu->dev); pm_put: - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); return ret; } @@ -1090,7 +1090,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m) pm_runtime_mark_last_busy(gpu->dev); pm_put: - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); return ret; } @@ -1217,7 +1217,7 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events, out_rpm: for (i = 0; i < rpm_count; i++) - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); out: for (i = 0; i < acquired; i++) complete(&gpu->event_free); @@ -1235,7 +1235,7 @@ static void event_free(struct etnaviv_gpu *gpu, unsigned int event) complete(&gpu->event_free); } - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); } /* @@ -1492,7 +1492,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit) mutex_unlock(&gpu->lock); pm_runtime_mark_last_busy(gpu->dev); pm_put: - pm_runtime_put_autosuspend(gpu->dev); + __pm_runtime_put_autosuspend(gpu->dev); } static void dump_mmu_fault(struct etnaviv_gpu *gpu) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 4d7ea65b7dd8..4ad9c39b52aa 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c @@ -968,7 +968,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id) ctx->task = NULL; pm_runtime_mark_last_busy(ctx->dev); - pm_runtime_put_autosuspend(ctx->dev); + __pm_runtime_put_autosuspend(ctx->dev); exynos_drm_ipp_task_done(task, 0); } @@ -1120,7 +1120,7 @@ static void fimc_abort(struct exynos_drm_ipp *ipp, ctx->task = NULL; pm_runtime_mark_last_busy(ctx->dev); - pm_runtime_put_autosuspend(ctx->dev); + __pm_runtime_put_autosuspend(ctx->dev); exynos_drm_ipp_task_done(task, -EIO); } } diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 3a3b2c00e400..cb315077d5f3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -882,7 +882,7 @@ static void g2d_runqueue_worker(struct work_struct *work) if (runqueue_node) { pm_runtime_mark_last_busy(g2d->dev); - pm_runtime_put_autosuspend(g2d->dev); + __pm_runtime_put_autosuspend(g2d->dev); complete(&runqueue_node->complete); if (runqueue_node->async) @@ -1010,7 +1010,7 @@ static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file) * So do this manually here. */ pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); complete(&runqueue_node->complete); if (runqueue_node->async) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 59fa22050717..0a85e746e3f8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -1054,7 +1054,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id) ctx->task = NULL; pm_runtime_mark_last_busy(ctx->dev); - pm_runtime_put_autosuspend(ctx->dev); + __pm_runtime_put_autosuspend(ctx->dev); exynos_drm_ipp_task_done(task, err); } @@ -1127,7 +1127,7 @@ static int gsc_commit(struct exynos_drm_ipp *ipp, ret = gsc_reset(ctx); if (ret) { - pm_runtime_put_autosuspend(ctx->dev); + __pm_runtime_put_autosuspend(ctx->dev); ctx->task = NULL; return ret; } @@ -1157,7 +1157,7 @@ static void gsc_abort(struct exynos_drm_ipp *ipp, ctx->task = NULL; pm_runtime_mark_last_busy(ctx->dev); - pm_runtime_put_autosuspend(ctx->dev); + __pm_runtime_put_autosuspend(ctx->dev); exynos_drm_ipp_task_done(task, -EIO); } } diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 2eb0b701672f..252555003a74 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -108,7 +108,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg) rot->task = NULL; pm_runtime_mark_last_busy(rot->dev); - pm_runtime_put_autosuspend(rot->dev); + __pm_runtime_put_autosuspend(rot->dev); exynos_drm_ipp_task_done(task, irq_status == ROT_IRQ_STATUS_COMPLETE ? 0 : -EINVAL); } diff --git a/drivers/gpu/drm/exynos/exynos_drm_scaler.c b/drivers/gpu/drm/exynos/exynos_drm_scaler.c index 2788105ac780..0be5eaf1335e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c +++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c @@ -439,7 +439,7 @@ static irqreturn_t scaler_irq_handler(int irq, void *arg) scaler->task = NULL; pm_runtime_mark_last_busy(scaler->dev); - pm_runtime_put_autosuspend(scaler->dev); + __pm_runtime_put_autosuspend(scaler->dev); exynos_drm_ipp_task_done(task, scaler_task_done(val)); } diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index a21f5a1c89bc..bceb94f8d2f8 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -304,7 +304,7 @@ static void __intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_runtime_pm_release(rpm, wakelock); pm_runtime_mark_last_busy(kdev); - pm_runtime_put_autosuspend(kdev); + __pm_runtime_put_autosuspend(kdev); } /** @@ -415,7 +415,7 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm) * We drop that here and will reacquire it during unloading in * intel_power_domains_fini(). */ - pm_runtime_put_autosuspend(kdev); + __pm_runtime_put_autosuspend(kdev); } void intel_runtime_pm_disable(struct intel_runtime_pm *rpm) diff --git a/drivers/gpu/drm/imx/dcss/dcss-crtc.c b/drivers/gpu/drm/imx/dcss/dcss-crtc.c index af91e45b5d13..48a4becb92e9 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-crtc.c +++ b/drivers/gpu/drm/imx/dcss/dcss-crtc.c @@ -155,7 +155,7 @@ static void dcss_crtc_atomic_disable(struct drm_crtc *crtc, drm_crtc_vblank_off(crtc); pm_runtime_mark_last_busy(dcss->dev); - pm_runtime_put_autosuspend(dcss->dev); + __pm_runtime_put_autosuspend(dcss->dev); } static const struct drm_crtc_helper_funcs dcss_helper_funcs = { diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index b40c90e97d7e..c7e6e995c01b 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -196,7 +196,7 @@ static void lima_pm_idle(struct lima_device *ldev) /* GPU can do auto runtime suspend */ pm_runtime_mark_last_busy(ldev->dev); - pm_runtime_put_autosuspend(ldev->dev); + __pm_runtime_put_autosuspend(ldev->dev); } static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index cfc74a9e2646..8fc0c9ca14bd 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -110,7 +110,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev) goto err_put_rpm; } - pm_runtime_put_autosuspend(&pdev->dev); + __pm_runtime_put_autosuspend(&pdev->dev); #ifdef CONFIG_DEBUG_FS if (gpu->funcs->debugfs_init) { diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 465a4cd14a43..fbe38f5c1ec8 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -343,7 +343,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_file_private *ctx, pm_runtime_get_sync(&gpu->pdev->dev); ret = adreno_gpu->funcs->get_timestamp(gpu, value); - pm_runtime_put_autosuspend(&gpu->pdev->dev); + __pm_runtime_put_autosuspend(&gpu->pdev->dev); return ret; } diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index a274b8466423..8fcfa7e65848 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -687,7 +687,7 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring, WARN_ON(gpu->active_submits < 0); if (!gpu->active_submits) { msm_devfreq_idle(gpu); - pm_runtime_put_autosuspend(&gpu->pdev->dev); + __pm_runtime_put_autosuspend(&gpu->pdev->dev); } mutex_unlock(&gpu->active_lock); diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index 2a94e82316f9..ea478ab9fdbd 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -213,7 +213,7 @@ static void msm_iommu_tlb_flush_all(void *cookie) pagetable->tlb->tlb_flush_all((void *)adreno_smmu->cookie); - pm_runtime_put_autosuspend(pagetable->iommu_dev); + __pm_runtime_put_autosuspend(pagetable->iommu_dev); } static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size, @@ -229,7 +229,7 @@ static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size, pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie); - pm_runtime_put_autosuspend(pagetable->iommu_dev); + __pm_runtime_put_autosuspend(pagetable->iommu_dev); } static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather, diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c b/drivers/gpu/drm/msm/msm_submitqueue.c index 0e803125a325..4c003c884184 100644 --- a/drivers/gpu/drm/msm/msm_submitqueue.c +++ b/drivers/gpu/drm/msm/msm_submitqueue.c @@ -32,7 +32,7 @@ int msm_file_private_set_sysprof(struct msm_file_private *ctx, /* unwind old value: */ switch (ctx->sysprof) { case 2: - pm_runtime_put_autosuspend(&gpu->pdev->dev); + __pm_runtime_put_autosuspend(&gpu->pdev->dev); fallthrough; case 1: refcount_dec(&gpu->sysprof_active); diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 767e47a2b0c1..0d3b9b9e410d 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -532,7 +532,7 @@ static int panel_edp_prepare(struct drm_panel *panel) ret = pm_runtime_get_sync(panel->dev); if (ret < 0) { - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); return ret; } @@ -614,7 +614,7 @@ static int panel_edp_get_modes(struct drm_panel *panel, } pm_runtime_mark_last_busy(panel->dev); - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); } if (has_hard_coded_modes) @@ -826,7 +826,7 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel) exit: pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); return 0; } @@ -919,7 +919,7 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc, pm_runtime_get_sync(dev); err = drm_panel_dp_aux_backlight(&panel->base, panel->aux); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); /* * Warn if we get an error, but don't consider it fatal. Having diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c index 9a482a744b8c..65e7400adec1 100644 --- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c @@ -213,7 +213,7 @@ static int atana33xc20_prepare(struct drm_panel *panel) ret = pm_runtime_get_sync(panel->dev); if (ret < 0) { - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); return ret; } @@ -237,7 +237,7 @@ static int atana33xc20_get_modes(struct drm_panel *panel, num = drm_edid_connector_add_modes(connector); pm_runtime_mark_last_busy(panel->dev); - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); return num; } @@ -306,7 +306,7 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep) pm_runtime_get_sync(dev); ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux); pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + __pm_runtime_put_autosuspend(dev); /* * Warn if we get an error, but don't consider it fatal. Having diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 86735430462f..b79bab689dae 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -312,7 +312,7 @@ static int panel_simple_unprepare(struct drm_panel *panel) int ret; pm_runtime_mark_last_busy(panel->dev); - ret = pm_runtime_put_autosuspend(panel->dev); + ret = __pm_runtime_put_autosuspend(panel->dev); if (ret < 0) return ret; @@ -346,7 +346,7 @@ static int panel_simple_prepare(struct drm_panel *panel) ret = pm_runtime_get_sync(panel->dev); if (ret < 0) { - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); return ret; } @@ -381,7 +381,7 @@ static int panel_simple_get_modes(struct drm_panel *panel, num += drm_edid_connector_add_modes(connector); pm_runtime_mark_last_busy(panel->dev); - pm_runtime_put_autosuspend(panel->dev); + __pm_runtime_put_autosuspend(panel->dev); } /* add hard-coded panel modes */ diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index 4082c8f2951d..7cf237f21ae1 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -250,7 +250,7 @@ int panthor_device_init(struct panthor_device *ptdev) if (ret) goto err_disable_autosuspend; - pm_runtime_put_autosuspend(ptdev->base.dev); + __pm_runtime_put_autosuspend(ptdev->base.dev); return 0; err_disable_autosuspend: diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index eb9f6635cc12..9d342d660b71 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2412,7 +2412,7 @@ static void tick_work(struct work_struct *work) if (ctx.idle_group_count == ctx.group_count) { panthor_devfreq_record_idle(sched->ptdev); if (sched->pm.has_ref) { - pm_runtime_put_autosuspend(ptdev->base.dev); + __pm_runtime_put_autosuspend(ptdev->base.dev); sched->pm.has_ref = false; } } else { @@ -2437,7 +2437,7 @@ static void tick_work(struct work_struct *work) out_unlock: mutex_unlock(&sched->lock); pm_runtime_mark_last_busy(ptdev->base.dev); - pm_runtime_put_autosuspend(ptdev->base.dev); + __pm_runtime_put_autosuspend(ptdev->base.dev); out_dev_exit: drm_dev_exit(cookie); @@ -3181,7 +3181,7 @@ queue_run_job(struct drm_sched_job *sched_job) out_unlock: mutex_unlock(&sched->lock); pm_runtime_mark_last_busy(ptdev->base.dev); - pm_runtime_put_autosuspend(ptdev->base.dev); + __pm_runtime_put_autosuspend(ptdev->base.dev); return done_fence; } diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 2430fcc97448..d9e8ec2f7a6c 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/tegra/submit.c @@ -503,7 +503,7 @@ static void release_job(struct host1x_job *job) kfree(job_data); pm_runtime_mark_last_busy(client->base.dev); - pm_runtime_put_autosuspend(client->base.dev); + __pm_runtime_put_autosuspend(client->base.dev); } int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data, diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index 2428b9aaa003..95060073cc5c 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -46,7 +46,7 @@ void tidss_runtime_put(struct tidss_device *tidss) pm_runtime_mark_last_busy(tidss->dev); - r = pm_runtime_put_autosuspend(tidss->dev); + r = __pm_runtime_put_autosuspend(tidss->dev); WARN_ON(r < 0); } diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 2423826c89eb..8a21a3a834e3 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -154,7 +154,7 @@ vc4_v3d_pm_put(struct vc4_dev *vc4) mutex_lock(&vc4->power_lock); if (--vc4->power_refcount == 0) { pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev); - pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev); + __pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev); } mutex_unlock(&vc4->power_lock); }