Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d87c9cf authored by Kent Russell's avatar Kent Russell Committed by Alex Deucher
Browse files

drm/amdkfd: Cosmetic cleanup



Fix some spacing issues, log output, uses of !=NULL/==NULL, unneeded
extra lines and clean up a declaration from =1 to =true for clarity

Signed-off-by: default avatarKent Russell <kent.russell@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5980bcaa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
		};

		/* this is going to have a few of the MSBs set that we need to
		 * clear */
		 * clear
		 */
		bitmap_complement(gpu_resources.queue_bitmap,
				  adev->gfx.mec.queue_bitmap,
				  KGD_MAX_QUEUES);
@@ -163,7 +164,8 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
				  gpu_resources.queue_bitmap);

		/* According to linux/bitmap.h we shouldn't use bitmap_clear if
		 * nbits is not compile time constant */
		 * nbits is not compile time constant
		 */
		last_valid_bit = 1 /* only first MEC can have compute queues */
				* adev->gfx.mec.num_pipe_per_mec
				* adev->gfx.mec.num_queue_per_pipe;
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ static inline uint32_t get_sdma_base_addr(struct cik_sdma_rlc_registers *m)
	retval = m->sdma_engine_id * SDMA1_REGISTER_OFFSET +
			m->sdma_queue_id * KFD_CIK_SDMA_QUEUE_OFFSET;

	pr_debug("kfd: sdma base address: 0x%x\n", retval);
	pr_debug("sdma base address: 0x%x\n", retval);

	return retval;
}
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ static inline uint32_t get_sdma_base_addr(struct vi_sdma_mqd *m)

	retval = m->sdma_engine_id * SDMA1_REGISTER_OFFSET +
		m->sdma_queue_id * KFD_VI_SDMA_QUEUE_OFFSET;
	pr_debug("kfd: sdma base address: 0x%x\n", retval);
	pr_debug("sdma base address: 0x%x\n", retval);

	return retval;
}
+1 −1
Original line number Diff line number Diff line
@@ -1410,7 +1410,7 @@ int amdgpu_amdkfd_gpuvm_map_memory_to_gpu(
			ret = map_bo_to_gpuvm(adev, entry, ctx.sync,
					      is_invalid_userptr);
			if (ret) {
				pr_err("Failed to map radeon bo to gpuvm\n");
				pr_err("Failed to map bo to gpuvm\n");
				goto map_bo_to_gpuvm_failed;
			}

+1 −1
Original line number Diff line number Diff line
@@ -522,7 +522,7 @@ static int kfd_ioctl_set_trap_handler(struct file *filep,
	struct kfd_process_device *pdd;

	dev = kfd_device_by_id(args->gpu_id);
	if (dev == NULL)
	if (!dev)
		return -EINVAL;

	mutex_lock(&p->mutex);
Loading