Skip to contentSkip to conversation

drm/amdkfd: Don't report local memory size

PATCH New Oded Gabbay 1 participant 1 message May 16, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: Don't report local memory size

commit 42e08c78360e ("drm/amdkfd: Don't report local memory size") upstream.

This patch sets the local memory size that is reported to userspace to 0. This is done to make sure that userspace won't try to allocate local memory for HSA.

As long as amdkfd doesn't support allocating local memory for HSA, we need this patch.

---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -1
index 4983993..406624a 100644
@@ -729,7 +729,7 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
 				kfd2kgd->get_max_engine_clock_in_mhz(
 					dev->gpu->kgd));
 		sysfs_show_64bit_prop(buffer, "local_mem_size",
-				kfd2kgd->get_vmem_size(dev->gpu->kgd));
+				(unsigned long long int) 0);
 
 		sysfs_show_32bit_prop(buffer, "fw_version",
 				kfd2kgd->get_fw_version(
Signature · 1 line
2.1.0