Lines Matching refs:msg
190 struct a6xx_hfi_msg_gmu_init_cmd msg = { 0 }; in a6xx_hfi_send_gmu_init() local
192 msg.dbg_buffer_addr = (u32) gmu->debug.iova; in a6xx_hfi_send_gmu_init()
193 msg.dbg_buffer_size = (u32) gmu->debug.size; in a6xx_hfi_send_gmu_init()
194 msg.boot_state = boot_state; in a6xx_hfi_send_gmu_init()
196 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_INIT, &msg, sizeof(msg), in a6xx_hfi_send_gmu_init()
202 struct a6xx_hfi_msg_fw_version msg = { 0 }; in a6xx_hfi_get_fw_version() local
205 msg.supported_version = (1 << 28) | (1 << 16); in a6xx_hfi_get_fw_version()
207 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_FW_VERSION, &msg, sizeof(msg), in a6xx_hfi_get_fw_version()
213 struct a6xx_hfi_msg_perf_table_v1 msg = { 0 }; in a6xx_hfi_send_perf_table_v1() local
216 msg.num_gpu_levels = gmu->nr_gpu_freqs; in a6xx_hfi_send_perf_table_v1()
217 msg.num_gmu_levels = gmu->nr_gmu_freqs; in a6xx_hfi_send_perf_table_v1()
220 msg.gx_votes[i].vote = gmu->gx_arc_votes[i]; in a6xx_hfi_send_perf_table_v1()
221 msg.gx_votes[i].freq = gmu->gpu_freqs[i] / 1000; in a6xx_hfi_send_perf_table_v1()
225 msg.cx_votes[i].vote = gmu->cx_arc_votes[i]; in a6xx_hfi_send_perf_table_v1()
226 msg.cx_votes[i].freq = gmu->gmu_freqs[i] / 1000; in a6xx_hfi_send_perf_table_v1()
229 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PERF_TABLE, &msg, sizeof(msg), in a6xx_hfi_send_perf_table_v1()
235 struct a6xx_hfi_msg_perf_table msg = { 0 }; in a6xx_hfi_send_perf_table() local
238 msg.num_gpu_levels = gmu->nr_gpu_freqs; in a6xx_hfi_send_perf_table()
239 msg.num_gmu_levels = gmu->nr_gmu_freqs; in a6xx_hfi_send_perf_table()
242 msg.gx_votes[i].vote = gmu->gx_arc_votes[i]; in a6xx_hfi_send_perf_table()
243 msg.gx_votes[i].acd = 0xffffffff; in a6xx_hfi_send_perf_table()
244 msg.gx_votes[i].freq = gmu->gpu_freqs[i] / 1000; in a6xx_hfi_send_perf_table()
248 msg.cx_votes[i].vote = gmu->cx_arc_votes[i]; in a6xx_hfi_send_perf_table()
249 msg.cx_votes[i].freq = gmu->gmu_freqs[i] / 1000; in a6xx_hfi_send_perf_table()
252 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PERF_TABLE, &msg, sizeof(msg), in a6xx_hfi_send_perf_table()
256 static void a618_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a618_build_bw_table() argument
259 msg->bw_level_num = 1; in a618_build_bw_table()
261 msg->ddr_cmds_num = 3; in a618_build_bw_table()
262 msg->ddr_wait_bitmask = 0x01; in a618_build_bw_table()
264 msg->ddr_cmds_addrs[0] = 0x50000; in a618_build_bw_table()
265 msg->ddr_cmds_addrs[1] = 0x5003c; in a618_build_bw_table()
266 msg->ddr_cmds_addrs[2] = 0x5000c; in a618_build_bw_table()
268 msg->ddr_cmds_data[0][0] = 0x40000000; in a618_build_bw_table()
269 msg->ddr_cmds_data[0][1] = 0x40000000; in a618_build_bw_table()
270 msg->ddr_cmds_data[0][2] = 0x40000000; in a618_build_bw_table()
276 msg->cnoc_cmds_num = 1; in a618_build_bw_table()
277 msg->cnoc_wait_bitmask = 0x01; in a618_build_bw_table()
279 msg->cnoc_cmds_addrs[0] = 0x5007c; in a618_build_bw_table()
280 msg->cnoc_cmds_data[0][0] = 0x40000000; in a618_build_bw_table()
281 msg->cnoc_cmds_data[1][0] = 0x60000001; in a618_build_bw_table()
284 static void a640_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a640_build_bw_table() argument
290 msg->bw_level_num = 1; in a640_build_bw_table()
292 msg->ddr_cmds_num = 3; in a640_build_bw_table()
293 msg->ddr_wait_bitmask = 0x01; in a640_build_bw_table()
295 msg->ddr_cmds_addrs[0] = 0x50000; in a640_build_bw_table()
296 msg->ddr_cmds_addrs[1] = 0x5003c; in a640_build_bw_table()
297 msg->ddr_cmds_addrs[2] = 0x5000c; in a640_build_bw_table()
299 msg->ddr_cmds_data[0][0] = 0x40000000; in a640_build_bw_table()
300 msg->ddr_cmds_data[0][1] = 0x40000000; in a640_build_bw_table()
301 msg->ddr_cmds_data[0][2] = 0x40000000; in a640_build_bw_table()
307 msg->cnoc_cmds_num = 3; in a640_build_bw_table()
308 msg->cnoc_wait_bitmask = 0x01; in a640_build_bw_table()
310 msg->cnoc_cmds_addrs[0] = 0x50034; in a640_build_bw_table()
311 msg->cnoc_cmds_addrs[1] = 0x5007c; in a640_build_bw_table()
312 msg->cnoc_cmds_addrs[2] = 0x5004c; in a640_build_bw_table()
314 msg->cnoc_cmds_data[0][0] = 0x40000000; in a640_build_bw_table()
315 msg->cnoc_cmds_data[0][1] = 0x00000000; in a640_build_bw_table()
316 msg->cnoc_cmds_data[0][2] = 0x40000000; in a640_build_bw_table()
318 msg->cnoc_cmds_data[1][0] = 0x60000001; in a640_build_bw_table()
319 msg->cnoc_cmds_data[1][1] = 0x20000001; in a640_build_bw_table()
320 msg->cnoc_cmds_data[1][2] = 0x60000001; in a640_build_bw_table()
323 static void a650_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a650_build_bw_table() argument
329 msg->bw_level_num = 1; in a650_build_bw_table()
331 msg->ddr_cmds_num = 3; in a650_build_bw_table()
332 msg->ddr_wait_bitmask = 0x01; in a650_build_bw_table()
334 msg->ddr_cmds_addrs[0] = 0x50000; in a650_build_bw_table()
335 msg->ddr_cmds_addrs[1] = 0x50004; in a650_build_bw_table()
336 msg->ddr_cmds_addrs[2] = 0x5007c; in a650_build_bw_table()
338 msg->ddr_cmds_data[0][0] = 0x40000000; in a650_build_bw_table()
339 msg->ddr_cmds_data[0][1] = 0x40000000; in a650_build_bw_table()
340 msg->ddr_cmds_data[0][2] = 0x40000000; in a650_build_bw_table()
346 msg->cnoc_cmds_num = 1; in a650_build_bw_table()
347 msg->cnoc_wait_bitmask = 0x01; in a650_build_bw_table()
349 msg->cnoc_cmds_addrs[0] = 0x500a4; in a650_build_bw_table()
350 msg->cnoc_cmds_data[0][0] = 0x40000000; in a650_build_bw_table()
351 msg->cnoc_cmds_data[1][0] = 0x60000001; in a650_build_bw_table()
354 static void a660_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a660_build_bw_table() argument
360 msg->bw_level_num = 1; in a660_build_bw_table()
362 msg->ddr_cmds_num = 3; in a660_build_bw_table()
363 msg->ddr_wait_bitmask = 0x01; in a660_build_bw_table()
365 msg->ddr_cmds_addrs[0] = 0x50004; in a660_build_bw_table()
366 msg->ddr_cmds_addrs[1] = 0x500a0; in a660_build_bw_table()
367 msg->ddr_cmds_addrs[2] = 0x50000; in a660_build_bw_table()
369 msg->ddr_cmds_data[0][0] = 0x40000000; in a660_build_bw_table()
370 msg->ddr_cmds_data[0][1] = 0x40000000; in a660_build_bw_table()
371 msg->ddr_cmds_data[0][2] = 0x40000000; in a660_build_bw_table()
377 msg->cnoc_cmds_num = 1; in a660_build_bw_table()
378 msg->cnoc_wait_bitmask = 0x01; in a660_build_bw_table()
380 msg->cnoc_cmds_addrs[0] = 0x50070; in a660_build_bw_table()
381 msg->cnoc_cmds_data[0][0] = 0x40000000; in a660_build_bw_table()
382 msg->cnoc_cmds_data[1][0] = 0x60000001; in a660_build_bw_table()
385 static void adreno_7c3_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in adreno_7c3_build_bw_table() argument
391 msg->bw_level_num = 1; in adreno_7c3_build_bw_table()
393 msg->ddr_cmds_num = 3; in adreno_7c3_build_bw_table()
394 msg->ddr_wait_bitmask = 0x07; in adreno_7c3_build_bw_table()
396 msg->ddr_cmds_addrs[0] = 0x50004; in adreno_7c3_build_bw_table()
397 msg->ddr_cmds_addrs[1] = 0x50000; in adreno_7c3_build_bw_table()
398 msg->ddr_cmds_addrs[2] = 0x50088; in adreno_7c3_build_bw_table()
400 msg->ddr_cmds_data[0][0] = 0x40000000; in adreno_7c3_build_bw_table()
401 msg->ddr_cmds_data[0][1] = 0x40000000; in adreno_7c3_build_bw_table()
402 msg->ddr_cmds_data[0][2] = 0x40000000; in adreno_7c3_build_bw_table()
408 msg->cnoc_cmds_num = 1; in adreno_7c3_build_bw_table()
409 msg->cnoc_wait_bitmask = 0x01; in adreno_7c3_build_bw_table()
411 msg->cnoc_cmds_addrs[0] = 0x5006c; in adreno_7c3_build_bw_table()
412 msg->cnoc_cmds_data[0][0] = 0x40000000; in adreno_7c3_build_bw_table()
413 msg->cnoc_cmds_data[1][0] = 0x60000001; in adreno_7c3_build_bw_table()
415 static void a6xx_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) in a6xx_build_bw_table() argument
418 msg->bw_level_num = 1; in a6xx_build_bw_table()
420 msg->ddr_cmds_num = 3; in a6xx_build_bw_table()
421 msg->ddr_wait_bitmask = 0x07; in a6xx_build_bw_table()
423 msg->ddr_cmds_addrs[0] = 0x50000; in a6xx_build_bw_table()
424 msg->ddr_cmds_addrs[1] = 0x5005c; in a6xx_build_bw_table()
425 msg->ddr_cmds_addrs[2] = 0x5000c; in a6xx_build_bw_table()
427 msg->ddr_cmds_data[0][0] = 0x40000000; in a6xx_build_bw_table()
428 msg->ddr_cmds_data[0][1] = 0x40000000; in a6xx_build_bw_table()
429 msg->ddr_cmds_data[0][2] = 0x40000000; in a6xx_build_bw_table()
436 msg->cnoc_cmds_num = 3; in a6xx_build_bw_table()
437 msg->cnoc_wait_bitmask = 0x05; in a6xx_build_bw_table()
439 msg->cnoc_cmds_addrs[0] = 0x50034; in a6xx_build_bw_table()
440 msg->cnoc_cmds_addrs[1] = 0x5007c; in a6xx_build_bw_table()
441 msg->cnoc_cmds_addrs[2] = 0x5004c; in a6xx_build_bw_table()
443 msg->cnoc_cmds_data[0][0] = 0x40000000; in a6xx_build_bw_table()
444 msg->cnoc_cmds_data[0][1] = 0x00000000; in a6xx_build_bw_table()
445 msg->cnoc_cmds_data[0][2] = 0x40000000; in a6xx_build_bw_table()
447 msg->cnoc_cmds_data[1][0] = 0x60000001; in a6xx_build_bw_table()
448 msg->cnoc_cmds_data[1][1] = 0x20000001; in a6xx_build_bw_table()
449 msg->cnoc_cmds_data[1][2] = 0x60000001; in a6xx_build_bw_table()
455 struct a6xx_hfi_msg_bw_table msg = { 0 }; in a6xx_hfi_send_bw_table() local
460 a618_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
462 a640_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
464 a650_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
466 adreno_7c3_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
468 a660_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
470 a6xx_build_bw_table(&msg); in a6xx_hfi_send_bw_table()
472 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_BW_TABLE, &msg, sizeof(msg), in a6xx_hfi_send_bw_table()
478 struct a6xx_hfi_msg_test msg = { 0 }; in a6xx_hfi_send_test() local
480 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_TEST, &msg, sizeof(msg), in a6xx_hfi_send_test()
486 struct a6xx_hfi_msg_start msg = { 0 }; in a6xx_hfi_send_start() local
488 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_START, &msg, sizeof(msg), in a6xx_hfi_send_start()
494 struct a6xx_hfi_msg_core_fw_start msg = { 0 }; in a6xx_hfi_send_core_fw_start() local
496 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_CORE_FW_START, &msg, in a6xx_hfi_send_core_fw_start()
497 sizeof(msg), NULL, 0); in a6xx_hfi_send_core_fw_start()
502 struct a6xx_hfi_gx_bw_perf_vote_cmd msg = { 0 }; in a6xx_hfi_set_freq() local
504 msg.ack_type = 1; /* blocking */ in a6xx_hfi_set_freq()
505 msg.freq = index; in a6xx_hfi_set_freq()
506 msg.bw = 0; /* TODO: bus scaling */ in a6xx_hfi_set_freq()
508 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_GX_BW_PERF_VOTE, &msg, in a6xx_hfi_set_freq()
509 sizeof(msg), NULL, 0); in a6xx_hfi_set_freq()
514 struct a6xx_hfi_prep_slumber_cmd msg = { 0 }; in a6xx_hfi_send_prep_slumber() local
518 return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PREPARE_SLUMBER, &msg, in a6xx_hfi_send_prep_slumber()
519 sizeof(msg), NULL, 0); in a6xx_hfi_send_prep_slumber()