dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
@ 2025-07-04  7:53 ` Sakari Ailus
  2025-07-07  8:29   ` Jacek Lawrynowicz
  2025-07-04  7:53 ` [PATCH 02/80] accel/amdxdna: " Sakari Ailus
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:53 UTC (permalink / raw)
  To: Jacek Lawrynowicz, Maciej Falkowski, Oded Gabbay; +Cc: dri-devel, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/accel/ivpu/ivpu_job.c | 1 -
 drivers/accel/ivpu/ivpu_pm.c  | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c
index 060f1fc031d3..05a1a768e1c9 100644
--- a/drivers/accel/ivpu/ivpu_job.c
+++ b/drivers/accel/ivpu/ivpu_job.c
@@ -1049,6 +1049,5 @@ void ivpu_context_abort_work_fn(struct work_struct *work)
 	mutex_unlock(&vdev->submitted_jobs_lock);
 
 runtime_put:
-	pm_runtime_mark_last_busy(vdev->drm.dev);
 	pm_runtime_put_autosuspend(vdev->drm.dev);
 }
diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
index eacda1dbe840..761b4d7e1a5a 100644
--- a/drivers/accel/ivpu/ivpu_pm.c
+++ b/drivers/accel/ivpu/ivpu_pm.c
@@ -359,7 +359,6 @@ 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);
 }
 
@@ -428,7 +427,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	struct device *dev = vdev->drm.dev;
 
 	pm_runtime_allow(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/80] accel/amdxdna: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
  2025-07-04  7:53 ` [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
@ 2025-07-04  7:53 ` Sakari Ailus
  2025-07-07 16:52   ` Lizhi Hou
  2025-07-04  7:54 ` [PATCH 16/80] drm/amd: " Sakari Ailus
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:53 UTC (permalink / raw)
  To: Min Ma, Lizhi Hou, Oded Gabbay; +Cc: dri-devel, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/accel/amdxdna/amdxdna_pci_drv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
index f2bf1d374cc7..c7083a657333 100644
--- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
+++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
@@ -101,7 +101,6 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
 failed:
 	kfree(client);
 put_rpm:
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 
 	return ret;
@@ -125,7 +124,6 @@ static void amdxdna_drm_close(struct drm_device *ddev, struct drm_file *filp)
 
 	XDNA_DBG(xdna, "pid %d closed", client->pid);
 	kfree(client);
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 }
 
@@ -296,7 +294,6 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto failed_sysfs_fini;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return 0;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 16/80] drm/amd: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
  2025-07-04  7:53 ` [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
  2025-07-04  7:53 ` [PATCH 02/80] accel/amdxdna: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  7:54 ` [PATCH 17/80] drm/nouveau: " Sakari Ailus
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter,
	Felix Kuehling, Kenneth Feng, Mario Limonciello, Alex Hung,
	Antonio Quartulli, Pratap Nirujogi, Sakari Ailus, Liviu Dudau,
	Harry Wentland, Dmitry Baryshkov, Jani Nikula,
	Thomas Weißschuh, Ma Ke, Yang Wang, Jesse Zhang, Lijo Lazar,
	Sathishkumar S, André Almeida, Hamza Mahfooz,
	Thomas Zimmermann, Tim Huang, Marek Olšák, Ingo Molnar,
	Thomas Gleixner, Asad Kamal, Srinivasan Shanmugam, Jack Xiao,
	Prike Liang, Shashank Sharma, Victor Skvortsov, Hawking Zhang,
	Tao Zhou, ganglxie, YiPeng Chai, Arunpravin Paneer Selvam
  Cc: amd-gfx, dri-devel, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 25 -------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  1 -
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |  1 -
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  1 -
 14 files changed, 47 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index f5466c592d94..9e4f135b9173 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -507,7 +507,6 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
 				pm_runtime_get_sync(adev_to_drm(adev)->dev);
 				/* 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);
 			}
 		}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index 5e375e9c4f5d..7220ecb93ff7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -738,7 +738,6 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 	amdgpu_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -923,7 +922,6 @@ 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);
 	}
 
@@ -1150,7 +1148,6 @@ 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);
 	}
 
@@ -1450,7 +1447,6 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 	amdgpu_connector_update_scratch_regs(connector, ret);
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 83f211903425..2c724e8354de 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -129,7 +129,6 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	if (use_bank) {
 		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);
 			amdgpu_virt_disable_access_debugfs(adev);
 			return -EINVAL;
@@ -179,7 +178,6 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	if (pm_pg_lock)
 		mutex_unlock(&adev->pm.mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	amdgpu_virt_disable_access_debugfs(adev);
@@ -255,7 +253,6 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 	if (rd->id.use_grbm) {
 		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);
 			amdgpu_virt_disable_access_debugfs(adev);
 			mutex_unlock(&rd->lock);
@@ -310,7 +307,6 @@ 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);
 
 	amdgpu_virt_disable_access_debugfs(adev);
@@ -446,7 +442,6 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, rd->id.xcc_id);
 	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);
 
 	if (!x) {
@@ -557,7 +552,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -617,7 +611,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -676,7 +669,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -736,7 +728,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -795,7 +786,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -855,7 +845,6 @@ 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);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -1003,7 +992,6 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
 
 	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);
 
 	if (r) {
@@ -1094,7 +1082,6 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf,
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0);
 	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);
 
 	if (!x) {
@@ -1192,7 +1179,6 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0);
 	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);
 
 	while (size) {
@@ -1266,7 +1252,6 @@ 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);
 
 	return r;
@@ -1315,7 +1300,6 @@ 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);
 
 	return r;
@@ -1365,7 +1349,6 @@ 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);
 
 	return r;
@@ -1414,7 +1397,6 @@ 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);
 
 	return r;
@@ -1460,7 +1442,6 @@ 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);
 
 	return r;
@@ -1501,7 +1482,6 @@ 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);
 
 	return r;
@@ -1701,7 +1681,6 @@ 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);
 
 	return 0;
@@ -1721,7 +1700,6 @@ static int amdgpu_debugfs_evict_vram(void *data, u64 *val)
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
@@ -1742,7 +1720,6 @@ static int amdgpu_debugfs_evict_gtt(void *data, u64 *val)
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_TT);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
@@ -1762,7 +1739,6 @@ static int amdgpu_debugfs_benchmark(void *data, u64 val)
 
 	r = amdgpu_benchmark(adev, val);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
@@ -2014,7 +1990,6 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val)
 		ret = -EINVAL;
 
 out:
-	pm_runtime_mark_last_busy(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 9e463d3ee927..d5844fee7204 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -332,8 +332,6 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 		if (crtc->enabled)
 			active = true;
 
-	pm_runtime_mark_last_busy(dev->dev);
-
 	adev = drm_to_adev(dev);
 	/* if we have active crtcs and we don't have a power ref,
 	 * take the current one
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index b299e15bb5e5..24edb5a327c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2228,7 +2228,6 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev)
 						adev->pdev->bus->number, i);
 		if (p) {
 			pm_runtime_get_sync(&p->dev);
-			pm_runtime_mark_last_busy(&p->dev);
 			pm_runtime_put_autosuspend(&p->dev);
 			pci_dev_put(p);
 		}
@@ -2469,7 +2468,6 @@ 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);
 
 		pci_wake_from_d3(pdev, TRUE);
@@ -2907,7 +2905,6 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
 
 	ret = amdgpu_runtime_idle_check_userq(dev);
 done:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	return ret;
 }
@@ -2926,7 +2923,6 @@ long amdgpu_drm_ioctl(struct file *filp,
 
 	ret = drm_ioctl(filp, cmd, arg);
 
-	pm_runtime_mark_last_busy(dev->dev);
 out:
 	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 2c3547f4cea4..5e52ac2f9206 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -267,7 +267,6 @@ 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);
 	} while (last_seq != seq);
 
@@ -920,7 +919,6 @@ 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);
 
 	return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index c80c8f543532..c922e141f4c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1594,7 +1594,6 @@ static ssize_t amdgpu_gfx_set_run_cleaner_shader(struct device *dev,
 
 	ret = amdgpu_gfx_run_cleaner_shader(adev, value);
 
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 195ed81d39ff..c7233f30a29f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1450,7 +1450,6 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	kfree(fpriv);
 
 out_suspend:
-	pm_runtime_mark_last_busy(dev->dev);
 pm_put:
 	pm_runtime_put_autosuspend(dev->dev);
 
@@ -1521,7 +1520,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 	kfree(fpriv);
 	file_priv->driver_priv = NULL;
 
-	pm_runtime_mark_last_busy(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..bacf888735db 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c
@@ -101,7 +101,6 @@ 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);
 
 	return size;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index dd37d8815ba5..258acce7db8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -3869,7 +3869,6 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
 		atomic_set(&con->ras_ue_count, ue_count);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 Out:
 	pm_runtime_put_autosuspend(dev->dev);
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
index 41ebe690eeff..3739be1b71e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
@@ -159,7 +159,6 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 		dev_err(adev->dev, "Invalid input: %s\n", str);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 295e7186e156..5e939ea8ea42 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -322,7 +322,6 @@ amdgpu_userq_destroy(struct drm_file *filp, int queue_id)
 	amdgpu_userq_cleanup(uq_mgr, queue, queue_id);
 	mutex_unlock(&uq_mgr->userq_mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 5be28c6c4f6a..04b1abd8e80a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -1083,7 +1083,6 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
 		 * for auto suspend
 		 */
 		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);
 			pdd->runtime_inuse = false;
 		}
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index edd9895b46c0..728b3982df57 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -172,7 +172,6 @@ static int amdgpu_pm_get_access_if_active(struct amdgpu_device *adev)
  */
 static inline void amdgpu_pm_put_access(struct amdgpu_device *adev)
 {
-	pm_runtime_mark_last_busy(adev->dev);
 	pm_runtime_put_autosuspend(adev->dev);
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 17/80] drm/nouveau: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
                   ` (2 preceding siblings ...)
  2025-07-04  7:54 ` [PATCH 16/80] drm/amd: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  9:24   ` Danilo Krummrich
  2025-07-04  7:54 ` [PATCH 19/80] drm/panfrost: " Sakari Ailus
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich, David Airlie, Simona Vetter,
	Ben Skeggs, Dave Airlie, Thomas Zimmermann, Jani Nikula,
	Gustavo A. R. Silva, Dmitry Baryshkov, Suraj Kandpal
  Cc: dri-devel, nouveau, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/gpu/drm/nouveau/dispnv50/disp.c     | 2 --
 drivers/gpu/drm/nouveau/nouveau_connector.c | 1 -
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   | 1 -
 drivers/gpu/drm/nouveau/nouveau_display.c   | 1 -
 drivers/gpu/drm/nouveau/nouveau_drm.c       | 4 ----
 drivers/gpu/drm/nouveau/nouveau_gem.c       | 3 ---
 6 files changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index e97e39abf3a2..682d21a8a82d 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1222,7 +1222,6 @@ nv50_mstc_detect(struct drm_connector *connector,
 		goto out;
 
 out:
-	pm_runtime_mark_last_busy(connector->dev->dev);
 	pm_runtime_put_autosuspend(connector->dev->dev);
 	return ret;
 }
@@ -2411,7 +2410,6 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
 	drm_atomic_state_put(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);
 }
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 63621b1510f6..7d0c5e42d1dd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -673,7 +673,6 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 	if (!nv_connector->edid)
 		drm_dp_cec_unset_edid(&nv_connector->aux);
 
-	pm_runtime_mark_last_busy(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 200e65a7cefc..40eedb349c6c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -62,7 +62,6 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 	seq_printf(m, "0x%08x\n",
 		   nvif_rd32(&drm->client.device.object, 0x101000));
 
-	pm_runtime_mark_last_busy(drm->dev->dev);
 	pm_runtime_put_autosuspend(drm->dev->dev);
 
 	return 0;
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index c50ec347b30a..c74f5ef315a7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -495,7 +495,6 @@ nouveau_display_hpd_work(struct work_struct *work)
 	if (first_changed_connector)
 		drm_connector_put(first_changed_connector);
 
-	pm_runtime_mark_last_busy(dev->dev);
 noop:
 	pm_runtime_put_autosuspend(dev->dev);
 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 0c82a63cd49d..1dccd4af1bea 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1177,7 +1177,6 @@ nouveau_pmops_runtime_idle(struct device *dev)
 		return -EBUSY;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
 	return 1;
@@ -1224,7 +1223,6 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 		kfree(cli);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
@@ -1258,7 +1256,6 @@ 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);
 	drm_dev_exit(dev_index);
 }
@@ -1306,7 +1303,6 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(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 690e10fbf0bd..d0f034b4a67c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -89,7 +89,6 @@ 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);
 }
 
@@ -127,7 +126,6 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 		ret = nouveau_vma_new(nvbo, vmm, &vma);
 	else
 		ret = 0;
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 out:
 	ttm_bo_unreserve(&nvbo->bo);
@@ -206,7 +204,6 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
 			ret = pm_runtime_get_sync(dev);
 			if (!WARN_ON(ret < 0 && ret != -EACCES)) {
 				nouveau_gem_object_unmap(nvbo, vma);
-				pm_runtime_mark_last_busy(dev);
 			}
 			pm_runtime_put_autosuspend(dev);
 		}
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 18/80] drm/radeon: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
                   ` (4 preceding siblings ...)
  2025-07-04  7:54 ` [PATCH 19/80] drm/panfrost: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
  6 siblings, 0 replies; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/gpu/drm/radeon/radeon_acpi.c       | 1 -
 drivers/gpu/drm/radeon/radeon_connectors.c | 5 -----
 drivers/gpu/drm/radeon/radeon_display.c    | 2 --
 drivers/gpu/drm/radeon/radeon_drv.c        | 2 --
 drivers/gpu/drm/radeon/radeon_fbdev.c      | 2 --
 drivers/gpu/drm/radeon/radeon_kms.c        | 4 ----
 6 files changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index 22ce61bdfc06..08f8ba4fd148 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -408,7 +408,6 @@ static int radeon_atif_handler(struct radeon_device *rdev,
 			pm_runtime_get_sync(rdev_to_drm(rdev)->dev);
 			/* 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);
 		}
 	}
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 9f6a3df951ba..7a4f05dbd6f7 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -876,7 +876,6 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 	radeon_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1067,7 +1066,6 @@ 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);
 	}
 
@@ -1155,7 +1153,6 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 	radeon_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1403,7 +1400,6 @@ 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);
 	}
 
@@ -1715,7 +1711,6 @@ 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);
 	}
 
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 8f5f8abcb1b4..89c3f83561d6 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -644,8 +644,6 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 		if (crtc->enabled)
 			active = true;
 
-	pm_runtime_mark_last_busy(dev->dev);
-
 	rdev = dev->dev_private;
 	/* if we have active crtcs and we don't have a power ref,
 	   take the current one */
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 88e821d67af7..d0af0cef178a 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -477,7 +477,6 @@ static int radeon_pmops_runtime_idle(struct device *dev)
 		}
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
 	return 1;
@@ -499,7 +498,6 @@ long radeon_drm_ioctl(struct file *filp,
 
 	ret = drm_ioctl(filp, cmd, arg);
 
-	pm_runtime_mark_last_busy(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 d4a58bd679db..419fcad8d283 100644
--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
+++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
@@ -155,7 +155,6 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user)
 	return 0;
 
 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);
 	return ret;
 }
@@ -165,7 +164,6 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user)
 	struct drm_fb_helper *fb_helper = info->par;
 	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);
 
 	return 0;
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 645e33bf7947..3144890b6007 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -170,7 +170,6 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		pm_runtime_set_autosuspend_delay(dev->dev, 5000);
 		pm_runtime_set_active(dev->dev);
 		pm_runtime_allow(dev->dev);
-		pm_runtime_mark_last_busy(dev->dev);
 		pm_runtime_put_autosuspend(dev->dev);
 	}
 
@@ -677,7 +676,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 		file_priv->driver_priv = fpriv;
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return 0;
 
@@ -687,7 +685,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	kfree(fpriv);
 
 err_suspend:
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return r;
 }
@@ -737,7 +734,6 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
 		kfree(fpriv);
 		file_priv->driver_priv = NULL;
 	}
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 19/80] drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
                   ` (3 preceding siblings ...)
  2025-07-04  7:54 ` [PATCH 17/80] drm/nouveau: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  9:18   ` Steven Price
  2025-07-04  7:54 ` [PATCH 18/80] drm/radeon: " Sakari Ailus
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
  6 siblings, 1 reply; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
index 563f16bae543..0dd62e8b2fa7 100644
--- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
+++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
@@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
@@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 	if (perfcnt->user == pfile)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
       [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
                   ` (5 preceding siblings ...)
  2025-07-04  7:54 ` [PATCH 18/80] drm/radeon: " Sakari Ailus
@ 2025-07-04  7:54 ` Sakari Ailus
  2025-07-04  8:11   ` Jani Nikula
                     ` (5 more replies)
  6 siblings, 6 replies; 18+ messages in thread
From: Sakari Ailus @ 2025-07-04  7:54 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
	Lucas Stach, Russell King, Christian Gmeiner, Inki Dae,
	Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	Laurentiu Palcu, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Qiang Yu, Jessica Zhang, Boris Brezillon,
	Steven Price, Liviu Dudau, Thierry Reding, Mikko Perttunen,
	Jonathan Hunter, Jyri Sarha, Tomi Valkeinen, Dave Stevenson,
	Maíra Canal, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija, Luca Ceresoli,
	Uwe Kleine-König, Chen-Yu Tsai
  Cc: dri-devel, linux-kernel, etnaviv, linux-arm-kernel,
	linux-samsung-soc, intel-gfx, imx, lima, linux-tegra

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.

In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
 drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
 drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
 drivers/gpu/drm/lima/lima_sched.c                  | 1 -
 drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
 drivers/gpu/drm/panel/panel-simple.c               | 2 --
 drivers/gpu/drm/panthor/panthor_sched.c            | 2 --
 drivers/gpu/drm/tegra/submit.c                     | 1 -
 drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
 drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
 20 files changed, 36 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index a1bc3e96dd35..2f815e2e02ca 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1452,7 +1452,6 @@ 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);
 
 	return ret;
@@ -1472,7 +1471,6 @@ static int analogix_dpaux_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned lon
 	ret = readx_poll_timeout(analogix_dp_get_plug_in_status, dp, val, !val,
 				 wait_us / 100, wait_us);
 
-	pm_runtime_mark_last_busy(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 0ac4a82c5a6e..9577409a2eb2 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1520,7 +1520,6 @@ 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);
 
 	return ret;
@@ -1770,7 +1769,6 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
 	if (!ret)
 		ret = anx7625_aux_trans(ctx, msg->request, msg->address,
 					msg->size, msg->buffer);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&ctx->aux_lock);
 
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index 825777a5758f..4f46ce2c908e 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -198,7 +198,6 @@ 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);
 
 	return ret;
@@ -353,7 +352,6 @@ static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux,
 		goto exit;
 	}
 	ret = ps8640_aux_transfer_msg(aux, msg);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 exit:
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index db5cc4030238..fc100d4a6276 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -587,7 +587,6 @@ 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);
 
 	if (ret)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index cf0d9049bcf1..bc5a94dba2d4 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -916,13 +916,11 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	etnaviv_gpu_hw_init(gpu);
 	mutex_unlock(&gpu->lock);
 
-	pm_runtime_mark_last_busy(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);
 
@@ -1109,7 +1107,6 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
 
 	ret = 0;
 
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 
@@ -1509,7 +1506,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
 	etnaviv_gpu_hw_init(gpu);
 
 	mutex_unlock(&gpu->lock);
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 09e33a26caaf..13ce35443206 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -967,7 +967,6 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, 0);
 	}
@@ -1119,7 +1118,6 @@ static void fimc_abort(struct exynos_drm_ipp *ipp,
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(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 d32f2474cbaa..58a830ffdcd7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -881,7 +881,6 @@ static void g2d_runqueue_worker(struct work_struct *work)
 	g2d->runqueue_node = NULL;
 
 	if (runqueue_node) {
-		pm_runtime_mark_last_busy(g2d->dev);
 		pm_runtime_put_autosuspend(g2d->dev);
 
 		complete(&runqueue_node->complete);
@@ -1009,7 +1008,6 @@ static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file)
 	 * the IRQ which triggers the PM runtime put().
 	 * So do this manually here.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	complete(&runqueue_node->complete);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index e6d516e1976d..3b02126b7174 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1053,7 +1053,6 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, err);
 	}
@@ -1156,7 +1155,6 @@ static void gsc_abort(struct exynos_drm_ipp *ipp,
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(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 7b0f4a98a70a..06a064f5d8b4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -107,7 +107,6 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
 		struct exynos_drm_ipp_task *task = rot->task;
 
 		rot->task = NULL;
-		pm_runtime_mark_last_busy(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 c8a1b6b0a29c..b59fa9973beb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c
@@ -438,7 +438,6 @@ static irqreturn_t scaler_irq_handler(int irq, void *arg)
 		struct exynos_drm_ipp_task *task = scaler->task;
 
 		scaler->task = NULL;
-		pm_runtime_mark_last_busy(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 7ce3e6de0c19..8e95afced2ce 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -305,7 +305,6 @@ 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);
 }
 
@@ -383,7 +382,6 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
 	dev_pm_set_driver_flags(kdev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
 	pm_runtime_set_autosuspend_delay(kdev, 10000); /* 10s */
-	pm_runtime_mark_last_busy(kdev);
 
 	/*
 	 * Take a permanent reference to disable the RPM functionality and drop
diff --git a/drivers/gpu/drm/imx/dcss/dcss-crtc.c b/drivers/gpu/drm/imx/dcss/dcss-crtc.c
index af91e45b5d13..7ad8dfd4367f 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-crtc.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-crtc.c
@@ -154,7 +154,6 @@ 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);
 }
 
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
index 954f4325b859..267d5b68031d 100644
--- a/drivers/gpu/drm/lima/lima_sched.c
+++ b/drivers/gpu/drm/lima/lima_sched.c
@@ -197,7 +197,6 @@ static void lima_pm_idle(struct lima_device *ldev)
 	lima_devfreq_record_idle(&ldev->devfreq);
 
 	/* GPU can do auto runtime suspend */
-	pm_runtime_mark_last_busy(ldev->dev);
 	pm_runtime_put_autosuspend(ldev->dev);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 3796c41629cc..2de51e3ccca2 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -613,7 +613,6 @@ static int panel_edp_get_modes(struct drm_panel *panel,
 			}
 		}
 
-		pm_runtime_mark_last_busy(panel->dev);
 		pm_runtime_put_autosuspend(panel->dev);
 	}
 
@@ -825,7 +824,6 @@ 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);
 
 	return 0;
@@ -917,7 +915,6 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
 	if (!panel->base.backlight && panel->aux) {
 		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);
 
 		/*
diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
index 20ec27d2d6c2..34a90ea4ba7b 100644
--- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
+++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
@@ -236,7 +236,6 @@ 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);
 
 	return num;
@@ -306,7 +305,6 @@ 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);
 
 	/*
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 3333d4a07504..d6bdee56b32f 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -320,7 +320,6 @@ 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);
 	if (ret < 0)
 		return ret;
@@ -389,7 +388,6 @@ 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);
 	}
 
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index a2248f692a03..f635f26a23f4 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -2446,7 +2446,6 @@ 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);
 
 out_dev_exit:
@@ -3203,7 +3202,6 @@ 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);
 
 	return done_fence;
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 2430fcc97448..5e0e76ebc5be 100644
--- a/drivers/gpu/drm/tegra/submit.c
+++ b/drivers/gpu/drm/tegra/submit.c
@@ -502,7 +502,6 @@ static void release_job(struct host1x_job *job)
 	kfree(job_data->used_mappings);
 	kfree(job_data);
 
-	pm_runtime_mark_last_busy(client->base.dev);
 	pm_runtime_put_autosuspend(client->base.dev);
 }
 
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index a1b12e52aca4..e7e02d6017b4 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -45,8 +45,6 @@ void tidss_runtime_put(struct tidss_device *tidss)
 
 	dev_dbg(tidss->dev, "%s\n", __func__);
 
-	pm_runtime_mark_last_busy(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 bb09df5000bd..11ec7e913974 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -153,7 +153,6 @@ 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);
 	}
 	mutex_unlock(&vc4->power_lock);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
@ 2025-07-04  8:11   ` Jani Nikula
  2025-07-04  8:58   ` Laurent Pinchart
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2025-07-04  8:11 UTC (permalink / raw)
  To: Sakari Ailus, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Douglas Anderson, Lucas Stach, Russell King,
	Christian Gmeiner, Inki Dae, Seung-Woo Kim, Kyungmin Park,
	Krzysztof Kozlowski, Alim Akhtar, Joonas Lahtinen, Rodrigo Vivi,
	Tvrtko Ursulin, Laurentiu Palcu, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Qiang Yu, Jessica Zhang,
	Boris Brezillon, Steven Price, Liviu Dudau, Thierry Reding,
	Mikko Perttunen, Jonathan Hunter, Jyri Sarha, Tomi Valkeinen,
	Dave Stevenson, Maíra Canal, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija, Luca Ceresoli,
	Uwe Kleine-König, Chen-Yu Tsai
  Cc: dri-devel, linux-kernel, etnaviv, linux-arm-kernel,
	linux-samsung-soc, intel-gfx, imx, lima, linux-tegra

On Fri, 04 Jul 2025, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
>
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
>
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1

I would think it's better to wait for linux-pm to get merged to Linus'
tree and then backmerged to drm after -rc1 instead of cross-merging that
directly to drm.

Regardless, for merging the i915 changes via whichever tree,

Acked-by: Jani Nikula <jani.nikula@intel.com>

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
  2025-07-04  8:11   ` Jani Nikula
@ 2025-07-04  8:58   ` Laurent Pinchart
  2025-07-04  9:12   ` Thierry Reding
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Laurent Pinchart @ 2025-07-04  8:58 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Jonas Karlman,
	Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
	Lucas Stach, Russell King, Christian Gmeiner, Inki Dae,
	Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	Laurentiu Palcu, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Qiang Yu, Jessica Zhang, Boris Brezillon,
	Steven Price, Liviu Dudau, Thierry Reding, Mikko Perttunen,
	Jonathan Hunter, Jyri Sarha, Tomi Valkeinen, Dave Stevenson,
	Maíra Canal, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija, Luca Ceresoli,
	Uwe Kleine-König, Chen-Yu Tsai, dri-devel, linux-kernel,
	etnaviv, linux-arm-kernel, linux-samsung-soc, intel-gfx, imx,
	lima, linux-tegra

Hi Sakari,

Thank you for the patch.

On Fri, Jul 04, 2025 at 10:54:13AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
>  drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
>  drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
>  drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
>  drivers/gpu/drm/lima/lima_sched.c                  | 1 -
>  drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
>  drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
>  drivers/gpu/drm/panel/panel-simple.c               | 2 --
>  drivers/gpu/drm/panthor/panthor_sched.c            | 2 --
>  drivers/gpu/drm/tegra/submit.c                     | 1 -
>  drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
>  drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
>  20 files changed, 36 deletions(-)

[snip]

> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index cf0d9049bcf1..bc5a94dba2d4 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -916,13 +916,11 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>  	etnaviv_gpu_hw_init(gpu);
>  	mutex_unlock(&gpu->lock);
>  
> -	pm_runtime_mark_last_busy(gpu->dev);
>  	pm_runtime_put_autosuspend(gpu->dev);
>  
>  	return 0;
>  
>  fail:

You can drop the fail error later and replace it with pm_put.

> -	pm_runtime_mark_last_busy(gpu->dev);
>  pm_put:
>  	pm_runtime_put_autosuspend(gpu->dev);
>  
> @@ -1109,7 +1107,6 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
>  
>  	ret = 0;
>  
> -	pm_runtime_mark_last_busy(gpu->dev);
>  pm_put:
>  	pm_runtime_put_autosuspend(gpu->dev);
>  
> @@ -1509,7 +1506,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
>  	etnaviv_gpu_hw_init(gpu);
>  
>  	mutex_unlock(&gpu->lock);
> -	pm_runtime_mark_last_busy(gpu->dev);
>  pm_put:
>  	pm_runtime_put_autosuspend(gpu->dev);
>  }

[snip]

> diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
> index bb09df5000bd..11ec7e913974 100644
> --- a/drivers/gpu/drm/vc4/vc4_v3d.c
> +++ b/drivers/gpu/drm/vc4/vc4_v3d.c
> @@ -153,7 +153,6 @@ 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);
>  	}

And here you can drop the curly braces. With that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	mutex_unlock(&vc4->power_lock);

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
  2025-07-04  8:11   ` Jani Nikula
  2025-07-04  8:58   ` Laurent Pinchart
@ 2025-07-04  9:12   ` Thierry Reding
  2025-07-04  9:18   ` Steven Price
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Thierry Reding @ 2025-07-04  9:12 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
	Lucas Stach, Russell King, Christian Gmeiner, Inki Dae,
	Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	Laurentiu Palcu, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Qiang Yu, Jessica Zhang, Boris Brezillon,
	Steven Price, Liviu Dudau, Mikko Perttunen, Jonathan Hunter,
	Jyri Sarha, Tomi Valkeinen, Dave Stevenson, Maíra Canal,
	Raspberry Pi Kernel Maintenance, Dmitry Baryshkov, Damon Ding,
	Ayushi Makhija, Luca Ceresoli, Uwe Kleine-König,
	Chen-Yu Tsai, dri-devel, linux-kernel, etnaviv, linux-arm-kernel,
	linux-samsung-soc, intel-gfx, imx, lima, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

On Fri, Jul 04, 2025 at 10:54:13AM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[...]
> diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
> index 2430fcc97448..5e0e76ebc5be 100644
> --- a/drivers/gpu/drm/tegra/submit.c
> +++ b/drivers/gpu/drm/tegra/submit.c
> @@ -502,7 +502,6 @@ static void release_job(struct host1x_job *job)
>  	kfree(job_data->used_mappings);
>  	kfree(job_data);
>  
> -	pm_runtime_mark_last_busy(client->base.dev);
>  	pm_runtime_put_autosuspend(client->base.dev);
>  }
>  

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 19/80] drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 19/80] drm/panfrost: " Sakari Ailus
@ 2025-07-04  9:18   ` Steven Price
  2025-08-15 14:22     ` Steven Price
  0 siblings, 1 reply; 18+ messages in thread
From: Steven Price @ 2025-07-04  9:18 UTC (permalink / raw)
  To: Sakari Ailus, Boris Brezillon, Rob Herring, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 04/07/2025 08:54, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Steven Price <steven.price@arm.com>

But this can't be merged via drm-misc until the PM changes have hit
Linus' tree and been backmerged to drm-misc-next.

Thanks,
Steve

> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> index 563f16bae543..0dd62e8b2fa7 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> @@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
>  	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
>  	panfrost_gem_mapping_put(perfcnt->mapping);
>  	perfcnt->mapping = NULL;
> -	pm_runtime_mark_last_busy(pfdev->dev);
>  	pm_runtime_put_autosuspend(pfdev->dev);
>  
>  	return 0;
> @@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
>  	if (perfcnt->user == pfile)
>  		panfrost_perfcnt_disable_locked(pfdev, file_priv);
>  	mutex_unlock(&perfcnt->lock);
> -	pm_runtime_mark_last_busy(pfdev->dev);
>  	pm_runtime_put_autosuspend(pfdev->dev);
>  }
>  


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
                     ` (2 preceding siblings ...)
  2025-07-04  9:12   ` Thierry Reding
@ 2025-07-04  9:18   ` Steven Price
  2025-07-04 10:24   ` Maíra Canal
  2025-07-08 14:01   ` Luca Ceresoli
  5 siblings, 0 replies; 18+ messages in thread
From: Steven Price @ 2025-07-04  9:18 UTC (permalink / raw)
  To: Sakari Ailus, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Douglas Anderson, Lucas Stach, Russell King,
	Christian Gmeiner, Inki Dae, Seung-Woo Kim, Kyungmin Park,
	Krzysztof Kozlowski, Alim Akhtar, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Tvrtko Ursulin, Laurentiu Palcu, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Qiang Yu,
	Jessica Zhang, Boris Brezillon, Liviu Dudau, Thierry Reding,
	Mikko Perttunen, Jonathan Hunter, Jyri Sarha, Tomi Valkeinen,
	Dave Stevenson, Maíra Canal, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija, Luca Ceresoli,
	Uwe Kleine-König, Chen-Yu Tsai
  Cc: dri-devel, linux-kernel, etnaviv, linux-arm-kernel,
	linux-samsung-soc, intel-gfx, imx, lima, linux-tegra

On 04/07/2025 08:54, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
>  drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
>  drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
>  drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
>  drivers/gpu/drm/lima/lima_sched.c                  | 1 -
>  drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
>  drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
>  drivers/gpu/drm/panel/panel-simple.c               | 2 --
>  drivers/gpu/drm/panthor/panthor_sched.c            | 2 --

Panthor changes are:

Reviewed-by: Steven Price <steven.price@arm.com>

Thanks,
Steve

>  drivers/gpu/drm/tegra/submit.c                     | 1 -
>  drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
>  drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
>  20 files changed, 36 deletions(-)
> 
[...]

> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index a2248f692a03..f635f26a23f4 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2446,7 +2446,6 @@ 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);
>  
>  out_dev_exit:
> @@ -3203,7 +3202,6 @@ 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);
>  
>  	return done_fence;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 17/80] drm/nouveau: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 17/80] drm/nouveau: " Sakari Ailus
@ 2025-07-04  9:24   ` Danilo Krummrich
  0 siblings, 0 replies; 18+ messages in thread
From: Danilo Krummrich @ 2025-07-04  9:24 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Lyude Paul, David Airlie, Simona Vetter, Ben Skeggs, Dave Airlie,
	Thomas Zimmermann, Jani Nikula, Gustavo A. R. Silva,
	Dmitry Baryshkov, Suraj Kandpal, dri-devel, nouveau, linux-kernel

On 7/4/25 9:54 AM, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Danilo Krummrich <dakr@kernel.org>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
                     ` (3 preceding siblings ...)
  2025-07-04  9:18   ` Steven Price
@ 2025-07-04 10:24   ` Maíra Canal
  2025-07-08 14:01   ` Luca Ceresoli
  5 siblings, 0 replies; 18+ messages in thread
From: Maíra Canal @ 2025-07-04 10:24 UTC (permalink / raw)
  To: Sakari Ailus, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Douglas Anderson, Lucas Stach, Russell King,
	Christian Gmeiner, Inki Dae, Seung-Woo Kim, Kyungmin Park,
	Krzysztof Kozlowski, Alim Akhtar, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Tvrtko Ursulin, Laurentiu Palcu, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Qiang Yu,
	Jessica Zhang, Boris Brezillon, Steven Price, Liviu Dudau,
	Thierry Reding, Mikko Perttunen, Jonathan Hunter, Jyri Sarha,
	Tomi Valkeinen, Dave Stevenson, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija, Luca Ceresoli,
	Uwe Kleine-König, Chen-Yu Tsai
  Cc: dri-devel, linux-kernel, etnaviv, linux-arm-kernel,
	linux-samsung-soc, intel-gfx, imx, lima, linux-tegra

Hi Sakari,

On 04/07/25 04:54, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---

[...]

> diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
> index bb09df5000bd..11ec7e913974 100644
> --- a/drivers/gpu/drm/vc4/vc4_v3d.c
> +++ b/drivers/gpu/drm/vc4/vc4_v3d.c
> @@ -153,7 +153,6 @@ 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);
>   	}

Nit: please, drop the curly braces.

>   	mutex_unlock(&vc4->power_lock);

For vc4,

Reviewed-by: Maíra Canal <mcanal@igalia.com>

Best Regards,
- Maíra

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:53 ` [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
@ 2025-07-07  8:29   ` Jacek Lawrynowicz
  0 siblings, 0 replies; 18+ messages in thread
From: Jacek Lawrynowicz @ 2025-07-07  8:29 UTC (permalink / raw)
  To: Sakari Ailus, Maciej Falkowski, Oded Gabbay; +Cc: dri-devel, linux-kernel

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>

On 7/4/2025 9:53 AM, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/accel/ivpu/ivpu_job.c | 1 -
>  drivers/accel/ivpu/ivpu_pm.c  | 2 --
>  2 files changed, 3 deletions(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c
> index 060f1fc031d3..05a1a768e1c9 100644
> --- a/drivers/accel/ivpu/ivpu_job.c
> +++ b/drivers/accel/ivpu/ivpu_job.c
> @@ -1049,6 +1049,5 @@ void ivpu_context_abort_work_fn(struct work_struct *work)
>  	mutex_unlock(&vdev->submitted_jobs_lock);
>  
>  runtime_put:
> -	pm_runtime_mark_last_busy(vdev->drm.dev);
>  	pm_runtime_put_autosuspend(vdev->drm.dev);
>  }
> diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
> index eacda1dbe840..761b4d7e1a5a 100644
> --- a/drivers/accel/ivpu/ivpu_pm.c
> +++ b/drivers/accel/ivpu/ivpu_pm.c
> @@ -359,7 +359,6 @@ 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);
>  }
>  
> @@ -428,7 +427,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
>  	struct device *dev = vdev->drm.dev;
>  
>  	pm_runtime_allow(dev);
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  }
>  


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 02/80] accel/amdxdna: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:53 ` [PATCH 02/80] accel/amdxdna: " Sakari Ailus
@ 2025-07-07 16:52   ` Lizhi Hou
  0 siblings, 0 replies; 18+ messages in thread
From: Lizhi Hou @ 2025-07-07 16:52 UTC (permalink / raw)
  To: Sakari Ailus, Min Ma, Oded Gabbay; +Cc: dri-devel, linux-kernel

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>

On 7/4/25 00:53, Sakari Ailus wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
>
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
>
>          git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                  pm-runtime-6.17-rc1
>
>   drivers/accel/amdxdna/amdxdna_pci_drv.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> index f2bf1d374cc7..c7083a657333 100644
> --- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> @@ -101,7 +101,6 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
>   failed:
>   	kfree(client);
>   put_rpm:
> -	pm_runtime_mark_last_busy(ddev->dev);
>   	pm_runtime_put_autosuspend(ddev->dev);
>   
>   	return ret;
> @@ -125,7 +124,6 @@ static void amdxdna_drm_close(struct drm_device *ddev, struct drm_file *filp)
>   
>   	XDNA_DBG(xdna, "pid %d closed", client->pid);
>   	kfree(client);
> -	pm_runtime_mark_last_busy(ddev->dev);
>   	pm_runtime_put_autosuspend(ddev->dev);
>   }
>   
> @@ -296,7 +294,6 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   		goto failed_sysfs_fini;
>   	}
>   
> -	pm_runtime_mark_last_busy(dev);
>   	pm_runtime_put_autosuspend(dev);
>   	return 0;
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
                     ` (4 preceding siblings ...)
  2025-07-04 10:24   ` Maíra Canal
@ 2025-07-08 14:01   ` Luca Ceresoli
  5 siblings, 0 replies; 18+ messages in thread
From: Luca Ceresoli @ 2025-07-08 14:01 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
	Lucas Stach, Russell King, Christian Gmeiner, Inki Dae,
	Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
	Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	Laurentiu Palcu, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Qiang Yu, Jessica Zhang, Boris Brezillon,
	Steven Price, Liviu Dudau, Thierry Reding, Mikko Perttunen,
	Jonathan Hunter, Jyri Sarha, Tomi Valkeinen, Dave Stevenson,
	Maíra Canal, Raspberry Pi Kernel Maintenance,
	Dmitry Baryshkov, Damon Ding, Ayushi Makhija,
	Uwe Kleine-König, Chen-Yu Tsai, dri-devel, linux-kernel,
	etnaviv, linux-arm-kernel, linux-samsung-soc, intel-gfx, imx,
	lima, linux-tegra

On Fri,  4 Jul 2025 10:54:13 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> wrote:

> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

With the cleanups required by Laurent and Maíra:

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 19/80] drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls
  2025-07-04  9:18   ` Steven Price
@ 2025-08-15 14:22     ` Steven Price
  0 siblings, 0 replies; 18+ messages in thread
From: Steven Price @ 2025-08-15 14:22 UTC (permalink / raw)
  To: Sakari Ailus, Boris Brezillon, Rob Herring, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 04/07/2025 10:18, Steven Price wrote:
> On 04/07/2025 08:54, Sakari Ailus wrote:
>> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
>> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
>> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
>> pm_runtime_mark_last_busy().
>>
>> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> 
> Reviewed-by: Steven Price <steven.price@arm.com>
> 
> But this can't be merged via drm-misc until the PM changes have hit
> Linus' tree and been backmerged to drm-misc-next.

The back merged of -rc1 happened, so I've now merged this to drm-misc-next.

Thanks,
Steve

> Thanks,
> Steve
> 
>> ---
>> The cover letter of the set can be found here
>> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
>>
>> In brief, this patch depends on PM runtime patches adding marking the last
>> busy timestamp in autosuspend related functions. The patches are here, on
>> rc2:
>>
>>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>>                 pm-runtime-6.17-rc1
>>
>>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
>> index 563f16bae543..0dd62e8b2fa7 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
>> @@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
>>  	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
>>  	panfrost_gem_mapping_put(perfcnt->mapping);
>>  	perfcnt->mapping = NULL;
>> -	pm_runtime_mark_last_busy(pfdev->dev);
>>  	pm_runtime_put_autosuspend(pfdev->dev);
>>  
>>  	return 0;
>> @@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
>>  	if (perfcnt->user == pfile)
>>  		panfrost_perfcnt_disable_locked(pfdev, file_priv);
>>  	mutex_unlock(&perfcnt->lock);
>> -	pm_runtime_mark_last_busy(pfdev->dev);
>>  	pm_runtime_put_autosuspend(pfdev->dev);
>>  }
>>  
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-08-15 14:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
2025-07-04  7:53 ` [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-07  8:29   ` Jacek Lawrynowicz
2025-07-04  7:53 ` [PATCH 02/80] accel/amdxdna: " Sakari Ailus
2025-07-07 16:52   ` Lizhi Hou
2025-07-04  7:54 ` [PATCH 16/80] drm/amd: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 17/80] drm/nouveau: " Sakari Ailus
2025-07-04  9:24   ` Danilo Krummrich
2025-07-04  7:54 ` [PATCH 19/80] drm/panfrost: " Sakari Ailus
2025-07-04  9:18   ` Steven Price
2025-08-15 14:22     ` Steven Price
2025-07-04  7:54 ` [PATCH 18/80] drm/radeon: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 20/80] drivers: drm: " Sakari Ailus
2025-07-04  8:11   ` Jani Nikula
2025-07-04  8:58   ` Laurent Pinchart
2025-07-04  9:12   ` Thierry Reding
2025-07-04  9:18   ` Steven Price
2025-07-04 10:24   ` Maíra Canal
2025-07-08 14:01   ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).