diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-02-26 06:17:06 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:08:54 -0400 |
commit | 45e261ac190f26ea6b1286c7153b5ef9481f454f (patch) | |
tree | 5e9f807f8a02f7c531648bed84efd4207b08cb6a /drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |
parent | 99c707842f9eb036100b0eb96cd84fc3ab97508e (diff) |
gpu: nvgpu: add flag for CAR reset in do_idle()
Add "force_reset" flag to __gk20a_do_idle()
For real world use cases like VPR resizing, we cannot wait
for railgate_delay (which is 500 mS). Hence use CAR reset
for this use case. (this is done via gk20a_do_idle() API
with force_reset = true)
Some of the test cases make use of sysfs "force_idle" and
they expect GPU to be into really railgated state and
not in CAR reset.
Hence when called from sysfs, set force_reset = false.
When global flag "force_reset_in_do_idle" is set, it will
override local flags and force CAR reset case.
This is desired in cases where railgating is not enabled
Also, set force_reset_in_do_idle = false for GM20B since
railgating has been enabled for GM20B
Bug 1592997
Change-Id: I6c5af2977c7211ef82551a86a7c1eb51b8ccee60
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/711615
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index 7baadf2e..a70ce4b2 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A Graphics | 4 | * GK20A Graphics |
5 | * | 5 | * |
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -562,7 +562,7 @@ static ssize_t force_idle_store(struct device *device, | |||
562 | if (g->forced_idle) | 562 | if (g->forced_idle) |
563 | return count; /* do nothing */ | 563 | return count; /* do nothing */ |
564 | else { | 564 | else { |
565 | err = __gk20a_do_idle(ndev); | 565 | err = __gk20a_do_idle(ndev, false); |
566 | if (!err) { | 566 | if (!err) { |
567 | g->forced_idle = 1; | 567 | g->forced_idle = 1; |
568 | dev_info(device, "gpu is idle : %d\n", | 568 | dev_info(device, "gpu is idle : %d\n", |