From 15f9feb5646c7750f0a19a7bd07bc4627b2322d8 Mon Sep 17 00:00:00 2001 From: Vamsee Vardhan Thummala Date: Mon, 17 Mar 2025 16:24:31 +0000 Subject: [PATCH] drm/tegra: Remove PM from virtual engine Remove power management functionality from virtual engine driver as it's no longer needed. This includes suspend/resume operations and PM ops structure. The driver now relies on system's default power management behavior. Jira HOSTX-5933 Change-Id: I092bfa8e2a01345e149ff2c04ed526a0aa7a0944 Signed-off-by: Vamsee Vardhan Thummala Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322473 Reviewed-by: Mikko Perttunen GVS: buildbot_gerritrpt --- drivers/gpu/drm/tegra/virt.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/drivers/gpu/drm/tegra/virt.c b/drivers/gpu/drm/tegra/virt.c index a1cae941..b4d3fa69 100644 --- a/drivers/gpu/drm/tegra/virt.c +++ b/drivers/gpu/drm/tegra/virt.c @@ -266,28 +266,6 @@ static int virt_engine_connect(struct virt_engine *virt, u32 module_id) return msg.connect.connection_id; } -static int virt_engine_suspend(struct device *dev) -{ - struct virt_engine *virt = dev_get_drvdata(dev); - struct tegra_vhost_cmd_msg msg = { 0 }; - - msg.cmd = TEGRA_VHOST_CMD_SUSPEND; - msg.connection_id = virt->connection_id; - - return virt_engine_transfer(&msg, sizeof(msg)); -} - -static int virt_engine_resume(struct device *dev) -{ - struct virt_engine *virt = dev_get_drvdata(dev); - struct tegra_vhost_cmd_msg msg = { 0 }; - - msg.cmd = TEGRA_VHOST_CMD_RESUME; - msg.connection_id = virt->connection_id; - - return virt_engine_transfer(&msg, sizeof(msg)); -} - #ifdef CONFIG_DEBUG_FS static int mrq_debug_open(struct tegra_bpmp *bpmp, const char *name, u32 *fd, u32 *len, bool write) @@ -880,14 +858,6 @@ static int virt_engine_remove(struct platform_device *pdev) return 0; } -static const struct dev_pm_ops virt_engine_pm_ops = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) - SYSTEM_SLEEP_PM_OPS(virt_engine_suspend, virt_engine_resume) -#else - SET_SYSTEM_SLEEP_PM_OPS(virt_engine_suspend, virt_engine_resume) -#endif -}; - #if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */ static void virt_engine_remove_wrapper(struct platform_device *pdev) { @@ -904,7 +874,6 @@ struct platform_driver tegra_virt_engine_driver = { .driver = { .name = "tegra-host1x-virtual-engine", .of_match_table = tegra_virt_engine_of_match, - .pm = &virt_engine_pm_ops, }, .probe = virt_engine_probe, .remove = virt_engine_remove_wrapper,