• Home
  • Raw
  • Download

Lines Matching refs:m

50 	struct vi_mqd *m;  in update_cu_mask()  local
59 m = get_mqd(mqd); in update_cu_mask()
60 m->compute_static_thread_mgmt_se0 = se_mask[0]; in update_cu_mask()
61 m->compute_static_thread_mgmt_se1 = se_mask[1]; in update_cu_mask()
62 m->compute_static_thread_mgmt_se2 = se_mask[2]; in update_cu_mask()
63 m->compute_static_thread_mgmt_se3 = se_mask[3]; in update_cu_mask()
66 m->compute_static_thread_mgmt_se0, in update_cu_mask()
67 m->compute_static_thread_mgmt_se1, in update_cu_mask()
68 m->compute_static_thread_mgmt_se2, in update_cu_mask()
69 m->compute_static_thread_mgmt_se3); in update_cu_mask()
72 static void set_priority(struct vi_mqd *m, struct queue_properties *q) in set_priority() argument
74 m->cp_hqd_pipe_priority = pipe_priority_map[q->priority]; in set_priority()
75 m->cp_hqd_queue_priority = q->priority; in set_priority()
95 struct vi_mqd *m; in init_mqd() local
97 m = (struct vi_mqd *) mqd_mem_obj->cpu_ptr; in init_mqd()
100 memset(m, 0, sizeof(struct vi_mqd)); in init_mqd()
102 m->header = 0xC0310800; in init_mqd()
103 m->compute_pipelinestat_enable = 1; in init_mqd()
104 m->compute_static_thread_mgmt_se0 = 0xFFFFFFFF; in init_mqd()
105 m->compute_static_thread_mgmt_se1 = 0xFFFFFFFF; in init_mqd()
106 m->compute_static_thread_mgmt_se2 = 0xFFFFFFFF; in init_mqd()
107 m->compute_static_thread_mgmt_se3 = 0xFFFFFFFF; in init_mqd()
109 m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK | in init_mqd()
112 m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT | in init_mqd()
115 m->cp_mqd_base_addr_lo = lower_32_bits(addr); in init_mqd()
116 m->cp_mqd_base_addr_hi = upper_32_bits(addr); in init_mqd()
118 m->cp_hqd_quantum = 1 << CP_HQD_QUANTUM__QUANTUM_EN__SHIFT | in init_mqd()
122 set_priority(m, q); in init_mqd()
123 m->cp_hqd_eop_rptr = 1 << CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT; in init_mqd()
126 m->cp_hqd_iq_rptr = 1; in init_mqd()
129 m->compute_tba_lo = lower_32_bits(q->tba_addr >> 8); in init_mqd()
130 m->compute_tba_hi = upper_32_bits(q->tba_addr >> 8); in init_mqd()
131 m->compute_tma_lo = lower_32_bits(q->tma_addr >> 8); in init_mqd()
132 m->compute_tma_hi = upper_32_bits(q->tma_addr >> 8); in init_mqd()
133 m->compute_pgm_rsrc2 |= in init_mqd()
138 m->cp_hqd_persistent_state |= in init_mqd()
140 m->cp_hqd_ctx_save_base_addr_lo = in init_mqd()
142 m->cp_hqd_ctx_save_base_addr_hi = in init_mqd()
144 m->cp_hqd_ctx_save_size = q->ctx_save_restore_area_size; in init_mqd()
145 m->cp_hqd_cntl_stack_size = q->ctl_stack_size; in init_mqd()
146 m->cp_hqd_cntl_stack_offset = q->ctl_stack_size; in init_mqd()
147 m->cp_hqd_wg_state_offset = q->ctl_stack_size; in init_mqd()
150 *mqd = m; in init_mqd()
153 mm->update_mqd(mm, m, q); in init_mqd()
173 struct vi_mqd *m; in __update_mqd() local
175 m = get_mqd(mqd); in __update_mqd()
177 m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT | in __update_mqd()
180 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in __update_mqd()
181 pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control); in __update_mqd()
183 m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8); in __update_mqd()
184 m->cp_hqd_pq_base_hi = upper_32_bits((uint64_t)q->queue_address >> 8); in __update_mqd()
186 m->cp_hqd_pq_rptr_report_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in __update_mqd()
187 m->cp_hqd_pq_rptr_report_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in __update_mqd()
188 m->cp_hqd_pq_wptr_poll_addr_lo = lower_32_bits((uint64_t)q->write_ptr); in __update_mqd()
189 m->cp_hqd_pq_wptr_poll_addr_hi = upper_32_bits((uint64_t)q->write_ptr); in __update_mqd()
191 m->cp_hqd_pq_doorbell_control = in __update_mqd()
195 m->cp_hqd_pq_doorbell_control); in __update_mqd()
197 m->cp_hqd_eop_control = atc_bit << CP_HQD_EOP_CONTROL__EOP_ATC__SHIFT | in __update_mqd()
200 m->cp_hqd_ib_control = atc_bit << CP_HQD_IB_CONTROL__IB_ATC__SHIFT | in __update_mqd()
211 m->cp_hqd_eop_control |= min(0xA, in __update_mqd()
213 m->cp_hqd_eop_base_addr_lo = in __update_mqd()
215 m->cp_hqd_eop_base_addr_hi = in __update_mqd()
218 m->cp_hqd_iq_timer = atc_bit << CP_HQD_IQ_TIMER__IQ_ATC__SHIFT | in __update_mqd()
221 m->cp_hqd_vmid = q->vmid; in __update_mqd()
224 m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__NO_UPDATE_RPTR_MASK | in __update_mqd()
229 m->cp_hqd_ctx_save_control = in __update_mqd()
234 set_priority(m, q); in __update_mqd()
248 struct vi_mqd *m = (struct vi_mqd *)mqd; in read_doorbell_id() local
250 return m->queue_doorbell_id0; in read_doorbell_id()
289 struct vi_mqd *m; in get_wave_state() local
291 m = get_mqd(mqd); in get_wave_state()
293 *ctl_stack_used_size = m->cp_hqd_cntl_stack_size - in get_wave_state()
294 m->cp_hqd_cntl_stack_offset; in get_wave_state()
295 *save_area_used_size = m->cp_hqd_wg_state_offset - in get_wave_state()
296 m->cp_hqd_cntl_stack_size; in get_wave_state()
310 struct vi_mqd *m; in init_mqd_hiq() local
313 m = get_mqd(*mqd); in init_mqd_hiq()
315 m->cp_hqd_pq_control |= 1 << CP_HQD_PQ_CONTROL__PRIV_STATE__SHIFT | in init_mqd_hiq()
329 struct vi_sdma_mqd *m; in init_mqd_sdma() local
331 m = (struct vi_sdma_mqd *) mqd_mem_obj->cpu_ptr; in init_mqd_sdma()
333 memset(m, 0, sizeof(struct vi_sdma_mqd)); in init_mqd_sdma()
335 *mqd = m; in init_mqd_sdma()
339 mm->update_mqd(mm, m, q); in init_mqd_sdma()
354 struct vi_sdma_mqd *m; in update_mqd_sdma() local
356 m = get_sdma_mqd(mqd); in update_mqd_sdma()
357 m->sdmax_rlcx_rb_cntl = order_base_2(q->queue_size / 4) in update_mqd_sdma()
363 m->sdmax_rlcx_rb_base = lower_32_bits(q->queue_address >> 8); in update_mqd_sdma()
364 m->sdmax_rlcx_rb_base_hi = upper_32_bits(q->queue_address >> 8); in update_mqd_sdma()
365 m->sdmax_rlcx_rb_rptr_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
366 m->sdmax_rlcx_rb_rptr_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
367 m->sdmax_rlcx_doorbell = in update_mqd_sdma()
370 m->sdmax_rlcx_virtual_addr = q->sdma_vm_addr; in update_mqd_sdma()
372 m->sdma_engine_id = q->sdma_engine_id; in update_mqd_sdma()
373 m->sdma_queue_id = q->sdma_queue_id; in update_mqd_sdma()
399 static int debugfs_show_mqd(struct seq_file *m, void *data) in debugfs_show_mqd() argument
401 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd()
406 static int debugfs_show_mqd_sdma(struct seq_file *m, void *data) in debugfs_show_mqd_sdma() argument
408 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd_sdma()