diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/cde_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index dc7e8be3..84b39b2d 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -1259,17 +1259,6 @@ enum cde_launch_patch_id { | |||
1259 | PATCH_V_QMD_REGISTER_COUNT_ID = 1056, | 1259 | PATCH_V_QMD_REGISTER_COUNT_ID = 1056, |
1260 | }; | 1260 | }; |
1261 | 1261 | ||
1262 | enum programs { | ||
1263 | PROG_HPASS = 0, | ||
1264 | PROG_VPASS_LARGE = 1, | ||
1265 | PROG_VPASS_SMALL = 2, | ||
1266 | PROG_HPASS_DEBUG = 3, | ||
1267 | PROG_VPASS_LARGE_DEBUG = 4, | ||
1268 | PROG_VPASS_SMALL_DEBUG = 5, | ||
1269 | PROG_PASSTHROUGH = 6, | ||
1270 | NUM_PROGRAMS = 7 | ||
1271 | }; | ||
1272 | |||
1273 | /* maximum number of WRITE_PATCHes in the below function */ | 1262 | /* maximum number of WRITE_PATCHes in the below function */ |
1274 | #define MAX_CDE_LAUNCH_PATCHES 32 | 1263 | #define MAX_CDE_LAUNCH_PATCHES 32 |
1275 | 1264 | ||
@@ -1301,17 +1290,20 @@ static int gk20a_buffer_convert_gpu_to_cde_v1( | |||
1301 | const int xblocks = (xtiles + 1) >> 1; | 1290 | const int xblocks = (xtiles + 1) >> 1; |
1302 | const int voffset = compbits_voffset - compbits_hoffset; | 1291 | const int voffset = compbits_voffset - compbits_hoffset; |
1303 | 1292 | ||
1304 | int hprog = PROG_HPASS; | 1293 | int hprog = -1; |
1305 | int vprog = (block_height_log2 >= 2) ? | 1294 | int vprog = -1; |
1306 | PROG_VPASS_LARGE : PROG_VPASS_SMALL; | 1295 | |
1307 | if (g->cde_app.shader_parameter == 1) { | 1296 | if (g->ops.cde.get_program_numbers) |
1308 | hprog = PROG_PASSTHROUGH; | 1297 | g->ops.cde.get_program_numbers(g, block_height_log2, |
1309 | vprog = PROG_PASSTHROUGH; | 1298 | &hprog, &vprog); |
1310 | } else if (g->cde_app.shader_parameter == 2) { | 1299 | else { |
1311 | hprog = PROG_HPASS_DEBUG; | 1300 | gk20a_warn(&g->dev->dev, "cde: chip not supported"); |
1312 | vprog = (block_height_log2 >= 2) ? | 1301 | return -ENOSYS; |
1313 | PROG_VPASS_LARGE_DEBUG : | 1302 | } |
1314 | PROG_VPASS_SMALL_DEBUG; | 1303 | |
1304 | if (hprog < 0 || vprog < 0) { | ||
1305 | gk20a_warn(&g->dev->dev, "cde: could not determine programs"); | ||
1306 | return -ENOSYS; | ||
1315 | } | 1307 | } |
1316 | 1308 | ||
1317 | if (xtiles > 8192 / 8 || ytiles > 8192 / 8) | 1309 | if (xtiles > 8192 / 8 || ytiles > 8192 / 8) |