summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-12-06 08:03:39 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-08 14:58:18 -0500
commitac78f5d95eeed84880432ee0428bfa49e6fbb0d7 (patch)
treebcb4a34a9120de57ff1eddfc8c777122a6354007 /drivers
parent9f404b811c8b1e8a5b7bf0eb6346d424bae31576 (diff)
gpu: nvgpu: use nvgpu API to check for allocated memory
In __gr_gk20a_exec_ctx_ops(), we directly access linux specific pages to check if memory is allocated or not Since we need to remove this linux specific dependency from common code, use common API nvgpu_mem_is_valid() to check if memory is allocated or not Jira NVGPU-448 Change-Id: Iad62482ad1c0dfad3b96c6c125c2641bbe6ea596 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1612445 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index ad9ecdfa..99f85b57 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -7895,7 +7895,7 @@ int __gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
7895 } 7895 }
7896 if (!pm_ctx_ready) { 7896 if (!pm_ctx_ready) {
7897 /* Make sure ctx buffer was initialized */ 7897 /* Make sure ctx buffer was initialized */
7898 if (!ch_ctx->pm_ctx.mem.priv.pages) { 7898 if (!nvgpu_mem_is_valid(&ch_ctx->pm_ctx.mem)) {
7899 nvgpu_err(g, 7899 nvgpu_err(g,
7900 "Invalid ctx buffer"); 7900 "Invalid ctx buffer");
7901 err = -EINVAL; 7901 err = -EINVAL;