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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2022-07-06 14:31:07 +05:30
committed by mobile promotions
parent ab32853a65
commit e4b3499850
2 changed files with 7 additions and 1 deletions

View File

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

View File

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