diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index 952a7ed1..3e1c6996 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | |||
@@ -122,6 +122,9 @@ static int gk20a_tegra_secure_alloc(struct gk20a *g, | |||
122 | int err = 0; | 122 | int err = 0; |
123 | size_t aligned_size = PAGE_ALIGN(size); | 123 | size_t aligned_size = PAGE_ALIGN(size); |
124 | 124 | ||
125 | if (nvgpu_mem_is_valid(&desc->mem)) | ||
126 | return 0; | ||
127 | |||
125 | /* We ran out of preallocated memory */ | 128 | /* We ran out of preallocated memory */ |
126 | if (secure_buffer->used + aligned_size > secure_buffer->size) { | 129 | if (secure_buffer->used + aligned_size > secure_buffer->size) { |
127 | nvgpu_err(platform->g, "failed to alloc %zu bytes of VPR, %zu/%zu used", | 130 | nvgpu_err(platform->g, "failed to alloc %zu bytes of VPR, %zu/%zu used", |