diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/ltc.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/ltc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/ltc.c b/drivers/gpu/nvgpu/common/ltc.c index 006e2ed2..024c2e49 100644 --- a/drivers/gpu/nvgpu/common/ltc.c +++ b/drivers/gpu/nvgpu/common/ltc.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <nvgpu/ltc.h> | 23 | #include <nvgpu/ltc.h> |
24 | #include <nvgpu/dma.h> | 24 | #include <nvgpu/dma.h> |
25 | #include <nvgpu/nvgpu_mem.h> | ||
25 | 26 | ||
26 | #include "gk20a/gk20a.h" | 27 | #include "gk20a/gk20a.h" |
27 | #include "gk20a/gr_gk20a.h" | 28 | #include "gk20a/gr_gk20a.h" |
@@ -54,6 +55,9 @@ int nvgpu_ltc_alloc_cbc(struct gk20a *g, size_t compbit_backing_size) | |||
54 | struct gr_gk20a *gr = &g->gr; | 55 | struct gr_gk20a *gr = &g->gr; |
55 | unsigned long flags = 0; | 56 | unsigned long flags = 0; |
56 | 57 | ||
58 | if (nvgpu_mem_is_valid(&gr->compbit_store.mem)) | ||
59 | return 0; | ||
60 | |||
57 | if (!nvgpu_iommuable(g)) | 61 | if (!nvgpu_iommuable(g)) |
58 | flags = NVGPU_DMA_FORCE_CONTIGUOUS; | 62 | flags = NVGPU_DMA_FORCE_CONTIGUOUS; |
59 | 63 | ||