mec               151 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 			.num_pipe_per_mec = adev->gfx.mec.num_pipe_per_mec,
mec               152 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 			.num_queue_per_pipe = adev->gfx.mec.num_queue_per_pipe,
mec               165 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 				  adev->gfx.mec.queue_bitmap,
mec               180 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 				* adev->gfx.mec.num_pipe_per_mec
mec               181 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 				* adev->gfx.mec.num_queue_per_pipe;
mec               178 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe,
mec               184 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	nv_grbm_select(adev, mec, pipe, queue, vmid);
mec               200 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               201 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               203 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	lock_srbm(kgd, mec, pipe, queue_id, 0);
mec               209 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	unsigned int bit = (pipe_id * adev->gfx.mec.num_queue_per_pipe +
mec               292 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	uint32_t mec;
mec               295 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               296 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               298 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 	lock_srbm(kgd, mec, pipe, 0, 0);
mec               374 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 		uint32_t value, mec, pipe;
mec               376 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 		mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               377 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 		pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               380 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 			mec, pipe, queue_id);
mec               383 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c 			((mec << 5) | (pipe << 3) | queue_id | 0x80));
mec               209 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe,
mec               213 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	uint32_t value = PIPEID(pipe) | MEID(mec) | VMID(vmid) | QUEUEID(queue);
mec               232 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               233 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               235 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	lock_srbm(kgd, mec, pipe, queue_id, 0);
mec               290 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	uint32_t mec;
mec               293 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               294 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               296 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c 	lock_srbm(kgd, mec, pipe, 0, 0);
mec               165 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe,
mec               169 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	uint32_t value = PIPEID(pipe) | MEID(mec) | VMID(vmid) | QUEUEID(queue);
mec               188 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               189 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               191 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	lock_srbm(kgd, mec, pipe, queue_id, 0);
mec               247 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	uint32_t mec;
mec               250 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               251 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               253 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 	lock_srbm(kgd, mec, pipe, 0, 0);
mec               301 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 		uint32_t value, mec, pipe;
mec               303 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 		mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               304 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 		pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               307 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 			mec, pipe, queue_id);
mec               310 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c 			((mec << 5) | (pipe << 3) | queue_id | 0x80));
mec                89 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c static void lock_srbm(struct kgd_dev *kgd, uint32_t mec, uint32_t pipe,
mec                95 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	soc15_grbm_select(adev, mec, pipe, queue, vmid);
mec               111 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               112 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               114 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	lock_srbm(kgd, mec, pipe, queue_id, 0);
mec               120 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	unsigned int bit = (pipe_id * adev->gfx.mec.num_queue_per_pipe +
mec               212 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	uint32_t mec;
mec               215 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               216 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               218 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 	lock_srbm(kgd, mec, pipe, 0, 0);
mec               275 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 		uint32_t value, mec, pipe;
mec               277 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 		mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1;
mec               278 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 		pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec);
mec               281 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 			mec, pipe, queue_id);
mec               284 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c 			((mec << 5) | (pipe << 3) | queue_id | 0x80));
mec                37 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c int amdgpu_gfx_mec_queue_to_bit(struct amdgpu_device *adev, int mec,
mec                42 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	bit += mec * adev->gfx.mec.num_pipe_per_mec
mec                43 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		* adev->gfx.mec.num_queue_per_pipe;
mec                44 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	bit += pipe * adev->gfx.mec.num_queue_per_pipe;
mec                51 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 				 int *mec, int *pipe, int *queue)
mec                53 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	*queue = bit % adev->gfx.mec.num_queue_per_pipe;
mec                54 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	*pipe = (bit / adev->gfx.mec.num_queue_per_pipe)
mec                55 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		% adev->gfx.mec.num_pipe_per_mec;
mec                56 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	*mec = (bit / adev->gfx.mec.num_queue_per_pipe)
mec                57 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	       / adev->gfx.mec.num_pipe_per_mec;
mec                62 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 				     int mec, int pipe, int queue)
mec                64 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	return test_bit(amdgpu_gfx_mec_queue_to_bit(adev, mec, pipe, queue),
mec                65 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			adev->gfx.mec.queue_bitmap);
mec               191 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	return adev->gfx.mec.num_mec > 1;
mec               196 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	int i, queue, pipe, mec;
mec               201 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		queue = i % adev->gfx.mec.num_queue_per_pipe;
mec               202 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		pipe = (i / adev->gfx.mec.num_queue_per_pipe)
mec               203 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			% adev->gfx.mec.num_pipe_per_mec;
mec               204 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		mec = (i / adev->gfx.mec.num_queue_per_pipe)
mec               205 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			/ adev->gfx.mec.num_pipe_per_mec;
mec               208 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		if (mec >= adev->gfx.mec.num_mec)
mec               213 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			if (mec == 0 && queue < 2)
mec               214 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 				set_bit(i, adev->gfx.mec.queue_bitmap);
mec               217 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			if (mec == 0 && pipe == 0)
mec               218 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 				set_bit(i, adev->gfx.mec.queue_bitmap);
mec               224 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		bitmap_weight(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
mec               260 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	int mec, pipe, queue;
mec               262 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	queue_bit = adev->gfx.mec.num_mec
mec               263 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		    * adev->gfx.mec.num_pipe_per_mec
mec               264 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		    * adev->gfx.mec.num_queue_per_pipe;
mec               267 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		if (test_bit(queue_bit, adev->gfx.mec.queue_bitmap))
mec               270 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		amdgpu_gfx_bit_to_mec_queue(adev, queue_bit, &mec, &pipe, &queue);
mec               277 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		if ((mec == 1 && pipe > 1) || queue != 0)
mec               280 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		ring->me = mec + 1;
mec               387 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		adev->gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS] = kmalloc(mqd_size, GFP_KERNEL);
mec               388 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		if (!adev->gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS])
mec               426 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			adev->gfx.mec.mqd_backup[i] = kmalloc(mqd_size, GFP_KERNEL);
mec               427 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 			if (!adev->gfx.mec.mqd_backup[i])
mec               452 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		kfree(adev->gfx.mec.mqd_backup[i]);
mec               461 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 	kfree(adev->gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS]);
mec               498 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c 		if (!test_bit(i, adev->gfx.mec.queue_bitmap))
mec               263 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h 	struct amdgpu_mec		mec;
mec               375 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h int amdgpu_gfx_mec_queue_to_bit(struct amdgpu_device *adev, int mec,
mec               378 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h 				 int *mec, int *pipe, int *queue);
mec               379 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h bool amdgpu_gfx_is_mec_queue_enabled(struct amdgpu_device *adev, int mec,
mec              1031 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
mec              1032 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.mec_fw_obj, NULL, NULL);
mec              1061 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	bitmap_zero(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
mec              1069 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 				      &adev->gfx.mec.hpd_eop_obj,
mec              1070 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 				      &adev->gfx.mec.hpd_eop_gpu_addr,
mec              1078 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
mec              1080 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
mec              1081 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
mec              1092 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 					      &adev->gfx.mec.mec_fw_obj,
mec              1093 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 					      &adev->gfx.mec.mec_fw_gpu_addr,
mec              1103 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		amdgpu_bo_kunmap(adev->gfx.mec.mec_fw_obj);
mec              1104 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		amdgpu_bo_unreserve(adev->gfx.mec.mec_fw_obj);
mec              1270 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 				       int mec, int pipe, int queue)
mec              1279 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	ring->me = mec + 1;
mec              1286 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
mec              1291 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
mec              1316 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_mec = 2;
mec              1317 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_pipe_per_mec = 4;
mec              1318 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_queue_per_pipe = 8;
mec              1324 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_mec = 1;
mec              1325 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_pipe_per_mec = 4;
mec              1326 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		adev->gfx.mec.num_queue_per_pipe = 8;
mec              1394 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	for (i = 0; i < adev->gfx.mec.num_mec; ++i) {
mec              1395 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		for (j = 0; j < adev->gfx.mec.num_queue_per_pipe; j++) {
mec              1396 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 			for (k = 0; k < adev->gfx.mec.num_pipe_per_mec; k++) {
mec              2982 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_LO, adev->gfx.mec.mec_fw_gpu_addr &
mec              2985 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		     upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
mec              3507 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3508 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(*mqd));
mec              3528 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3529 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
mec              3549 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3550 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
mec              3553 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3554 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(*mqd));
mec              2797 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
mec              2806 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	bitmap_zero(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
mec              2812 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	mec_hpd_size = adev->gfx.mec.num_mec * adev->gfx.mec.num_pipe_per_mec
mec              2817 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 				      &adev->gfx.mec.hpd_eop_obj,
mec              2818 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 				      &adev->gfx.mec.hpd_eop_gpu_addr,
mec              2829 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
mec              2830 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
mec              2875 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 				       int mec, int pipe)
mec              2879 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	size_t eop_offset = (mec * adev->gfx.mec.num_pipe_per_mec + pipe)
mec              2883 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr + eop_offset;
mec              2885 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	cik_srbm_select(adev, mec + 1, pipe, 0, 0);
mec              3124 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	for (i = 0; i < adev->gfx.mec.num_mec; i++)
mec              3125 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 		for (j = 0; j < adev->gfx.mec.num_pipe_per_mec; j++)
mec              4399 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 					int mec, int pipe, int queue)
mec              4406 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	ring->me = mec + 1;
mec              4416 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
mec              4437 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 		adev->gfx.mec.num_mec = 2;
mec              4444 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 		adev->gfx.mec.num_mec = 1;
mec              4447 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	adev->gfx.mec.num_pipe_per_mec = 4;
mec              4448 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	adev->gfx.mec.num_queue_per_pipe = 8;
mec              4500 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 	for (i = 0; i < adev->gfx.mec.num_mec; ++i) {
mec              4501 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 		for (j = 0; j < adev->gfx.mec.num_queue_per_pipe; j++) {
mec              4502 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 			for (k = 0; k < adev->gfx.mec.num_pipe_per_mec; k++) {
mec              1359 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
mec              1368 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	bitmap_zero(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
mec              1377 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 				      &adev->gfx.mec.hpd_eop_obj,
mec              1378 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 				      &adev->gfx.mec.hpd_eop_gpu_addr,
mec              1387 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
mec              1388 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
mec              1915 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 					int mec, int pipe, int queue)
mec              1924 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	ring->me = mec + 1;
mec              1931 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
mec              1936 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
mec              1966 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		adev->gfx.mec.num_mec = 2;
mec              1971 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		adev->gfx.mec.num_mec = 1;
mec              1975 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	adev->gfx.mec.num_pipe_per_mec = 4;
mec              1976 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	adev->gfx.mec.num_queue_per_pipe = 8;
mec              2053 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	for (i = 0; i < adev->gfx.mec.num_mec; ++i) {
mec              2054 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		for (j = 0; j < adev->gfx.mec.num_queue_per_pipe; j++) {
mec              2055 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 			for (k = 0; k < adev->gfx.mec.num_pipe_per_mec; k++) {
mec              4382 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		if (!test_bit(i, adev->gfx.mec.queue_bitmap))
mec              4647 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              4648 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
mec              4669 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              4670 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct vi_mqd_allocation));
mec              4692 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              4693 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct vi_mqd_allocation));
mec              4696 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              4697 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
mec              6282 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 	pipe_num = ring->me * adev->gfx.mec.num_pipe_per_mec + ring->pipe;
mec              1713 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
mec              1714 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_free_kernel(&adev->gfx.mec.mec_fw_obj, NULL, NULL);
mec              1728 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	bitmap_zero(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
mec              1736 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 				      &adev->gfx.mec.hpd_eop_obj,
mec              1737 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 				      &adev->gfx.mec.hpd_eop_gpu_addr,
mec              1745 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
mec              1747 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
mec              1748 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
mec              1759 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 				      &adev->gfx.mec.mec_fw_obj,
mec              1760 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 				      &adev->gfx.mec.mec_fw_gpu_addr,
mec              1770 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_kunmap(adev->gfx.mec.mec_fw_obj);
mec              1771 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	amdgpu_bo_unreserve(adev->gfx.mec.mec_fw_obj);
mec              2157 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 				      int mec, int pipe, int queue)
mec              2166 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	ring->me = mec + 1;
mec              2173 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
mec              2178 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
mec              2205 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		adev->gfx.mec.num_mec = 2;
mec              2208 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		adev->gfx.mec.num_mec = 1;
mec              2212 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	adev->gfx.mec.num_pipe_per_mec = 4;
mec              2213 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	adev->gfx.mec.num_queue_per_pipe = 8;
mec              2284 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	for (i = 0; i < adev->gfx.mec.num_mec; ++i) {
mec              2285 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		for (j = 0; j < adev->gfx.mec.num_queue_per_pipe; j++) {
mec              2286 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 			for (k = 0; k < adev->gfx.mec.num_pipe_per_mec; k++) {
mec              3309 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		adev->gfx.mec.mec_fw_gpu_addr & 0xFFFFF000);
mec              3311 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
mec              3349 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		if (!test_bit(i, adev->gfx.mec.queue_bitmap))
mec              3706 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3707 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct v9_mqd_allocation));
mec              3729 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3730 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct v9_mqd_allocation));
mec              3752 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3753 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct v9_mqd_allocation));
mec              3756 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 		if (adev->gfx.mec.mqd_backup[mqd_idx])
mec              3757 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct v9_mqd_allocation));
mec              5161 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 	pipe_num = ring->me * adev->gfx.mec.num_pipe_per_mec + ring->pipe;
mec                72 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static bool is_pipe_enabled(struct device_queue_manager *dqm, int mec, int pipe)
mec                75 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c 	int pipe_offset = mec * dqm->dev->shared_resources.num_pipe_per_mec
mec               973 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c 	int i, mec;
mec               980 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c 		mec = (i / dqm->dev->shared_resources.num_queue_per_pipe)
mec               987 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c 		if (mec > 0)
mec               496 drivers/gpu/drm/amd/amdkfd/kfd_priv.h 	uint32_t mec;
mec              4376 drivers/gpu/drm/radeon/cik.c 	if (rdev->mec.hpd_eop_obj) {
mec              4377 drivers/gpu/drm/radeon/cik.c 		r = radeon_bo_reserve(rdev->mec.hpd_eop_obj, false);
mec              4380 drivers/gpu/drm/radeon/cik.c 		radeon_bo_unpin(rdev->mec.hpd_eop_obj);
mec              4381 drivers/gpu/drm/radeon/cik.c 		radeon_bo_unreserve(rdev->mec.hpd_eop_obj);
mec              4383 drivers/gpu/drm/radeon/cik.c 		radeon_bo_unref(&rdev->mec.hpd_eop_obj);
mec              4384 drivers/gpu/drm/radeon/cik.c 		rdev->mec.hpd_eop_obj = NULL;
mec              4400 drivers/gpu/drm/radeon/cik.c 		rdev->mec.num_mec = 2;
mec              4402 drivers/gpu/drm/radeon/cik.c 		rdev->mec.num_mec = 1;
mec              4403 drivers/gpu/drm/radeon/cik.c 	rdev->mec.num_pipe = 4;
mec              4404 drivers/gpu/drm/radeon/cik.c 	rdev->mec.num_queue = rdev->mec.num_mec * rdev->mec.num_pipe * 8;
mec              4406 drivers/gpu/drm/radeon/cik.c 	if (rdev->mec.hpd_eop_obj == NULL) {
mec              4408 drivers/gpu/drm/radeon/cik.c 				     rdev->mec.num_mec *rdev->mec.num_pipe * MEC_HPD_SIZE * 2,
mec              4411 drivers/gpu/drm/radeon/cik.c 				     &rdev->mec.hpd_eop_obj);
mec              4418 drivers/gpu/drm/radeon/cik.c 	r = radeon_bo_reserve(rdev->mec.hpd_eop_obj, false);
mec              4423 drivers/gpu/drm/radeon/cik.c 	r = radeon_bo_pin(rdev->mec.hpd_eop_obj, RADEON_GEM_DOMAIN_GTT,
mec              4424 drivers/gpu/drm/radeon/cik.c 			  &rdev->mec.hpd_eop_gpu_addr);
mec              4430 drivers/gpu/drm/radeon/cik.c 	r = radeon_bo_kmap(rdev->mec.hpd_eop_obj, (void **)&hpd);
mec              4438 drivers/gpu/drm/radeon/cik.c 	memset(hpd, 0, rdev->mec.num_mec *rdev->mec.num_pipe * MEC_HPD_SIZE * 2);
mec              4440 drivers/gpu/drm/radeon/cik.c 	radeon_bo_kunmap(rdev->mec.hpd_eop_obj);
mec              4441 drivers/gpu/drm/radeon/cik.c 	radeon_bo_unreserve(rdev->mec.hpd_eop_obj);
mec              4546 drivers/gpu/drm/radeon/cik.c 	for (i = 0; i < (rdev->mec.num_pipe * rdev->mec.num_mec); ++i) {
mec              4552 drivers/gpu/drm/radeon/cik.c 		eop_gpu_addr = rdev->mec.hpd_eop_gpu_addr + (i * MEC_HPD_SIZE * 2) ;
mec              2410 drivers/gpu/drm/radeon/radeon.h 	struct radeon_mec mec;