summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2018-04-11 00:16:45 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-08 06:14:57 -0400
commita1a8ceca0c5cdc8484e4da66019c066be716f9c8 (patch)
treea0ae615a3f10f8bd7843696214184d98b8e8f3b1
parenta5f3fe9506dcf87910eba24c80a4b30c03dcced1 (diff)
gpu: nvgpu: remove the setting of nice values in gk20a_poweron
set_user_nice is no longer needed to improve the efficiency of gk20a_finalize_poweron and can be removed as suggested by Terje. Change-Id: I303bbee266b4624bb775ea793f843dbfc8f88c5d Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1692609 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index 53c78447..015f2bf8 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -216,7 +216,7 @@ int gk20a_pm_finalize_poweron(struct device *dev)
216 struct gk20a *g = get_gk20a(dev); 216 struct gk20a *g = get_gk20a(dev);
217 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); 217 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
218 struct gk20a_platform *platform = gk20a_get_platform(dev); 218 struct gk20a_platform *platform = gk20a_get_platform(dev);
219 int err, nice_value; 219 int err;
220 220
221 gk20a_dbg_fn(""); 221 gk20a_dbg_fn("");
222 222
@@ -238,9 +238,6 @@ int gk20a_pm_finalize_poweron(struct device *dev)
238 if (err) 238 if (err)
239 return err; 239 return err;
240 240
241 nice_value = task_nice(current);
242 set_user_nice(current, -20);
243
244 /* Enable interrupt workqueue */ 241 /* Enable interrupt workqueue */
245 if (!l->nonstall_work_queue) { 242 if (!l->nonstall_work_queue) {
246 l->nonstall_work_queue = alloc_workqueue("%s", 243 l->nonstall_work_queue = alloc_workqueue("%s",
@@ -253,23 +250,17 @@ int gk20a_pm_finalize_poweron(struct device *dev)
253 return err; 250 return err;
254 251
255 err = gk20a_finalize_poweron(g); 252 err = gk20a_finalize_poweron(g);
256 if (err) { 253 if (err)
257 set_user_nice(current, nice_value);
258 goto done; 254 goto done;
259 }
260 255
261 err = nvgpu_finalize_poweron_linux(l); 256 err = nvgpu_finalize_poweron_linux(l);
262 if (err) { 257 if (err)
263 set_user_nice(current, nice_value);
264 goto done; 258 goto done;
265 }
266 259
267 nvgpu_init_mm_ce_context(g); 260 nvgpu_init_mm_ce_context(g);
268 261
269 nvgpu_vidmem_thread_unpause(&g->mm); 262 nvgpu_vidmem_thread_unpause(&g->mm);
270 263
271 set_user_nice(current, nice_value);
272
273 /* Initialise scaling: it will initialize scaling drive only once */ 264 /* Initialise scaling: it will initialize scaling drive only once */
274 if (IS_ENABLED(CONFIG_GK20A_DEVFREQ) && 265 if (IS_ENABLED(CONFIG_GK20A_DEVFREQ) &&
275 nvgpu_platform_is_silicon(g)) { 266 nvgpu_platform_is_silicon(g)) {