All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: Don't report local memory size
@ 2015-05-05  8:40 Oded Gabbay
  2015-05-05 16:19 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Oded Gabbay @ 2015-05-05  8:40 UTC (permalink / raw)
  To: dri-devel

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>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 661c660..e469c4b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -728,9 +728,9 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
 		sysfs_show_32bit_prop(buffer, "max_engine_clk_fcompute",
 			dev->gpu->kfd2kgd->get_max_engine_clock_in_mhz(
 					dev->gpu->kgd));
+
 		sysfs_show_64bit_prop(buffer, "local_mem_size",
-			dev->gpu->kfd2kgd->get_vmem_size(
-					dev->gpu->kgd));
+				(unsigned long long int) 0);
 
 		sysfs_show_32bit_prop(buffer, "fw_version",
 			dev->gpu->kfd2kgd->get_fw_version(
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdkfd: Don't report local memory size
  2015-05-05  8:40 [PATCH] drm/amdkfd: Don't report local memory size Oded Gabbay
@ 2015-05-05 16:19 ` Alex Deucher
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2015-05-05 16:19 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: Maling list - DRI developers

On Tue, May 5, 2015 at 4:40 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> 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>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 661c660..e469c4b 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -728,9 +728,9 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
>                 sysfs_show_32bit_prop(buffer, "max_engine_clk_fcompute",
>                         dev->gpu->kfd2kgd->get_max_engine_clock_in_mhz(
>                                         dev->gpu->kgd));
> +
>                 sysfs_show_64bit_prop(buffer, "local_mem_size",
> -                       dev->gpu->kfd2kgd->get_vmem_size(
> -                                       dev->gpu->kgd));
> +                               (unsigned long long int) 0);
>
>                 sysfs_show_32bit_prop(buffer, "fw_version",
>                         dev->gpu->kfd2kgd->get_fw_version(
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] drm/amdkfd: Don't report local memory size
@ 2015-05-16 20:49 Oded Gabbay
  0 siblings, 0 replies; 3+ messages in thread
From: Oded Gabbay @ 2015-05-16 20:49 UTC (permalink / raw)
  To: stable; +Cc: linux-kernel, oded.gabbay

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.

Cc: stable@vger.kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 4983993..406624a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -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(
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-16 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05  8:40 [PATCH] drm/amdkfd: Don't report local memory size Oded Gabbay
2015-05-05 16:19 ` Alex Deucher
2015-05-16 20:49 Oded Gabbay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.