Lines Matching +full:8 +full:m
48 struct v10_compute_mqd *m; in update_cu_mask() local
57 m = get_mqd(mqd); in update_cu_mask()
58 m->compute_static_thread_mgmt_se0 = se_mask[0]; in update_cu_mask()
59 m->compute_static_thread_mgmt_se1 = se_mask[1]; in update_cu_mask()
60 m->compute_static_thread_mgmt_se2 = se_mask[2]; in update_cu_mask()
61 m->compute_static_thread_mgmt_se3 = se_mask[3]; in update_cu_mask()
64 m->compute_static_thread_mgmt_se0, in update_cu_mask()
65 m->compute_static_thread_mgmt_se1, in update_cu_mask()
66 m->compute_static_thread_mgmt_se2, in update_cu_mask()
67 m->compute_static_thread_mgmt_se3); in update_cu_mask()
70 static void set_priority(struct v10_compute_mqd *m, struct queue_properties *q) in set_priority() argument
72 m->cp_hqd_pipe_priority = pipe_priority_map[q->priority]; in set_priority()
73 m->cp_hqd_queue_priority = q->priority; in set_priority()
93 struct v10_compute_mqd *m; in init_mqd() local
95 m = (struct v10_compute_mqd *) mqd_mem_obj->cpu_ptr; in init_mqd()
98 memset(m, 0, sizeof(struct v10_compute_mqd)); in init_mqd()
100 m->header = 0xC0310800; in init_mqd()
101 m->compute_pipelinestat_enable = 1; in init_mqd()
102 m->compute_static_thread_mgmt_se0 = 0xFFFFFFFF; in init_mqd()
103 m->compute_static_thread_mgmt_se1 = 0xFFFFFFFF; in init_mqd()
104 m->compute_static_thread_mgmt_se2 = 0xFFFFFFFF; in init_mqd()
105 m->compute_static_thread_mgmt_se3 = 0xFFFFFFFF; in init_mqd()
107 m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK | in init_mqd()
110 m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT; in init_mqd()
112 m->cp_mqd_base_addr_lo = lower_32_bits(addr); in init_mqd()
113 m->cp_mqd_base_addr_hi = upper_32_bits(addr); in init_mqd()
115 m->cp_hqd_quantum = 1 << CP_HQD_QUANTUM__QUANTUM_EN__SHIFT | in init_mqd()
122 m->cp_hqd_hq_scheduler0 = 1 << 14; in init_mqd()
125 m->cp_hqd_aql_control = in init_mqd()
130 m->cp_hqd_persistent_state |= in init_mqd()
132 m->cp_hqd_ctx_save_base_addr_lo = in init_mqd()
134 m->cp_hqd_ctx_save_base_addr_hi = in init_mqd()
136 m->cp_hqd_ctx_save_size = q->ctx_save_restore_area_size; in init_mqd()
137 m->cp_hqd_cntl_stack_size = q->ctl_stack_size; in init_mqd()
138 m->cp_hqd_cntl_stack_offset = q->ctl_stack_size; in init_mqd()
139 m->cp_hqd_wg_state_offset = q->ctl_stack_size; in init_mqd()
142 *mqd = m; in init_mqd()
145 mm->update_mqd(mm, m, q, NULL); in init_mqd()
166 struct v10_compute_mqd *m; in update_mqd() local
168 m = get_mqd(mqd); in update_mqd()
170 m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT; in update_mqd()
171 m->cp_hqd_pq_control |= in update_mqd()
173 m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK; in update_mqd()
174 pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control); in update_mqd()
176 m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8); in update_mqd()
177 m->cp_hqd_pq_base_hi = upper_32_bits((uint64_t)q->queue_address >> 8); in update_mqd()
179 m->cp_hqd_pq_rptr_report_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in update_mqd()
180 m->cp_hqd_pq_rptr_report_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in update_mqd()
181 m->cp_hqd_pq_wptr_poll_addr_lo = lower_32_bits((uint64_t)q->write_ptr); in update_mqd()
182 m->cp_hqd_pq_wptr_poll_addr_hi = upper_32_bits((uint64_t)q->write_ptr); in update_mqd()
184 m->cp_hqd_pq_doorbell_control = in update_mqd()
188 m->cp_hqd_pq_doorbell_control); in update_mqd()
190 m->cp_hqd_ib_control = 3 << CP_HQD_IB_CONTROL__MIN_IB_AVAIL_SIZE__SHIFT; in update_mqd()
194 * is constrained by per-SE EOP done signal count, which is 8-bit. in update_mqd()
199 m->cp_hqd_eop_control = min(0xA, in update_mqd()
201 m->cp_hqd_eop_base_addr_lo = in update_mqd()
202 lower_32_bits(q->eop_ring_buffer_address >> 8); in update_mqd()
203 m->cp_hqd_eop_base_addr_hi = in update_mqd()
204 upper_32_bits(q->eop_ring_buffer_address >> 8); in update_mqd()
206 m->cp_hqd_iq_timer = 0; in update_mqd()
208 m->cp_hqd_vmid = q->vmid; in update_mqd()
212 m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__NO_UPDATE_RPTR_MASK | in update_mqd()
215 m->cp_hqd_pq_doorbell_control |= in update_mqd()
219 m->cp_hqd_ctx_save_control = 0; in update_mqd()
222 set_priority(m, q); in update_mqd()
229 struct v10_compute_mqd *m = (struct v10_compute_mqd *)mqd; in check_preemption_failed() local
231 return kfd_check_hiq_mqd_doorbell_id(mm->dev, m->queue_doorbell_id0, 0); in check_preemption_failed()
240 struct v10_compute_mqd *m; in get_wave_state() local
243 m = get_mqd(mqd); in get_wave_state()
246 * is written forwards. Both starts from m->cp_hqd_cntl_stack_size. in get_wave_state()
247 * Current position is at m->cp_hqd_cntl_stack_offset and in get_wave_state()
248 * m->cp_hqd_wg_state_offset, respectively. in get_wave_state()
250 *ctl_stack_used_size = m->cp_hqd_cntl_stack_size - in get_wave_state()
251 m->cp_hqd_cntl_stack_offset; in get_wave_state()
252 *save_area_used_size = m->cp_hqd_wg_state_offset - in get_wave_state()
253 m->cp_hqd_cntl_stack_size; in get_wave_state()
263 header.wave_state.wave_state_offset = m->cp_hqd_wg_state_offset; in get_wave_state()
264 header.wave_state.control_stack_offset = m->cp_hqd_cntl_stack_offset; in get_wave_state()
274 struct v10_compute_mqd *m; in checkpoint_mqd() local
276 m = get_mqd(mqd); in checkpoint_mqd()
278 memcpy(mqd_dst, m, sizeof(struct v10_compute_mqd)); in checkpoint_mqd()
288 struct v10_compute_mqd *m; in restore_mqd() local
290 m = (struct v10_compute_mqd *) mqd_mem_obj->cpu_ptr; in restore_mqd()
293 memcpy(m, mqd_src, sizeof(*m)); in restore_mqd()
295 *mqd = m; in restore_mqd()
299 m->cp_hqd_pq_doorbell_control = in restore_mqd()
303 m->cp_hqd_pq_doorbell_control); in restore_mqd()
312 struct v10_compute_mqd *m; in init_mqd_hiq() local
316 m = get_mqd(*mqd); in init_mqd_hiq()
318 m->cp_hqd_pq_control |= 1 << CP_HQD_PQ_CONTROL__PRIV_STATE__SHIFT | in init_mqd_hiq()
327 struct v10_compute_mqd *m; in destroy_hiq_mqd() local
330 m = get_mqd(mqd); in destroy_hiq_mqd()
332 doorbell_off = m->cp_hqd_pq_doorbell_control >> in destroy_hiq_mqd()
346 struct v10_sdma_mqd *m; in init_mqd_sdma() local
348 m = (struct v10_sdma_mqd *) mqd_mem_obj->cpu_ptr; in init_mqd_sdma()
350 memset(m, 0, sizeof(struct v10_sdma_mqd)); in init_mqd_sdma()
352 *mqd = m; in init_mqd_sdma()
356 mm->update_mqd(mm, m, q, NULL); in init_mqd_sdma()
365 struct v10_sdma_mqd *m; in update_mqd_sdma() local
367 m = get_sdma_mqd(mqd); in update_mqd_sdma()
368 m->sdmax_rlcx_rb_cntl = (ffs(q->queue_size / sizeof(unsigned int)) - 1) in update_mqd_sdma()
374 m->sdmax_rlcx_rb_base = lower_32_bits(q->queue_address >> 8); in update_mqd_sdma()
375 m->sdmax_rlcx_rb_base_hi = upper_32_bits(q->queue_address >> 8); in update_mqd_sdma()
376 m->sdmax_rlcx_rb_rptr_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
377 m->sdmax_rlcx_rb_rptr_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
378 m->sdmax_rlcx_doorbell_offset = in update_mqd_sdma()
381 m->sdma_engine_id = q->sdma_engine_id; in update_mqd_sdma()
382 m->sdma_queue_id = q->sdma_queue_id; in update_mqd_sdma()
383 m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT; in update_mqd_sdma()
393 struct v10_sdma_mqd *m; in checkpoint_mqd_sdma() local
395 m = get_sdma_mqd(mqd); in checkpoint_mqd_sdma()
397 memcpy(mqd_dst, m, sizeof(struct v10_sdma_mqd)); in checkpoint_mqd_sdma()
408 struct v10_sdma_mqd *m; in restore_mqd_sdma() local
410 m = (struct v10_sdma_mqd *) mqd_mem_obj->cpu_ptr; in restore_mqd_sdma()
413 memcpy(m, mqd_src, sizeof(*m)); in restore_mqd_sdma()
415 m->sdmax_rlcx_doorbell_offset = in restore_mqd_sdma()
418 *mqd = m; in restore_mqd_sdma()
427 static int debugfs_show_mqd(struct seq_file *m, void *data) in debugfs_show_mqd() argument
429 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd()
434 static int debugfs_show_mqd_sdma(struct seq_file *m, void *data) in debugfs_show_mqd_sdma() argument
436 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd_sdma()