gpu: nvgpu: add a soft dependency on podgov module

The present implementation of podgov driver doesn't
export any symbols and as a result, the dependency
between NVGPU driver and podgov is not established
by depmod. Fix that by adding a soft dependency.

MODULE_SOFTDEP("pre: governor_pod_scaling");

This allows loading the podgov governor before
nvgpu driver.

Bug 3674235

Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Change-Id: Id1959639399042f488cdaa30372feb65d8f21aaa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2740446
(cherry picked from commit e4b3499850)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2741188
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Debarshi Dutta
2022-07-06 14:31:07 +05:30
committed by mobile promotions
parent 7085934303
commit 8cb147aa88
2 changed files with 7 additions and 1 deletions

View File

@@ -2050,6 +2050,9 @@ static void __exit gk20a_exit(void)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif
#ifdef CONFIG_GK20A_DEVFREQ
MODULE_SOFTDEP("pre: governor_pod_scaling_v2");
#endif
MODULE_LICENSE("GPL v2");
module_init(gk20a_init);
module_exit(gk20a_exit);

View File

@@ -441,8 +441,11 @@ void gk20a_scale_init(struct device *dev)
&profile->devfreq_profile,
platform->devfreq_governor, NULL);
if (IS_ERR(devfreq))
if (IS_ERR(devfreq)) {
devfreq = NULL;
} else {
nvgpu_info(g, "enabled scaling for GPU\n");
}
l->devfreq = devfreq;