DCE-KMD: Refactor dce_work_cond_sw_resource_init()

- Move resource init specific to PM and bootstrap modules
  to respective PM and bootstrap init functions.

- Motivation here is 2 fold:
    1) To keep common code common across OSs.
    2) Move resource init to respective sub-modules.
        - We will have separate PM module for HVRTOS.
        - We will have separate dce-worker module for HVRTOS.

JIRA TDS-16052

Change-Id: I40f6943eb4173a0da7201dc58afb19aee2a0d04e
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3190873
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
This commit is contained in:
anupamg
2024-08-08 19:49:58 +00:00
committed by Jon Hunter
parent 06db88ae67
commit 644c60d35c
5 changed files with 39 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef DCE_PM_H
@@ -12,6 +12,8 @@ struct dce_sc7_state {
uint32_t hsp_ie;
};
int dce_pm_init(struct tegra_dce *d);
void dce_pm_deinit(struct tegra_dce *d);
int dce_pm_enter_sc7(struct tegra_dce *d);
int dce_pm_exit_sc7(struct tegra_dce *d);
void dce_resume_work_fn(struct tegra_dce *d);