mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: return error if GPU not initialized
While writing to sysfs "tpc_fs_mask", we need to have GPU initialized (we need to have called gk20a_busy() at least once before) If this is not happened yet, then return error Bug 1456969 Change-Id: I09db6bcaa44b8939246cb5ed1205f3fbc0ee0552 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/731327 (cherry picked from commit 0dbbcf60bbad6b9a31392d2290a3e26c5daa1e5d) Reviewed-on: http://git-master/r/731671 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
committed by
Ishan Mittal
parent
916a557bd6
commit
087ce7301b
@@ -615,6 +615,9 @@ static ssize_t tpc_fs_mask_store(struct device *device,
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!g->gr.gpc_tpc_mask)
|
||||
return -ENODEV;
|
||||
|
||||
if (val && val != g->gr.gpc_tpc_mask[0] && g->ops.gr.set_gpc_tpc_mask) {
|
||||
g->gr.gpc_tpc_mask[0] = val;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user