summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2018-03-15 17:27:53 -0400
committerOded Gabbay <oded.gabbay@gmail.com>2018-03-15 17:27:53 -0400
commit374200b154ae48e8f011fb74dab21f80459f9e47 (patch)
treed801c957febe2b211b23486e26d139d636535034 /drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
parent0fc8011f89feb8b2c3008583b777d097e1974660 (diff)
downloadtalos-op-linux-374200b154ae48e8f011fb74dab21f80459f9e47.tar.gz
talos-op-linux-374200b154ae48e8f011fb74dab21f80459f9e47.zip
drm/amdkfd: Add module option for testing large-BAR functionality
Simulate large-BAR system by exporting only visible memory. This limits the amount of available VRAM to the size of the BAR, but enables CPU access to VRAM. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_chardev.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_chardev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index ec0b2c0284ec..cd679cf1fd30 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -1151,6 +1151,11 @@ bool kfd_dev_is_large_bar(struct kfd_dev *dev)
{
struct kfd_local_mem_info mem_info;
+ if (debug_largebar) {
+ pr_debug("Simulate large-bar allocation on non large-bar machine\n");
+ return true;
+ }
+
if (dev->device_info->needs_iommu_device)
return false;
OpenPOWER on IntegriCloud