mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Initialize Linux sched in Linux code
Initialize Linux scheduling extensions from Linux code. This removes a dependency between common and Linux code. JIRA NVGPU-259 Change-Id: Ibd882f82479eaac05ecc8cf743dd4a89bd7386f2 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1588663 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e1120727e7
commit
952606b3b9
@@ -249,12 +249,24 @@ free_ref:
|
|||||||
int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp)
|
int nvgpu_ioctl_tsg_dev_open(struct inode *inode, struct file *filp)
|
||||||
{
|
{
|
||||||
struct nvgpu_os_linux *l;
|
struct nvgpu_os_linux *l;
|
||||||
|
struct gk20a *g;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
gk20a_dbg_fn("");
|
||||||
|
|
||||||
l = container_of(inode->i_cdev,
|
l = container_of(inode->i_cdev,
|
||||||
struct nvgpu_os_linux, tsg.cdev);
|
struct nvgpu_os_linux, tsg.cdev);
|
||||||
gk20a_dbg_fn("");
|
g = &l->g;
|
||||||
|
|
||||||
|
ret = gk20a_busy(g);
|
||||||
|
if (ret) {
|
||||||
|
nvgpu_err(g, "failed to power on, %d", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
ret = nvgpu_ioctl_tsg_open(&l->g, filp);
|
ret = nvgpu_ioctl_tsg_open(&l->g, filp);
|
||||||
|
|
||||||
|
gk20a_idle(g);
|
||||||
gk20a_dbg_fn("done");
|
gk20a_dbg_fn("done");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,6 +237,12 @@ int gk20a_pm_finalize_poweron(struct device *dev)
|
|||||||
if (platform->has_cde)
|
if (platform->has_cde)
|
||||||
gk20a_init_cde_support(l);
|
gk20a_init_cde_support(l);
|
||||||
|
|
||||||
|
err = gk20a_sched_ctrl_init(g);
|
||||||
|
if (err) {
|
||||||
|
nvgpu_err(g, "failed to init sched control");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (err)
|
if (err)
|
||||||
g->power_on = false;
|
g->power_on = false;
|
||||||
|
|||||||
@@ -300,12 +300,6 @@ int gk20a_finalize_poweron(struct gk20a *g)
|
|||||||
nvgpu_warn(g, "could not initialize ctxsw tracing");
|
nvgpu_warn(g, "could not initialize ctxsw tracing");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
err = gk20a_sched_ctrl_init(g);
|
|
||||||
if (err) {
|
|
||||||
nvgpu_err(g, "failed to init sched control");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore the debug setting */
|
/* Restore the debug setting */
|
||||||
g->ops.fb.set_debug_mode(g, g->mmu_debug_ctrl);
|
g->ops.fb.set_debug_mode(g, g->mmu_debug_ctrl);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user