From nobody Wed Oct 8 00:42:35 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F33F2D027F for ; Fri, 4 Jul 2025 07:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751615665; cv=none; b=b4A5qH9/oWp0zNjDn5rnQU6eEVE4hNy7BFkkgg/ZhUVjRDA2uP/xQ4tcnZ2HI+FR7H4yY0OlJbcMOV/eimXDLMs4Kv0K9ysVNxpGJa46veGokp9oN2XuJRpHV+gqscv6nOftTcSSwic9CyiFWSzGeE3iP6aNXVrljD0Fx//nYzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751615665; c=relaxed/simple; bh=2oLAN0I3MPH743jpOiM312shdseQ1P5Sz0tCpCEQSuw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ROfZLKKINR+Jx1WY+uM9i04jS8yQ6L2QUctarCdw0BXWvbkJy5miKuSceGadYXxVWQ6B9q42oV9xAfa4ibtHu84NJdyhd/QVRd72rqEc2llIioOdiaAOpHlTePkXTqnjcOQNVLz9DVGEr9xCLtsHWQKFZ19yikTIYPbGQ6wti10= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=n0F7qHh3; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="n0F7qHh3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751615663; x=1783151663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2oLAN0I3MPH743jpOiM312shdseQ1P5Sz0tCpCEQSuw=; b=n0F7qHh3aau8cR2om4TYR4dCoriYmQ76iMyTOFwdZqZ+gpQR+M3R4ccC UH27meT+r1xOx8tp5z4mpuzbfN5n6Klr6ldyTT4cCC4t6Iq9HRXLxBn8Y +Z9Hsuuwbh67JWXTX+bT59cSV0Nx5vgC5tI6N7h1Tv/6UAIts94x35D8a sCUkqLkWPpW0JgkbgZgCvQzDAUK/RBoTWNBQvl+EVbdu5oa2r1+Qj+qGs ZbHgPmUH3bdRu5XgsjaixTsHE/y7MNSV/ZhK8TgeIh2P8MN17p0La0W3S f0PraOwAfOpAIyYrgvcZgw1LDAqaVAb795xJIN6hpq6NBbASB0taZIaNK A==; X-CSE-ConnectionGUID: HFDtwWwjQJSYWorJzThk7g== X-CSE-MsgGUID: 2ta+pU0ARhGp41bj15HT2A== X-IronPort-AV: E=McAfee;i="6800,10657,11483"; a="76494595" X-IronPort-AV: E=Sophos;i="6.16,286,1744095600"; d="scan'208";a="76494595" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2025 00:54:22 -0700 X-CSE-ConnectionGUID: RhFtQ7PRQl6VBE4/Qd22QQ== X-CSE-MsgGUID: fBIQ85yES5ehhaXU4RLS3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,286,1744095600"; d="scan'208";a="158924260" Received: from jkrzyszt-mobl2.ger.corp.intel.com (HELO svinhufvud.fi.intel.com) ([10.245.244.244]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2025 00:54:11 -0700 Received: from svinhufvud.lan (localhost [IPv6:::1]) by svinhufvud.fi.intel.com (Postfix) with ESMTP id 8B01D44419; Fri, 4 Jul 2025 10:54:09 +0300 (EEST) Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , 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 , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Ma Ke , Yang Wang , Jesse Zhang , Lijo Lazar , Sathishkumar S , =?UTF-8?q?Andr=C3=A9=20Almeida?= , Hamza Mahfooz , Thomas Zimmermann , Tim Huang , =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= , 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@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/80] drm/amd: Remove redundant pm_runtime_mark_last_busy() calls Date: Fri, 4 Jul 2025 10:54:09 +0300 Message-Id: <20250704075409.3217885-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250704075225.3212486-1-sakari.ailus@linux.intel.com> References: <20250704075225.3212486-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- The cover letter of the set can be found here . 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 *ad= ev, 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/d= rm/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 *conn= ector, bool force) amdgpu_connector_update_scratch_regs(connector, ret); =20 if (!drm_kms_helper_is_poll_worker()) { - pm_runtime_mark_last_busy(connector->dev->dev); pm_runtime_put_autosuspend(connector->dev->dev); } =20 @@ -923,7 +922,6 @@ amdgpu_connector_vga_detect(struct drm_connector *conne= ctor, bool force) =20 out: if (!drm_kms_helper_is_poll_worker()) { - pm_runtime_mark_last_busy(connector->dev->dev); pm_runtime_put_autosuspend(connector->dev->dev); } =20 @@ -1150,7 +1148,6 @@ amdgpu_connector_dvi_detect(struct drm_connector *con= nector, bool force) =20 exit: if (!drm_kms_helper_is_poll_worker()) { - pm_runtime_mark_last_busy(connector->dev->dev); pm_runtime_put_autosuspend(connector->dev->dev); } =20 @@ -1450,7 +1447,6 @@ amdgpu_connector_dp_detect(struct drm_connector *conn= ector, 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); } =20 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, st= ruct file *f, if (use_bank) { if ((sh_bank !=3D 0xFFFFFFFF && sh_bank >=3D adev->gfx.config.max_sh_per= _se) || (se_bank !=3D 0xFFFFFFFF && se_bank >=3D 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, st= ruct file *f, if (pm_pg_lock) mutex_unlock(&adev->pm.mutex); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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 !=3D 0xFFFFFFFF && rd->id.grbm.sh >=3D adev->gfx.con= fig.max_sh_per_se) || (rd->id.grbm.se !=3D 0xFFFFFFFF && rd->id.grbm.se >=3D adev->gfx.con= fig.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 =20 mutex_unlock(&rd->lock); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 if (!x) { @@ -557,7 +552,6 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct fil= e *f, char __user *buf, =20 r =3D 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 fi= le *f, const char __user =20 r =3D 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 fil= e *f, char __user *buf, =20 r =3D 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 fi= le *f, const char __user =20 r =3D 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, =20 r =3D 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 fil= e *f, const char __user * =20 r =3D 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, =20 r =3D amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 while (size) { @@ -1266,7 +1252,6 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(s= truct file *f, char __user =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1315,7 +1300,6 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(= struct file *f, const char =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1365,7 +1349,6 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struc= t file *f, char __user *buf =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1414,7 +1397,6 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct fil= e *f, const char __user *bu =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1460,7 +1442,6 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file= *f, char __user *buf, =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1501,7 +1482,6 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(stru= ct file *f, char __user *bu =20 r =3D result; out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 return r; @@ -1701,7 +1681,6 @@ static int amdgpu_debugfs_test_ib_show(struct seq_fil= e *m, void *unused) =20 up_write(&adev->reset_domain->sem); =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 return 0; @@ -1721,7 +1700,6 @@ static int amdgpu_debugfs_evict_vram(void *data, u64 = *val) =20 *val =3D amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM); =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 return 0; @@ -1742,7 +1720,6 @@ static int amdgpu_debugfs_evict_gtt(void *data, u64 *= val) =20 *val =3D amdgpu_ttm_evict_resources(adev, TTM_PL_TT); =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 return 0; @@ -1762,7 +1739,6 @@ static int amdgpu_debugfs_benchmark(void *data, u64 v= al) =20 r =3D amdgpu_benchmark(adev, val); =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 return r; @@ -2014,7 +1990,6 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 va= l) ret =3D -EINVAL; =20 out: - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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 =3D true; =20 - pm_runtime_mark_last_busy(dev->dev); - adev =3D 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, =20 pm_runtime_allow(ddev->dev); =20 - pm_runtime_mark_last_busy(ddev->dev); pm_runtime_put_autosuspend(ddev->dev); =20 pci_wake_from_d3(pdev, TRUE); @@ -2907,7 +2905,6 @@ static int amdgpu_pmops_runtime_idle(struct device *d= ev) =20 ret =3D 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, =20 ret =3D drm_ioctl(filp, cmd, arg); =20 - 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/am= d/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) =20 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 !=3D seq); =20 @@ -920,7 +919,6 @@ static int gpu_recover_get(void *data, u64 *val) =20 *val =3D atomic_read(&adev->reset_domain->reset_res); =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 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(stru= ct device *dev, =20 ret =3D amdgpu_gfx_run_cleaner_shader(adev, value); =20 - pm_runtime_mark_last_busy(ddev->dev); pm_runtime_put_autosuspend(ddev->dev); =20 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, st= ruct drm_file *file_priv) kfree(fpriv); =20 out_suspend: - pm_runtime_mark_last_busy(dev->dev); pm_put: pm_runtime_put_autosuspend(dev->dev); =20 @@ -1521,7 +1520,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *d= ev, kfree(fpriv); file_priv->driver_priv =3D NULL; =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); } =20 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, } =20 amdgpu_gfx_off_ctrl(adev, true); - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 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); } =20 - 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/gp= u/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(struc= t file *f, const char __u dev_err(adev->dev, "Invalid input: %s\n", str); } =20 - pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); =20 return size; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/am= d/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_i= d) amdgpu_userq_cleanup(uq_mgr, queue, queue_id); mutex_unlock(&uq_mgr->userq_mutex); =20 - pm_runtime_mark_last_busy(adev_to_drm(adev)->dev); pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); =20 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_proce= ss *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 =3D false; } diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/am= dgpu_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); } =20 --=20 2.39.5