drm/amdkfd: Don't report local memory size
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 5 May 2015 08:15:07 +0000 (11:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 15:21:09 +0000 (08:21 -0700)
commit 42e08c78360e58516b6ac8af18a75a494f2967a2 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.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index 498399323a8cd503f35fb3e828abf08c2368cad8..406624a0b201b25594459febb1af9afe49c33e3e 100644 (file)
@@ -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(