mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: make pm config as platform data
Make gpu power management feature configurations as platform data. Keep existing sttaus for gk20a and disable all power features for gm20b. Bug 1523728 Change-Id: Ife7786863f18e21b882ac77085c7abc7c84d4cfc Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/426369 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Supriya Sharatkumar <ssharatkumar@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
6838d9f05e
commit
6f492c3834
@@ -1455,14 +1455,18 @@ static int gk20a_probe(struct platform_device *dev)
|
||||
if (tegra_platform_is_silicon())
|
||||
gk20a->timeouts_enabled = true;
|
||||
|
||||
/* Set up initial clock gating settings */
|
||||
if (tegra_platform_is_silicon()) {
|
||||
gk20a->slcg_enabled = true;
|
||||
gk20a->blcg_enabled = true;
|
||||
gk20a->elcg_enabled = true;
|
||||
gk20a->elpg_enabled = true;
|
||||
gk20a->aelpg_enabled = true;
|
||||
}
|
||||
/* Set up initial power settings. For non-slicon platforms, disable *
|
||||
* power features and for silicon platforms, read from platform data */
|
||||
gk20a->slcg_enabled =
|
||||
tegra_platform_is_silicon() ? platform->enable_slcg : false;
|
||||
gk20a->blcg_enabled =
|
||||
tegra_platform_is_silicon() ? platform->enable_blcg : false;
|
||||
gk20a->elcg_enabled =
|
||||
tegra_platform_is_silicon() ? platform->enable_elcg : false;
|
||||
gk20a->elpg_enabled =
|
||||
tegra_platform_is_silicon() ? platform->enable_elpg : false;
|
||||
gk20a->aelpg_enabled =
|
||||
tegra_platform_is_silicon() ? platform->enable_aelpg : false;
|
||||
|
||||
gk20a_create_sysfs(dev);
|
||||
|
||||
|
||||
@@ -61,6 +61,21 @@ struct gk20a_platform {
|
||||
/* Delay before clock gated */
|
||||
int clockgate_delay;
|
||||
|
||||
/* Second Level Clock Gating: true = enable false = disable */
|
||||
bool enable_slcg;
|
||||
|
||||
/* Block Level Clock Gating: true = enable flase = disable */
|
||||
bool enable_blcg;
|
||||
|
||||
/* Engine Level Clock Gating: true = enable flase = disable */
|
||||
bool enable_elcg;
|
||||
|
||||
/* Engine Level Power Gating: true = enable flase = disable */
|
||||
bool enable_elpg;
|
||||
|
||||
/* Adaptative ELPG: true = enable flase = disable */
|
||||
bool enable_aelpg;
|
||||
|
||||
/* Initialize the platform interface of the gk20a driver.
|
||||
*
|
||||
* The platform implementation of this function must
|
||||
|
||||
@@ -534,6 +534,12 @@ struct gk20a_platform t132_gk20a_tegra_platform = {
|
||||
.railgate_delay = 500,
|
||||
.clockgate_delay = 50,
|
||||
.can_railgate = true,
|
||||
.enable_slcg = true,
|
||||
.enable_blcg = true,
|
||||
.enable_elcg = true,
|
||||
.enable_elpg = true,
|
||||
.enable_aelpg = true,
|
||||
|
||||
|
||||
.probe = gk20a_tegra_probe,
|
||||
.late_probe = gk20a_tegra_late_probe,
|
||||
@@ -562,6 +568,11 @@ struct gk20a_platform gk20a_tegra_platform = {
|
||||
.railgate_delay = 500,
|
||||
.clockgate_delay = 50,
|
||||
.can_railgate = true,
|
||||
.enable_slcg = true,
|
||||
.enable_blcg = true,
|
||||
.enable_elcg = true,
|
||||
.enable_elpg = true,
|
||||
.enable_aelpg = true,
|
||||
|
||||
.probe = gk20a_tegra_probe,
|
||||
.late_probe = gk20a_tegra_late_probe,
|
||||
@@ -589,6 +600,13 @@ struct gk20a_platform gm20b_tegra_platform = {
|
||||
/* power management configuration */
|
||||
.railgate_delay = 500,
|
||||
.clockgate_delay = 50,
|
||||
/* Disable all power features for gm20b */
|
||||
.can_railgate = false,
|
||||
.enable_slcg = false,
|
||||
.enable_blcg = false,
|
||||
.enable_elcg = false,
|
||||
.enable_elpg = false,
|
||||
.enable_aelpg = false,
|
||||
|
||||
.probe = gk20a_tegra_probe,
|
||||
.late_probe = gk20a_tegra_late_probe,
|
||||
|
||||
Reference in New Issue
Block a user