mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Add powernode support to vgpu
As the normal gpu is powered on by writing one to power-node, the patch is adding power node for vgpu. Change-Id: I08fbbe8694e02c826a0d5692f5a4c0f4efd396ff Signed-off-by: dt <dt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2537053 Reviewed-by: Richard Zhao <rizhao@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -216,6 +216,15 @@ int vgpu_pm_finalize_poweron(struct device *dev)
|
||||
if (err)
|
||||
goto done;
|
||||
|
||||
if (!l->dev_nodes_created) {
|
||||
err = gk20a_user_init(dev);
|
||||
if (err) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
l->dev_nodes_created = true;
|
||||
}
|
||||
|
||||
/* Initialize linux specific flags */
|
||||
gk20a_init_linux_characteristics(g);
|
||||
|
||||
@@ -372,10 +381,6 @@ int vgpu_probe(struct platform_device *pdev)
|
||||
platform->g = gk20a;
|
||||
platform->vgpu_priv = priv;
|
||||
|
||||
err = gk20a_user_init(dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = vgpu_init_support(pdev);
|
||||
if (err != 0) {
|
||||
kfree(l);
|
||||
@@ -410,6 +415,12 @@ int vgpu_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
err = gk20a_power_node_init(dev);
|
||||
if (err) {
|
||||
nvgpu_err(gk20a, "power_node creation failed");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = vgpu_comm_init(gk20a);
|
||||
if (err) {
|
||||
nvgpu_err(gk20a, "failed to init comm interface");
|
||||
@@ -462,7 +473,6 @@ int vgpu_probe(struct platform_device *pdev)
|
||||
gk20a->timeouts_disabled_by_user = false;
|
||||
nvgpu_atomic_set(&gk20a->timeouts_disabled_refcount, 0);
|
||||
gk20a->tsg_dbg_timeslice_max_us = NVGPU_TSG_DBG_TIMESLICE_MAX_US_DEFAULT;
|
||||
|
||||
vgpu_create_sysfs(dev);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user