Lines Matching refs:m
47 struct cik_mqd *m; in update_cu_mask() local
56 m = get_mqd(mqd); in update_cu_mask()
57 m->compute_static_thread_mgmt_se0 = se_mask[0]; in update_cu_mask()
58 m->compute_static_thread_mgmt_se1 = se_mask[1]; in update_cu_mask()
59 m->compute_static_thread_mgmt_se2 = se_mask[2]; in update_cu_mask()
60 m->compute_static_thread_mgmt_se3 = se_mask[3]; in update_cu_mask()
63 m->compute_static_thread_mgmt_se0, in update_cu_mask()
64 m->compute_static_thread_mgmt_se1, in update_cu_mask()
65 m->compute_static_thread_mgmt_se2, in update_cu_mask()
66 m->compute_static_thread_mgmt_se3); in update_cu_mask()
69 static void set_priority(struct cik_mqd *m, struct queue_properties *q) in set_priority() argument
71 m->cp_hqd_pipe_priority = pipe_priority_map[q->priority]; in set_priority()
72 m->cp_hqd_queue_priority = q->priority; in set_priority()
92 struct cik_mqd *m; in init_mqd() local
94 m = (struct cik_mqd *) mqd_mem_obj->cpu_ptr; in init_mqd()
97 memset(m, 0, ALIGN(sizeof(struct cik_mqd), 256)); in init_mqd()
99 m->header = 0xC0310800; in init_mqd()
100 m->compute_pipelinestat_enable = 1; in init_mqd()
101 m->compute_static_thread_mgmt_se0 = 0xFFFFFFFF; in init_mqd()
102 m->compute_static_thread_mgmt_se1 = 0xFFFFFFFF; in init_mqd()
103 m->compute_static_thread_mgmt_se2 = 0xFFFFFFFF; in init_mqd()
104 m->compute_static_thread_mgmt_se3 = 0xFFFFFFFF; in init_mqd()
111 m->cp_hqd_persistent_state = in init_mqd()
114 m->cp_mqd_control = MQD_CONTROL_PRIV_STATE_EN; 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 = QUANTUM_EN | QUANTUM_SCALE_1MS | in init_mqd()
130 set_priority(m, q); in init_mqd()
133 m->cp_hqd_iq_rptr = AQL_ENABLE; in init_mqd()
135 *mqd = m; in init_mqd()
138 mm->update_mqd(mm, m, q); in init_mqd()
145 struct cik_sdma_rlc_registers *m; in init_mqd_sdma() local
147 m = (struct cik_sdma_rlc_registers *) mqd_mem_obj->cpu_ptr; in init_mqd_sdma()
149 memset(m, 0, sizeof(struct cik_sdma_rlc_registers)); in init_mqd_sdma()
151 *mqd = m; in init_mqd_sdma()
155 mm->update_mqd(mm, m, q); in init_mqd_sdma()
190 struct cik_mqd *m; in __update_mqd() local
192 m = get_mqd(mqd); in __update_mqd()
193 m->cp_hqd_pq_control = DEFAULT_RPTR_BLOCK_SIZE | in __update_mqd()
195 m->cp_hqd_ib_control = DEFAULT_MIN_IB_AVAIL_SIZE; in __update_mqd()
197 m->cp_hqd_pq_control |= PQ_ATC_EN; in __update_mqd()
198 m->cp_hqd_ib_control |= IB_ATC_EN; in __update_mqd()
205 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in __update_mqd()
206 m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8); in __update_mqd()
207 m->cp_hqd_pq_base_hi = upper_32_bits((uint64_t)q->queue_address >> 8); in __update_mqd()
208 m->cp_hqd_pq_rptr_report_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in __update_mqd()
209 m->cp_hqd_pq_rptr_report_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in __update_mqd()
210 m->cp_hqd_pq_doorbell_control = DOORBELL_OFFSET(q->doorbell_off); in __update_mqd()
212 m->cp_hqd_vmid = q->vmid; in __update_mqd()
215 m->cp_hqd_pq_control |= NO_UPDATE_RPTR; in __update_mqd()
218 set_priority(m, q); in __update_mqd()
231 struct cik_mqd *m = (struct cik_mqd *)mqd; in read_doorbell_id() local
233 return m->queue_doorbell_id0; in read_doorbell_id()
245 struct cik_sdma_rlc_registers *m; in update_mqd_sdma() local
247 m = get_sdma_mqd(mqd); in update_mqd_sdma()
248 m->sdma_rlc_rb_cntl = order_base_2(q->queue_size / 4) in update_mqd_sdma()
254 m->sdma_rlc_rb_base = lower_32_bits(q->queue_address >> 8); in update_mqd_sdma()
255 m->sdma_rlc_rb_base_hi = upper_32_bits(q->queue_address >> 8); in update_mqd_sdma()
256 m->sdma_rlc_rb_rptr_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
257 m->sdma_rlc_rb_rptr_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in update_mqd_sdma()
258 m->sdma_rlc_doorbell = in update_mqd_sdma()
261 m->sdma_rlc_virtual_addr = q->sdma_vm_addr; in update_mqd_sdma()
263 m->sdma_engine_id = q->sdma_engine_id; in update_mqd_sdma()
264 m->sdma_queue_id = q->sdma_queue_id; in update_mqd_sdma()
323 struct cik_mqd *m; in update_mqd_hiq() local
325 m = get_mqd(mqd); in update_mqd_hiq()
326 m->cp_hqd_pq_control = DEFAULT_RPTR_BLOCK_SIZE | in update_mqd_hiq()
335 m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1; in update_mqd_hiq()
336 m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8); in update_mqd_hiq()
337 m->cp_hqd_pq_base_hi = upper_32_bits((uint64_t)q->queue_address >> 8); in update_mqd_hiq()
338 m->cp_hqd_pq_rptr_report_addr_lo = lower_32_bits((uint64_t)q->read_ptr); in update_mqd_hiq()
339 m->cp_hqd_pq_rptr_report_addr_hi = upper_32_bits((uint64_t)q->read_ptr); in update_mqd_hiq()
340 m->cp_hqd_pq_doorbell_control = DOORBELL_OFFSET(q->doorbell_off); in update_mqd_hiq()
342 m->cp_hqd_vmid = q->vmid; in update_mqd_hiq()
346 set_priority(m, q); in update_mqd_hiq()
351 static int debugfs_show_mqd(struct seq_file *m, void *data) in debugfs_show_mqd() argument
353 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd()
358 static int debugfs_show_mqd_sdma(struct seq_file *m, void *data) in debugfs_show_mqd_sdma() argument
360 seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4, in debugfs_show_mqd_sdma()