mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: pass right data to aelpg control calls
Fill aelpg controller id explicitly and use right structure within command union bug 1932265 Change-Id: Ie06bf8b1b124e67871dd1443e14a1080473a7ab1 Signed-off-by: Vijayakumar <vsubbu@nvidia.com> Reviewed-on: http://git-master/r/1493125 Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Adeel Raza <araza@nvidia.com> Tested-by: Adeel Raza <araza@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f97d62eb8f
commit
38ec046691
@@ -581,7 +581,8 @@ static ssize_t aelpg_param_store(struct device *dev,
|
||||
*/
|
||||
if (g->aelpg_enabled && g->pmu.pmu_ready) {
|
||||
/* Disable AELPG */
|
||||
ap_cmd.init.cmd_id = PMU_AP_CMD_ID_DISABLE_CTRL;
|
||||
ap_cmd.disable_ctrl.cmd_id = PMU_AP_CMD_ID_DISABLE_CTRL;
|
||||
ap_cmd.disable_ctrl.ctrl_id = PMU_AP_CTRL_ID_GRAPHICS;
|
||||
status = gk20a_pmu_ap_send_command(g, &ap_cmd, false);
|
||||
|
||||
/* Enable AELPG */
|
||||
@@ -626,12 +627,14 @@ static ssize_t aelpg_enable_store(struct device *dev,
|
||||
if (val && !g->aelpg_enabled) {
|
||||
g->aelpg_enabled = true;
|
||||
/* Enable AELPG */
|
||||
ap_cmd.init.cmd_id = PMU_AP_CMD_ID_ENABLE_CTRL;
|
||||
ap_cmd.enable_ctrl.cmd_id = PMU_AP_CMD_ID_ENABLE_CTRL;
|
||||
ap_cmd.enable_ctrl.ctrl_id = PMU_AP_CTRL_ID_GRAPHICS;
|
||||
status = gk20a_pmu_ap_send_command(g, &ap_cmd, false);
|
||||
} else if (!val && g->aelpg_enabled) {
|
||||
g->aelpg_enabled = false;
|
||||
/* Disable AELPG */
|
||||
ap_cmd.init.cmd_id = PMU_AP_CMD_ID_DISABLE_CTRL;
|
||||
ap_cmd.disable_ctrl.cmd_id = PMU_AP_CMD_ID_DISABLE_CTRL;
|
||||
ap_cmd.disable_ctrl.ctrl_id = PMU_AP_CTRL_ID_GRAPHICS;
|
||||
status = gk20a_pmu_ap_send_command(g, &ap_cmd, false);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user