From patchwork Tue May 5 08:40:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 6335891 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CEB8E9F32E for ; Tue, 5 May 2015 08:40:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 112DA2034F for ; Tue, 5 May 2015 08:40:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 393A820270 for ; Tue, 5 May 2015 08:40:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72D4189FA6; Tue, 5 May 2015 01:40:32 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 18D8889FA6 for ; Tue, 5 May 2015 01:40:31 -0700 (PDT) Received: by oica37 with SMTP id a37so136154522oic.0 for ; Tue, 05 May 2015 01:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=ceny5U3krvupGpnFJjqPGpYJ2/Izm5ofcw+kVVbeIhs=; b=yQwQL420nhBPgLpaFew7wn26FkTGQVRIjBfEQMxx1/M54yzVflM6DF3mLcy0Fpjx1G caZZm4UBqe6r9AhcG3+FsX1Psls/VQmDQMrl7u/XZlbNYXuRElnpRXZx/cZSJgqapYh/ 4SyH6O8+rI8KXJcFksipqZjbnzVwL+dxAXLfkw+kYxQYPSY6psmalNfQQH/a8byP9NNy Bdpd2JF0C62DayRhYB4h92DFcOfo1f0VOax+kowXqn9oNL9geihZJp9eqWa/BiAWc+1x F4r7AhExk+/68jGAojhHRIz1jA8qQCT6VIz62ZPNq8+Lm1q0dOpzIKbLctZmBcL3dQh1 y+UQ== X-Received: by 10.182.87.228 with SMTP id bb4mr21446003obb.27.1430815229641; Tue, 05 May 2015 01:40:29 -0700 (PDT) Received: from tlv-gabbay-ws.amd.com ([2.52.13.244]) by mx.google.com with ESMTPSA id y62sm9217159oif.12.2015.05.05.01.40.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 01:40:29 -0700 (PDT) From: Oded Gabbay To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amdkfd: Don't report local memory size Date: Tue, 5 May 2015 11:40:21 +0300 Message-Id: <1430815221-22568-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Alex Deucher --- 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(