summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/cde_gk20a.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
index 24e2a778..2fad2f64 100644
--- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
@@ -1002,6 +1002,12 @@ static int gk20a_buffer_convert_gpu_to_cde(
1002 const int gridw = roundup(tilepitch, wgx) / wgx; 1002 const int gridw = roundup(tilepitch, wgx) / wgx;
1003 const int gridh = roundup(ytilesaligned, wgy) / wgy; 1003 const int gridh = roundup(ytilesaligned, wgy) / wgy;
1004 1004
1005 if (!g->cde_app.initialised) {
1006 err = gk20a_cde_reload(g);
1007 if (err)
1008 return err;
1009 }
1010
1005 if (xtiles > 4096 / 8 || ytiles > 4096 / 8) 1011 if (xtiles > 4096 / 8 || ytiles > 4096 / 8)
1006 gk20a_warn(&g->dev->dev, "cde: surface is exceptionally large (xtiles=%d, ytiles=%d)", 1012 gk20a_warn(&g->dev->dev, "cde: surface is exceptionally large (xtiles=%d, ytiles=%d)",
1007 xtiles, ytiles); 1013 xtiles, ytiles);
@@ -1070,12 +1076,6 @@ int gk20a_prepare_compressible_read(
1070 struct dma_buf *dmabuf; 1076 struct dma_buf *dmabuf;
1071 u32 missing_bits; 1077 u32 missing_bits;
1072 1078
1073 if (!g->cde_app.initialised) {
1074 err = gk20a_cde_reload(g);
1075 if (err)
1076 return err;
1077 }
1078
1079 dmabuf = dma_buf_get(buffer_fd); 1079 dmabuf = dma_buf_get(buffer_fd);
1080 if (IS_ERR(dmabuf)) 1080 if (IS_ERR(dmabuf))
1081 return -EINVAL; 1081 return -EINVAL;
@@ -1145,7 +1145,7 @@ int gk20a_prepare_compressible_read(
1145out: 1145out:
1146 mutex_unlock(&state->lock); 1146 mutex_unlock(&state->lock);
1147 dma_buf_put(dmabuf); 1147 dma_buf_put(dmabuf);
1148 return 0; 1148 return err;
1149} 1149}
1150 1150
1151int gk20a_mark_compressible_write(struct gk20a *g, u32 buffer_fd, 1151int gk20a_mark_compressible_write(struct gk20a *g, u32 buffer_fd,