diff options
author | Michael Varga <Michael.Varga@amd.com> | 2014-04-04 12:21:47 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-05-04 09:48:12 +0300 |
commit | 64b41e9f9367e8158636c298df25163181d48e0c (patch) | |
tree | 1877fdab9d77a192c14b69fe967ebed5d56ef4ce | |
parent | 1898c7559954cd4724c8c5d89bd3c1096cc248c5 (diff) |
hsa/radeon: debugging print statements
Added debug print statements so critical errors during init may be debugged more easily.
Signed-off-by: Michael Varga <Michael.Varga@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
-rw-r--r-- | drivers/gpu/hsa/radeon/kfd_device.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/gpu/hsa/radeon/kfd_device.c b/drivers/gpu/hsa/radeon/kfd_device.c index ab8f8677525b..6e5200794cc3 100644 --- a/drivers/gpu/hsa/radeon/kfd_device.c +++ b/drivers/gpu/hsa/radeon/kfd_device.c @@ -106,20 +106,30 @@ device_iommu_pasid_init(struct kfd_dev *kfd) int err; err = amd_iommu_device_info(kfd->pdev, &iommu_info); - if (err < 0) + if (err < 0) { + dev_err(kfd_device, "error getting iommu info. is the iommu enabled?\n"); return false; + } - if ((iommu_info.flags & required_iommu_flags) != required_iommu_flags) + if ((iommu_info.flags & required_iommu_flags) != required_iommu_flags) { + dev_err(kfd_device, "error required iommu flags ats(%i), pri(%i), pasid(%i)\n", + (iommu_info.flags & AMD_IOMMU_DEVICE_FLAG_ATS_SUP) != 0, + (iommu_info.flags & AMD_IOMMU_DEVICE_FLAG_PRI_SUP) != 0, + (iommu_info.flags & AMD_IOMMU_DEVICE_FLAG_PASID_SUP) != 0); return false; + } pasid_limit = min_t(pasid_t, (pasid_t)1 << kfd->device_info->max_pasid_bits, iommu_info.max_pasids); pasid_limit = min_t(pasid_t, pasid_limit, kfd->doorbell_process_limit); err = amd_iommu_init_device(kfd->pdev, pasid_limit); - if (err < 0) + if (err < 0) { + dev_err(kfd_device, "error initializing iommu device\n"); return false; + } if (!radeon_kfd_set_pasid_limit(pasid_limit)) { + dev_err(kfd_device, "error setting pasid limit\n"); amd_iommu_free_device(kfd->pdev); return false; } @@ -164,6 +174,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, kfd->device_info->scheduler_class->start(kfd->scheduler); kfd->init_complete = true; + dev_info(kfd_device, "added device (%x:%x)\n", kfd->pdev->vendor, + kfd->pdev->device); return true; } |