Lines Matching full:msg

197 	struct a6xx_hfi_msg_gmu_init_cmd msg = { 0 };  in a6xx_hfi_send_gmu_init()  local
199 msg.dbg_buffer_addr = (u32) gmu->debug.iova; in a6xx_hfi_send_gmu_init()
200 msg.dbg_buffer_size = (u32) gmu->debug.size; in a6xx_hfi_send_gmu_init()
201 msg.boot_state = boot_state; in a6xx_hfi_send_gmu_init()
203 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_INIT, &msg, sizeof(msg), in a6xx_hfi_send_gmu_init()
209 struct a6xx_hfi_msg_fw_version msg = { 0 }; in a6xx_hfi_get_fw_version() local
212 msg.supported_version = (1 << 28) | (1 << 19) | (1 << 17); in a6xx_hfi_get_fw_version()
214 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_FW_VERSION, &msg, sizeof(msg), in a6xx_hfi_get_fw_version()
220 struct a6xx_hfi_msg_perf_table_v1 msg = { 0 }; in a6xx_hfi_send_perf_table_v1() local
223 msg.num_gpu_levels = gmu->nr_gpu_freqs; in a6xx_hfi_send_perf_table_v1()
224 msg.num_gmu_levels = gmu->nr_gmu_freqs; in a6xx_hfi_send_perf_table_v1()
227 msg.gx_votes[i].vote = gmu->gx_arc_votes[i]; in a6xx_hfi_send_perf_table_v1()
228 msg.gx_votes[i].freq = gmu->gpu_freqs[i] / 1000; in a6xx_hfi_send_perf_table_v1()
232 msg.cx_votes[i].vote = gmu->cx_arc_votes[i]; in a6xx_hfi_send_perf_table_v1()
233 msg.cx_votes[i].freq = gmu->gmu_freqs[i] / 1000; in a6xx_hfi_send_perf_table_v1()
236 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PERF_TABLE, &msg, sizeof(msg), in a6xx_hfi_send_perf_table_v1()
242 struct a6xx_hfi_msg_perf_table msg = { 0 }; in a6xx_hfi_send_perf_table() local
245 msg.num_gpu_levels = gmu->nr_gpu_freqs; in a6xx_hfi_send_perf_table()
246 msg.num_gmu_levels = gmu->nr_gmu_freqs; in a6xx_hfi_send_perf_table()
249 msg.gx_votes[i].vote = gmu->gx_arc_votes[i]; in a6xx_hfi_send_perf_table()
250 msg.gx_votes[i].acd = 0xffffffff; in a6xx_hfi_send_perf_table()
251 msg.gx_votes[i].freq = gmu->gpu_freqs[i] / 1000; in a6xx_hfi_send_perf_table()
255 msg.cx_votes[i].vote = gmu->cx_arc_votes[i]; in a6xx_hfi_send_perf_table()
256 msg.cx_votes[i].freq = gmu->gmu_freqs[i] / 1000; in a6xx_hfi_send_perf_table()
259 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PERF_TABLE, &msg, sizeof(msg), in a6xx_hfi_send_perf_table()
264 struct a6xx_hfi_msg_bw_table *msg) in a6xx_generate_bw_table() argument
271 msg->ddr_cmds_addrs[i] = cmd_db_read_addr(info->bcms[i].name); in a6xx_generate_bw_table()
273 msg->ddr_cmds_num = i; in a6xx_generate_bw_table()
276 for (j = 0; j < msg->ddr_cmds_num; j++) in a6xx_generate_bw_table()
277 msg->ddr_cmds_data[i][j] = gmu->gpu_ib_votes[i][j]; in a6xx_generate_bw_table()
278 msg->bw_level_num = gmu->nr_gpu_bws; in a6xx_generate_bw_table()
281 msg->ddr_wait_bitmask = 0; in a6xx_generate_bw_table()
282 for (j = 0; j < msg->ddr_cmds_num; j++) in a6xx_generate_bw_table()
283 if (msg->ddr_cmds_data[0][j] & BCM_TCS_CMD_COMMIT_MASK) in a6xx_generate_bw_table()
284 msg->ddr_wait_bitmask |= BIT(j); in a6xx_generate_bw_table()
292 msg->cnoc_cmds_addrs[0] = cmd_db_read_addr("CN0"); in a6xx_generate_bw_table()
293 msg->cnoc_cmds_num = 1; in a6xx_generate_bw_table()
295 msg->cnoc_cmds_data[0][0] = BCM_TCS_CMD(true, false, 0, 0); in a6xx_generate_bw_table()
296 msg->cnoc_cmds_data[1][0] = BCM_TCS_CMD(true, true, 0, BIT(0)); in a6xx_generate_bw_table()
299 msg->cnoc_wait_bitmask = 0; in a6xx_generate_bw_table()
300 for (j = 0; j < msg->cnoc_cmds_num; j++) in a6xx_generate_bw_table()
301 if (msg->cnoc_cmds_data[0][j] & BCM_TCS_CMD_COMMIT_MASK) in a6xx_generate_bw_table()
302 msg->cnoc_wait_bitmask |= BIT(j); in a6xx_generate_bw_table()
305 static void a618_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a618_build_bw_table() argument
308 msg->bw_level_num = 1; in a618_build_bw_table()
310 msg->ddr_cmds_num = 3; in a618_build_bw_table()
311 msg->ddr_wait_bitmask = 0x01; in a618_build_bw_table()
313 msg->ddr_cmds_addrs[0] = 0x50000; in a618_build_bw_table()
314 msg->ddr_cmds_addrs[1] = 0x5003c; in a618_build_bw_table()
315 msg->ddr_cmds_addrs[2] = 0x5000c; in a618_build_bw_table()
317 msg->ddr_cmds_data[0][0] = 0x40000000; in a618_build_bw_table()
318 msg->ddr_cmds_data[0][1] = 0x40000000; in a618_build_bw_table()
319 msg->ddr_cmds_data[0][2] = 0x40000000; in a618_build_bw_table()
325 msg->cnoc_cmds_num = 1; in a618_build_bw_table()
326 msg->cnoc_wait_bitmask = 0x01; in a618_build_bw_table()
328 msg->cnoc_cmds_addrs[0] = 0x5007c; in a618_build_bw_table()
329 msg->cnoc_cmds_data[0][0] = 0x40000000; in a618_build_bw_table()
330 msg->cnoc_cmds_data[1][0] = 0x60000001; in a618_build_bw_table()
333 static void a619_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a619_build_bw_table() argument
335 msg->bw_level_num = 13; in a619_build_bw_table()
337 msg->ddr_cmds_num = 3; in a619_build_bw_table()
338 msg->ddr_wait_bitmask = 0x0; in a619_build_bw_table()
340 msg->ddr_cmds_addrs[0] = 0x50000; in a619_build_bw_table()
341 msg->ddr_cmds_addrs[1] = 0x50004; in a619_build_bw_table()
342 msg->ddr_cmds_addrs[2] = 0x50080; in a619_build_bw_table()
344 msg->ddr_cmds_data[0][0] = 0x40000000; in a619_build_bw_table()
345 msg->ddr_cmds_data[0][1] = 0x40000000; in a619_build_bw_table()
346 msg->ddr_cmds_data[0][2] = 0x40000000; in a619_build_bw_table()
347 msg->ddr_cmds_data[1][0] = 0x6000030c; in a619_build_bw_table()
348 msg->ddr_cmds_data[1][1] = 0x600000db; in a619_build_bw_table()
349 msg->ddr_cmds_data[1][2] = 0x60000008; in a619_build_bw_table()
350 msg->ddr_cmds_data[2][0] = 0x60000618; in a619_build_bw_table()
351 msg->ddr_cmds_data[2][1] = 0x600001b6; in a619_build_bw_table()
352 msg->ddr_cmds_data[2][2] = 0x60000008; in a619_build_bw_table()
353 msg->ddr_cmds_data[3][0] = 0x60000925; in a619_build_bw_table()
354 msg->ddr_cmds_data[3][1] = 0x60000291; in a619_build_bw_table()
355 msg->ddr_cmds_data[3][2] = 0x60000008; in a619_build_bw_table()
356 msg->ddr_cmds_data[4][0] = 0x60000dc1; in a619_build_bw_table()
357 msg->ddr_cmds_data[4][1] = 0x600003dc; in a619_build_bw_table()
358 msg->ddr_cmds_data[4][2] = 0x60000008; in a619_build_bw_table()
359 msg->ddr_cmds_data[5][0] = 0x600010ad; in a619_build_bw_table()
360 msg->ddr_cmds_data[5][1] = 0x600004ae; in a619_build_bw_table()
361 msg->ddr_cmds_data[5][2] = 0x60000008; in a619_build_bw_table()
362 msg->ddr_cmds_data[6][0] = 0x600014c3; in a619_build_bw_table()
363 msg->ddr_cmds_data[6][1] = 0x600005d4; in a619_build_bw_table()
364 msg->ddr_cmds_data[6][2] = 0x60000008; in a619_build_bw_table()
365 msg->ddr_cmds_data[7][0] = 0x6000176a; in a619_build_bw_table()
366 msg->ddr_cmds_data[7][1] = 0x60000693; in a619_build_bw_table()
367 msg->ddr_cmds_data[7][2] = 0x60000008; in a619_build_bw_table()
368 msg->ddr_cmds_data[8][0] = 0x60001f01; in a619_build_bw_table()
369 msg->ddr_cmds_data[8][1] = 0x600008b5; in a619_build_bw_table()
370 msg->ddr_cmds_data[8][2] = 0x60000008; in a619_build_bw_table()
371 msg->ddr_cmds_data[9][0] = 0x60002940; in a619_build_bw_table()
372 msg->ddr_cmds_data[9][1] = 0x60000b95; in a619_build_bw_table()
373 msg->ddr_cmds_data[9][2] = 0x60000008; in a619_build_bw_table()
374 msg->ddr_cmds_data[10][0] = 0x60002f68; in a619_build_bw_table()
375 msg->ddr_cmds_data[10][1] = 0x60000d50; in a619_build_bw_table()
376 msg->ddr_cmds_data[10][2] = 0x60000008; in a619_build_bw_table()
377 msg->ddr_cmds_data[11][0] = 0x60003700; in a619_build_bw_table()
378 msg->ddr_cmds_data[11][1] = 0x60000f71; in a619_build_bw_table()
379 msg->ddr_cmds_data[11][2] = 0x60000008; in a619_build_bw_table()
380 msg->ddr_cmds_data[12][0] = 0x60003fce; in a619_build_bw_table()
381 msg->ddr_cmds_data[12][1] = 0x600011ea; in a619_build_bw_table()
382 msg->ddr_cmds_data[12][2] = 0x60000008; in a619_build_bw_table()
384 msg->cnoc_cmds_num = 1; in a619_build_bw_table()
385 msg->cnoc_wait_bitmask = 0x0; in a619_build_bw_table()
387 msg->cnoc_cmds_addrs[0] = 0x50054; in a619_build_bw_table()
389 msg->cnoc_cmds_data[0][0] = 0x40000000; in a619_build_bw_table()
392 static void a640_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a640_build_bw_table() argument
398 msg->bw_level_num = 1; in a640_build_bw_table()
400 msg->ddr_cmds_num = 3; in a640_build_bw_table()
401 msg->ddr_wait_bitmask = 0x01; in a640_build_bw_table()
403 msg->ddr_cmds_addrs[0] = 0x50000; in a640_build_bw_table()
404 msg->ddr_cmds_addrs[1] = 0x5003c; in a640_build_bw_table()
405 msg->ddr_cmds_addrs[2] = 0x5000c; in a640_build_bw_table()
407 msg->ddr_cmds_data[0][0] = 0x40000000; in a640_build_bw_table()
408 msg->ddr_cmds_data[0][1] = 0x40000000; in a640_build_bw_table()
409 msg->ddr_cmds_data[0][2] = 0x40000000; in a640_build_bw_table()
415 msg->cnoc_cmds_num = 3; in a640_build_bw_table()
416 msg->cnoc_wait_bitmask = 0x01; in a640_build_bw_table()
418 msg->cnoc_cmds_addrs[0] = 0x50034; in a640_build_bw_table()
419 msg->cnoc_cmds_addrs[1] = 0x5007c; in a640_build_bw_table()
420 msg->cnoc_cmds_addrs[2] = 0x5004c; in a640_build_bw_table()
422 msg->cnoc_cmds_data[0][0] = 0x40000000; in a640_build_bw_table()
423 msg->cnoc_cmds_data[0][1] = 0x00000000; in a640_build_bw_table()
424 msg->cnoc_cmds_data[0][2] = 0x40000000; in a640_build_bw_table()
426 msg->cnoc_cmds_data[1][0] = 0x60000001; in a640_build_bw_table()
427 msg->cnoc_cmds_data[1][1] = 0x20000001; in a640_build_bw_table()
428 msg->cnoc_cmds_data[1][2] = 0x60000001; in a640_build_bw_table()
431 static void a650_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a650_build_bw_table() argument
437 msg->bw_level_num = 1; in a650_build_bw_table()
439 msg->ddr_cmds_num = 3; in a650_build_bw_table()
440 msg->ddr_wait_bitmask = 0x01; in a650_build_bw_table()
442 msg->ddr_cmds_addrs[0] = 0x50000; in a650_build_bw_table()
443 msg->ddr_cmds_addrs[1] = 0x50004; in a650_build_bw_table()
444 msg->ddr_cmds_addrs[2] = 0x5007c; in a650_build_bw_table()
446 msg->ddr_cmds_data[0][0] = 0x40000000; in a650_build_bw_table()
447 msg->ddr_cmds_data[0][1] = 0x40000000; in a650_build_bw_table()
448 msg->ddr_cmds_data[0][2] = 0x40000000; in a650_build_bw_table()
454 msg->cnoc_cmds_num = 1; in a650_build_bw_table()
455 msg->cnoc_wait_bitmask = 0x01; in a650_build_bw_table()
457 msg->cnoc_cmds_addrs[0] = 0x500a4; in a650_build_bw_table()
458 msg->cnoc_cmds_data[0][0] = 0x40000000; in a650_build_bw_table()
459 msg->cnoc_cmds_data[1][0] = 0x60000001; in a650_build_bw_table()
462 static void a690_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a690_build_bw_table() argument
468 msg->bw_level_num = 1; in a690_build_bw_table()
470 msg->ddr_cmds_num = 3; in a690_build_bw_table()
471 msg->ddr_wait_bitmask = 0x01; in a690_build_bw_table()
473 msg->ddr_cmds_addrs[0] = 0x50004; in a690_build_bw_table()
474 msg->ddr_cmds_addrs[1] = 0x50000; in a690_build_bw_table()
475 msg->ddr_cmds_addrs[2] = 0x500ac; in a690_build_bw_table()
477 msg->ddr_cmds_data[0][0] = 0x40000000; in a690_build_bw_table()
478 msg->ddr_cmds_data[0][1] = 0x40000000; in a690_build_bw_table()
479 msg->ddr_cmds_data[0][2] = 0x40000000; in a690_build_bw_table()
485 msg->cnoc_cmds_num = 1; in a690_build_bw_table()
486 msg->cnoc_wait_bitmask = 0x01; in a690_build_bw_table()
488 msg->cnoc_cmds_addrs[0] = 0x5003c; in a690_build_bw_table()
489 msg->cnoc_cmds_data[0][0] = 0x40000000; in a690_build_bw_table()
490 msg->cnoc_cmds_data[1][0] = 0x60000001; in a690_build_bw_table()
493 static void a660_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a660_build_bw_table() argument
499 msg->bw_level_num = 1; in a660_build_bw_table()
501 msg->ddr_cmds_num = 3; in a660_build_bw_table()
502 msg->ddr_wait_bitmask = 0x01; in a660_build_bw_table()
504 msg->ddr_cmds_addrs[0] = 0x50004; in a660_build_bw_table()
505 msg->ddr_cmds_addrs[1] = 0x500a0; in a660_build_bw_table()
506 msg->ddr_cmds_addrs[2] = 0x50000; in a660_build_bw_table()
508 msg->ddr_cmds_data[0][0] = 0x40000000; in a660_build_bw_table()
509 msg->ddr_cmds_data[0][1] = 0x40000000; in a660_build_bw_table()
510 msg->ddr_cmds_data[0][2] = 0x40000000; in a660_build_bw_table()
516 msg->cnoc_cmds_num = 1; in a660_build_bw_table()
517 msg->cnoc_wait_bitmask = 0x01; in a660_build_bw_table()
519 msg->cnoc_cmds_addrs[0] = 0x50070; in a660_build_bw_table()
520 msg->cnoc_cmds_data[0][0] = 0x40000000; in a660_build_bw_table()
521 msg->cnoc_cmds_data[1][0] = 0x60000001; in a660_build_bw_table()
524 static void a663_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a663_build_bw_table() argument
530 msg->bw_level_num = 1; in a663_build_bw_table()
532 msg->ddr_cmds_num = 3; in a663_build_bw_table()
533 msg->ddr_wait_bitmask = 0x07; in a663_build_bw_table()
535 msg->ddr_cmds_addrs[0] = 0x50004; in a663_build_bw_table()
536 msg->ddr_cmds_addrs[1] = 0x50000; in a663_build_bw_table()
537 msg->ddr_cmds_addrs[2] = 0x500b4; in a663_build_bw_table()
539 msg->ddr_cmds_data[0][0] = 0x40000000; in a663_build_bw_table()
540 msg->ddr_cmds_data[0][1] = 0x40000000; in a663_build_bw_table()
541 msg->ddr_cmds_data[0][2] = 0x40000000; in a663_build_bw_table()
547 msg->cnoc_cmds_num = 1; in a663_build_bw_table()
548 msg->cnoc_wait_bitmask = 0x01; in a663_build_bw_table()
550 msg->cnoc_cmds_addrs[0] = 0x50058; in a663_build_bw_table()
551 msg->cnoc_cmds_data[0][0] = 0x40000000; in a663_build_bw_table()
552 msg->cnoc_cmds_data[1][0] = 0x60000001; in a663_build_bw_table()
555 static void adreno_7c3_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in adreno_7c3_build_bw_table() argument
561 msg->bw_level_num = 1; in adreno_7c3_build_bw_table()
563 msg->ddr_cmds_num = 3; in adreno_7c3_build_bw_table()
564 msg->ddr_wait_bitmask = 0x07; in adreno_7c3_build_bw_table()
566 msg->ddr_cmds_addrs[0] = 0x50004; in adreno_7c3_build_bw_table()
567 msg->ddr_cmds_addrs[1] = 0x50000; in adreno_7c3_build_bw_table()
568 msg->ddr_cmds_addrs[2] = 0x50088; in adreno_7c3_build_bw_table()
570 msg->ddr_cmds_data[0][0] = 0x40000000; in adreno_7c3_build_bw_table()
571 msg->ddr_cmds_data[0][1] = 0x40000000; in adreno_7c3_build_bw_table()
572 msg->ddr_cmds_data[0][2] = 0x40000000; in adreno_7c3_build_bw_table()
578 msg->cnoc_cmds_num = 1; in adreno_7c3_build_bw_table()
579 msg->cnoc_wait_bitmask = 0x01; in adreno_7c3_build_bw_table()
581 msg->cnoc_cmds_addrs[0] = 0x5006c; in adreno_7c3_build_bw_table()
582 msg->cnoc_cmds_data[0][0] = 0x40000000; in adreno_7c3_build_bw_table()
583 msg->cnoc_cmds_data[1][0] = 0x60000001; in adreno_7c3_build_bw_table()
586 static void a730_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a730_build_bw_table() argument
588 msg->bw_level_num = 12; in a730_build_bw_table()
590 msg->ddr_cmds_num = 3; in a730_build_bw_table()
591 msg->ddr_wait_bitmask = 0x7; in a730_build_bw_table()
593 msg->ddr_cmds_addrs[0] = cmd_db_read_addr("SH0"); in a730_build_bw_table()
594 msg->ddr_cmds_addrs[1] = cmd_db_read_addr("MC0"); in a730_build_bw_table()
595 msg->ddr_cmds_addrs[2] = cmd_db_read_addr("ACV"); in a730_build_bw_table()
597 msg->ddr_cmds_data[0][0] = 0x40000000; in a730_build_bw_table()
598 msg->ddr_cmds_data[0][1] = 0x40000000; in a730_build_bw_table()
599 msg->ddr_cmds_data[0][2] = 0x40000000; in a730_build_bw_table()
600 msg->ddr_cmds_data[1][0] = 0x600002e8; in a730_build_bw_table()
601 msg->ddr_cmds_data[1][1] = 0x600003d0; in a730_build_bw_table()
602 msg->ddr_cmds_data[1][2] = 0x60000008; in a730_build_bw_table()
603 msg->ddr_cmds_data[2][0] = 0x6000068d; in a730_build_bw_table()
604 msg->ddr_cmds_data[2][1] = 0x6000089a; in a730_build_bw_table()
605 msg->ddr_cmds_data[2][2] = 0x60000008; in a730_build_bw_table()
606 msg->ddr_cmds_data[3][0] = 0x600007f2; in a730_build_bw_table()
607 msg->ddr_cmds_data[3][1] = 0x60000a6e; in a730_build_bw_table()
608 msg->ddr_cmds_data[3][2] = 0x60000008; in a730_build_bw_table()
609 msg->ddr_cmds_data[4][0] = 0x600009e5; in a730_build_bw_table()
610 msg->ddr_cmds_data[4][1] = 0x60000cfd; in a730_build_bw_table()
611 msg->ddr_cmds_data[4][2] = 0x60000008; in a730_build_bw_table()
612 msg->ddr_cmds_data[5][0] = 0x60000b29; in a730_build_bw_table()
613 msg->ddr_cmds_data[5][1] = 0x60000ea6; in a730_build_bw_table()
614 msg->ddr_cmds_data[5][2] = 0x60000008; in a730_build_bw_table()
615 msg->ddr_cmds_data[6][0] = 0x60001698; in a730_build_bw_table()
616 msg->ddr_cmds_data[6][1] = 0x60001da8; in a730_build_bw_table()
617 msg->ddr_cmds_data[6][2] = 0x60000008; in a730_build_bw_table()
618 msg->ddr_cmds_data[7][0] = 0x600018d2; in a730_build_bw_table()
619 msg->ddr_cmds_data[7][1] = 0x60002093; in a730_build_bw_table()
620 msg->ddr_cmds_data[7][2] = 0x60000008; in a730_build_bw_table()
621 msg->ddr_cmds_data[8][0] = 0x60001e66; in a730_build_bw_table()
622 msg->ddr_cmds_data[8][1] = 0x600027e6; in a730_build_bw_table()
623 msg->ddr_cmds_data[8][2] = 0x60000008; in a730_build_bw_table()
624 msg->ddr_cmds_data[9][0] = 0x600027c2; in a730_build_bw_table()
625 msg->ddr_cmds_data[9][1] = 0x6000342f; in a730_build_bw_table()
626 msg->ddr_cmds_data[9][2] = 0x60000008; in a730_build_bw_table()
627 msg->ddr_cmds_data[10][0] = 0x60002e71; in a730_build_bw_table()
628 msg->ddr_cmds_data[10][1] = 0x60003cf5; in a730_build_bw_table()
629 msg->ddr_cmds_data[10][2] = 0x60000008; in a730_build_bw_table()
630 msg->ddr_cmds_data[11][0] = 0x600030ae; in a730_build_bw_table()
631 msg->ddr_cmds_data[11][1] = 0x60003fe5; in a730_build_bw_table()
632 msg->ddr_cmds_data[11][2] = 0x60000008; in a730_build_bw_table()
634 msg->cnoc_cmds_num = 1; in a730_build_bw_table()
635 msg->cnoc_wait_bitmask = 0x1; in a730_build_bw_table()
637 msg->cnoc_cmds_addrs[0] = cmd_db_read_addr("CN0"); in a730_build_bw_table()
638 msg->cnoc_cmds_data[0][0] = 0x40000000; in a730_build_bw_table()
639 msg->cnoc_cmds_data[1][0] = 0x60000001; in a730_build_bw_table()
642 static void a740_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a740_build_bw_table() argument
644 msg->bw_level_num = 1; in a740_build_bw_table()
646 msg->ddr_cmds_num = 3; in a740_build_bw_table()
647 msg->ddr_wait_bitmask = 0x7; in a740_build_bw_table()
649 msg->ddr_cmds_addrs[0] = cmd_db_read_addr("SH0"); in a740_build_bw_table()
650 msg->ddr_cmds_addrs[1] = cmd_db_read_addr("MC0"); in a740_build_bw_table()
651 msg->ddr_cmds_addrs[2] = cmd_db_read_addr("ACV"); in a740_build_bw_table()
653 msg->ddr_cmds_data[0][0] = 0x40000000; in a740_build_bw_table()
654 msg->ddr_cmds_data[0][1] = 0x40000000; in a740_build_bw_table()
655 msg->ddr_cmds_data[0][2] = 0x40000000; in a740_build_bw_table()
659 msg->cnoc_cmds_num = 1; in a740_build_bw_table()
660 msg->cnoc_wait_bitmask = 0x1; in a740_build_bw_table()
662 msg->cnoc_cmds_addrs[0] = cmd_db_read_addr("CN0"); in a740_build_bw_table()
663 msg->cnoc_cmds_data[0][0] = 0x40000000; in a740_build_bw_table()
664 msg->cnoc_cmds_data[1][0] = 0x60000001; in a740_build_bw_table()
667 static void a6xx_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a6xx_build_bw_table() argument
670 msg->bw_level_num = 1; in a6xx_build_bw_table()
672 msg->ddr_cmds_num = 3; in a6xx_build_bw_table()
673 msg->ddr_wait_bitmask = 0x07; in a6xx_build_bw_table()
675 msg->ddr_cmds_addrs[0] = 0x50000; in a6xx_build_bw_table()
676 msg->ddr_cmds_addrs[1] = 0x5005c; in a6xx_build_bw_table()
677 msg->ddr_cmds_addrs[2] = 0x5000c; in a6xx_build_bw_table()
679 msg->ddr_cmds_data[0][0] = 0x40000000; in a6xx_build_bw_table()
680 msg->ddr_cmds_data[0][1] = 0x40000000; in a6xx_build_bw_table()
681 msg->ddr_cmds_data[0][2] = 0x40000000; in a6xx_build_bw_table()
688 msg->cnoc_cmds_num = 3; in a6xx_build_bw_table()
689 msg->cnoc_wait_bitmask = 0x05; in a6xx_build_bw_table()
691 msg->cnoc_cmds_addrs[0] = 0x50034; in a6xx_build_bw_table()
692 msg->cnoc_cmds_addrs[1] = 0x5007c; in a6xx_build_bw_table()
693 msg->cnoc_cmds_addrs[2] = 0x5004c; in a6xx_build_bw_table()
695 msg->cnoc_cmds_data[0][0] = 0x40000000; in a6xx_build_bw_table()
696 msg->cnoc_cmds_data[0][1] = 0x00000000; in a6xx_build_bw_table()
697 msg->cnoc_cmds_data[0][2] = 0x40000000; in a6xx_build_bw_table()
699 msg->cnoc_cmds_data[1][0] = 0x60000001; in a6xx_build_bw_table()
700 msg->cnoc_cmds_data[1][1] = 0x20000001; in a6xx_build_bw_table()
701 msg->cnoc_cmds_data[1][2] = 0x60000001; in a6xx_build_bw_table()
707 struct a6xx_hfi_msg_bw_table *msg; in a6xx_hfi_send_bw_table() local
715 msg = devm_kzalloc(gmu->dev, sizeof(*msg), GFP_KERNEL); in a6xx_hfi_send_bw_table()
716 if (!msg) in a6xx_hfi_send_bw_table()
720 a6xx_generate_bw_table(info, gmu, msg); in a6xx_hfi_send_bw_table()
722 a618_build_bw_table(msg); in a6xx_hfi_send_bw_table()
724 a619_build_bw_table(msg); in a6xx_hfi_send_bw_table()
726 a640_build_bw_table(msg); in a6xx_hfi_send_bw_table()
728 a650_build_bw_table(msg); in a6xx_hfi_send_bw_table()
730 adreno_7c3_build_bw_table(msg); in a6xx_hfi_send_bw_table()
732 a660_build_bw_table(msg); in a6xx_hfi_send_bw_table()
734 a663_build_bw_table(msg); in a6xx_hfi_send_bw_table()
736 a690_build_bw_table(msg); in a6xx_hfi_send_bw_table()
738 a730_build_bw_table(msg); in a6xx_hfi_send_bw_table()
740 a740_build_bw_table(msg); in a6xx_hfi_send_bw_table()
742 a6xx_build_bw_table(msg); in a6xx_hfi_send_bw_table()
744 gmu->bw_table = msg; in a6xx_hfi_send_bw_table()
753 struct a6xx_hfi_msg_test msg = { 0 }; in a6xx_hfi_send_test() local
755 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_TEST, &msg, sizeof(msg), in a6xx_hfi_send_test()
761 struct a6xx_hfi_msg_start msg = { 0 }; in a6xx_hfi_send_start() local
763 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_START, &msg, sizeof(msg), in a6xx_hfi_send_start()
769 struct a6xx_hfi_msg_core_fw_start msg = { 0 }; in a6xx_hfi_send_core_fw_start() local
771 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_CORE_FW_START, &msg, in a6xx_hfi_send_core_fw_start()
772 sizeof(msg), NULL, 0); in a6xx_hfi_send_core_fw_start()
777 struct a6xx_hfi_gx_bw_perf_vote_cmd msg = { 0 }; in a6xx_hfi_set_freq() local
779 msg.ack_type = 1; /* blocking */ in a6xx_hfi_set_freq()
780 msg.freq = freq_index; in a6xx_hfi_set_freq()
781 msg.bw = bw_index; in a6xx_hfi_set_freq()
783 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_GX_BW_PERF_VOTE, &msg, in a6xx_hfi_set_freq()
784 sizeof(msg), NULL, 0); in a6xx_hfi_set_freq()
789 struct a6xx_hfi_prep_slumber_cmd msg = { 0 }; in a6xx_hfi_send_prep_slumber() local
793 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PREPARE_SLUMBER, &msg, in a6xx_hfi_send_prep_slumber()
794 sizeof(msg), NULL, 0); in a6xx_hfi_send_prep_slumber()