mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
nvgpu: reorder the check for same mask value
After the board boots up, we have a specific set of settings for each power mode which contains, fbp, tpc mask values, cpu, gpu frequencies etc. So, we need to make sure to provide all the setting values for each mode so that those will be applied correctly. So, the fbp, tpc, gpc mask could be same in different power modes and since the golden image context check which comes before is returning -ENODEV, the nvpmodel service fails to set the power mode. Thus, we need to compare whether the fbp and gpc mask values are same before we check for the golden image context. Bug 3581634 Change-Id: I3fb1398d47cd37bf49ad70cf80b057d4b80dec04 Signed-off-by: Ninad Malwade <nmalwade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2686490 Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Amulya Yarlagadda
parent
e0c17cac98
commit
a27e202402
@@ -862,6 +862,11 @@ static ssize_t gpc_pg_mask_store(struct device *dev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (val == g->gpc_pg_mask) {
|
||||||
|
nvgpu_info(g, "no value change, same mask already set");
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (g->gr != NULL) {
|
if (g->gr != NULL) {
|
||||||
gr_golden_image = nvgpu_gr_get_golden_image_ptr(g);
|
gr_golden_image = nvgpu_gr_get_golden_image_ptr(g);
|
||||||
}
|
}
|
||||||
@@ -874,11 +879,6 @@ static ssize_t gpc_pg_mask_store(struct device *dev,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == g->gpc_pg_mask) {
|
|
||||||
nvgpu_info(g, "no value change, same mask already set");
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (platform->set_gpc_pg_mask != NULL) {
|
if (platform->set_gpc_pg_mask != NULL) {
|
||||||
err = platform->set_gpc_pg_mask(dev, val);
|
err = platform->set_gpc_pg_mask(dev, val);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
@@ -942,6 +942,11 @@ static ssize_t fbp_pg_mask_store(struct device *dev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (val == g->fbp_pg_mask) {
|
||||||
|
nvgpu_info(g, "no value change, same mask already set");
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (g->gr != NULL) {
|
if (g->gr != NULL) {
|
||||||
gr_golden_image = nvgpu_gr_get_golden_image_ptr(g);
|
gr_golden_image = nvgpu_gr_get_golden_image_ptr(g);
|
||||||
}
|
}
|
||||||
@@ -954,11 +959,6 @@ static ssize_t fbp_pg_mask_store(struct device *dev,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == g->fbp_pg_mask) {
|
|
||||||
nvgpu_info(g, "no value change, same mask already set");
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (platform->set_fbp_pg_mask != NULL) {
|
if (platform->set_fbp_pg_mask != NULL) {
|
||||||
err = platform->set_fbp_pg_mask(dev, val);
|
err = platform->set_fbp_pg_mask(dev, val);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user