summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/css_vgpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/css_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/css_vgpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/vgpu/css_vgpu.c
index 0e44b81a..40ff8f90 100644
--- a/drivers/gpu/nvgpu/vgpu/css_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/css_vgpu.c
@@ -25,6 +25,7 @@
25#include <nvgpu/vgpu/vgpu.h> 25#include <nvgpu/vgpu/vgpu.h>
26#include <nvgpu/vgpu/tegra_vgpu.h> 26#include <nvgpu/vgpu/tegra_vgpu.h>
27#include <nvgpu/dt.h> 27#include <nvgpu/dt.h>
28#include <nvgpu/bug.h>
28 29
29#include "gk20a/gk20a.h" 30#include "gk20a/gk20a.h"
30#include "gk20a/channel_gk20a.h" 31#include "gk20a/channel_gk20a.h"
@@ -43,13 +44,13 @@ static struct tegra_hv_ivm_cookie *vgpu_css_reserve_mempool(struct gk20a *g)
43 err = nvgpu_dt_read_u32_index(g, "mempool-css", 1, &mempool); 44 err = nvgpu_dt_read_u32_index(g, "mempool-css", 1, &mempool);
44 if (err) { 45 if (err) {
45 nvgpu_err(g, "dt missing mempool-css"); 46 nvgpu_err(g, "dt missing mempool-css");
46 return ERR_PTR(err); 47 return (struct tegra_hv_ivm_cookie *)ERR_PTR(err);
47 } 48 }
48 49
49 cookie = vgpu_ivm_mempool_reserve(mempool); 50 cookie = vgpu_ivm_mempool_reserve(mempool);
50 if (IS_ERR_OR_NULL(cookie)) { 51 if (IS_ERR_OR_NULL(cookie)) {
51 nvgpu_err(g, "mempool %u reserve failed", mempool); 52 nvgpu_err(g, "mempool %u reserve failed", mempool);
52 return ERR_PTR(-EINVAL); 53 return (struct tegra_hv_ivm_cookie *)ERR_PTR(-EINVAL);
53 } 54 }
54 return cookie; 55 return cookie;
55} 56}