diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 13 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 15 |
2 files changed, 21 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index 3644c2ef..c2e2cc98 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -842,7 +842,9 @@ int gk20a_cde_reload(struct gk20a *g) | |||
842 | int err, i; | 842 | int err, i; |
843 | 843 | ||
844 | if (!cde_app->initialised) { | 844 | if (!cde_app->initialised) { |
845 | gk20a_busy(g->dev); | 845 | err = gk20a_busy(g->dev); |
846 | if (err) | ||
847 | return err; | ||
846 | gk20a_init_cde_support(g); | 848 | gk20a_init_cde_support(g); |
847 | gk20a_idle(g->dev); | 849 | gk20a_idle(g->dev); |
848 | if (!cde_app->initialised) | 850 | if (!cde_app->initialised) |
@@ -850,7 +852,10 @@ int gk20a_cde_reload(struct gk20a *g) | |||
850 | return 0; | 852 | return 0; |
851 | } | 853 | } |
852 | 854 | ||
853 | gk20a_busy(g->dev); | 855 | err = gk20a_busy(g->dev); |
856 | if (err) | ||
857 | return err; | ||
858 | |||
854 | mutex_lock(&cde_app->mutex); | 859 | mutex_lock(&cde_app->mutex); |
855 | for (i = 0; i < ARRAY_SIZE(cde_app->cde_ctx); i++, cde_ctx++) { | 860 | for (i = 0; i < ARRAY_SIZE(cde_app->cde_ctx); i++, cde_ctx++) { |
856 | gk20a_cde_remove(cde_ctx); | 861 | gk20a_cde_remove(cde_ctx); |
@@ -1043,7 +1048,9 @@ static int gk20a_buffer_convert_gpu_to_cde( | |||
1043 | WRITE_PATCH(PATCH_QMD_CTA_THREAD_DIMENSION2, 1); | 1048 | WRITE_PATCH(PATCH_QMD_CTA_THREAD_DIMENSION2, 1); |
1044 | #undef WRITE_PATCH | 1049 | #undef WRITE_PATCH |
1045 | 1050 | ||
1046 | gk20a_busy(g->dev); | 1051 | err = gk20a_busy(g->dev); |
1052 | if (err) | ||
1053 | return err; | ||
1047 | err = gk20a_init_cde_support(g); | 1054 | err = gk20a_init_cde_support(g); |
1048 | if (err) | 1055 | if (err) |
1049 | goto out; | 1056 | goto out; |
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index b196e330..53fab0d9 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -91,7 +91,10 @@ static int gk20a_ctrl_prepare_compressible_read( | |||
91 | fence.syncpt_id = args->fence.syncpt_id; | 91 | fence.syncpt_id = args->fence.syncpt_id; |
92 | fence.value = args->fence.syncpt_value; | 92 | fence.value = args->fence.syncpt_value; |
93 | 93 | ||
94 | gk20a_busy(g->dev); | 94 | ret = gk20a_busy(g->dev); |
95 | if (ret) | ||
96 | return ret; | ||
97 | |||
95 | ret = gk20a_prepare_compressible_read(g, args->handle, | 98 | ret = gk20a_prepare_compressible_read(g, args->handle, |
96 | args->request_compbits, args->offset, | 99 | args->request_compbits, args->offset, |
97 | args->compbits_hoffset, args->compbits_voffset, | 100 | args->compbits_hoffset, args->compbits_voffset, |
@@ -137,7 +140,9 @@ static int gk20a_ctrl_mark_compressible_write( | |||
137 | { | 140 | { |
138 | int ret = 0; | 141 | int ret = 0; |
139 | 142 | ||
140 | gk20a_busy(g->dev); | 143 | ret = gk20a_busy(g->dev); |
144 | if (ret) | ||
145 | return ret; | ||
141 | ret = gk20a_mark_compressible_write(g, args->handle, | 146 | ret = gk20a_mark_compressible_write(g, args->handle, |
142 | args->valid_compbits, args->offset, args->zbc_color); | 147 | args->valid_compbits, args->offset, args->zbc_color); |
143 | gk20a_idle(g->dev); | 148 | gk20a_idle(g->dev); |
@@ -249,8 +254,10 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
249 | } | 254 | } |
250 | 255 | ||
251 | if (!err) { | 256 | if (!err) { |
252 | gk20a_busy(dev); | 257 | err = gk20a_busy(dev); |
253 | err = gk20a_gr_zbc_set_table(g, &g->gr, zbc_val); | 258 | if (!err) |
259 | err = gk20a_gr_zbc_set_table(g, &g->gr, | ||
260 | zbc_val); | ||
254 | gk20a_idle(dev); | 261 | gk20a_idle(dev); |
255 | } | 262 | } |
256 | 263 | ||