From patchwork Thu May 25 15:52:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 13255411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04E08C77B7A for ; Thu, 25 May 2023 15:52:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E3E810E185; Thu, 25 May 2023 15:52:37 +0000 (UTC) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id 55DBA10E185; Thu, 25 May 2023 15:52:36 +0000 (UTC) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64d426e63baso2622737b3a.0; Thu, 25 May 2023 08:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685029954; x=1687621954; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=B028AMgHgIkluZU0zuRGNx2AL7YCJmhMQ1JhCo1iuVI=; b=aNjbFnxBXnxByFTRM8dPMKH30Q/RAItyAVPrx2g23rtM7K5RWxj+jmeY6jXFFznBG8 pZqa5Xzxd1RRC2cPJg3QGgjGxOjLvyujqb9O9tcPfbR593fGXpYl3mOh5ZMS70oGFBGx /kODJQcTOcwHEpMnyoc86lxFHBYsH/DD5AKNjW9UO2OsMqqQ2MWgTe01bSRUdSQhsbPO HwPjvWfdCJ2EOfQB47cDxADCc6pqDUoGCx5AXuAzBnna+gSSbl1TzveMRSHPcwsOMc9C wHzrhMVQZe5ZakVsucQjfNI9Kib8KYriF/UaUAqKAv8sC9wrGskiyYSbQvyoaQHzfDNc wOTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685029954; x=1687621954; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B028AMgHgIkluZU0zuRGNx2AL7YCJmhMQ1JhCo1iuVI=; b=dz+k+WltfBc5t4c0cdN6RQqLM+T7ywUDTyZYMBrtqzgnILK2DrUFeV9l0NoKkusJ8m mhwiwH85SczPFrGjgQEHwpcdKyw3qkIDYS0DQSe6/Xaok7PM7EW+EX2pAU2LDSJxIpVF gRVVVg8CXf9/ZaQw+i3yoPQQDIWdkroR1dfIKvDLfcsklOO6jB/im5PTeNnyD2bfzGmX hLeut/AmGixbqtepfGhNmhhIvTtMYsOL8EtcTDRlMK7pd/DY4l7+sbcvKU68o4mmZizE tAsH4SwGIMBBbm4Z9IWxkjcKYpPM+dj5XTS43Rbns2lghWtzg71t7P3n5frtmrV6yMIU NWCg== X-Gm-Message-State: AC+VfDyDg0sVznLdh4urIh4OjsgoJBumlCt5wrbyf2h5XYGwElcJL05K yU0ysmaUnul7Xx4scsF/htoINkEa2aA= X-Google-Smtp-Source: ACHHUZ7BKQyzScKNxtc9uAdkTbbH9pyva2m8zTt95GYPrMvfBGWVRwI16fpeyUdAfC7gPDigiNmWcw== X-Received: by 2002:a05:6a00:10c4:b0:646:6cc3:4a52 with SMTP id d4-20020a056a0010c400b006466cc34a52mr8951192pfu.3.1685029954365; Thu, 25 May 2023 08:52:34 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id a17-20020a62bd11000000b0063b6bd2216dsm1335974pff.187.2023.05.25.08.52.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 08:52:33 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/amdgpu: Fix no-procfs build Date: Thu, 25 May 2023 08:52:24 -0700 Message-Id: <20230525155227.560094-1-robdclark@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Neil Armstrong , Lijo Lazar , Srinivasan Shanmugam , kernel test robot , Guchun Chen , =?utf-8?b?TWFyZWsgT2zFocOhaw==?= , "Pan, Xinhui" , open list , "open list:RADEON and AMDGPU DRM DRIVERS" , =?utf-8?q?Michel_D=C3=A4nzer?= , YiPeng Chai , Mario Limonciello , Alex Deucher , Dave Airlie , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark Fixes undefined symbol when PROC_FS is not enabled. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305251510.U0R2as7k-lkp@intel.com/ Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") Signed-off-by: Rob Clark --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 1b46e7ac7cb0..c9a41c997c6c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2795,21 +2795,23 @@ static const struct drm_driver amdgpu_kms_driver = { DRIVER_SYNCOBJ_TIMELINE, .open = amdgpu_driver_open_kms, .postclose = amdgpu_driver_postclose_kms, .lastclose = amdgpu_driver_lastclose_kms, .ioctls = amdgpu_ioctls_kms, .num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms), .dumb_create = amdgpu_mode_dumb_create, .dumb_map_offset = amdgpu_mode_dumb_mmap, .fops = &amdgpu_driver_kms_fops, .release = &amdgpu_driver_release_kms, +#ifdef CONFIG_PROC_FS .show_fdinfo = amdgpu_show_fdinfo, +#endif .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, .gem_prime_import = amdgpu_gem_prime_import, .gem_prime_mmap = drm_gem_prime_mmap, .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE, .major = KMS_DRIVER_MAJOR, From patchwork Thu May 25 15:52:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 13255412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A766C77B7A for ; Thu, 25 May 2023 15:52:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57F9910E6B6; Thu, 25 May 2023 15:52:43 +0000 (UTC) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48D2110E6B5; Thu, 25 May 2023 15:52:38 +0000 (UTC) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so1573311a12.1; Thu, 25 May 2023 08:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685029957; x=1687621957; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7rVaUtme+EMgdLDqkT+0xJV+Z1WpGr8J4+UhWtVcjr8=; b=IvUB2IKXdPVzS5BHfvNthVBhxLC614xiN9wuIVEsKpqc1sdU2CVUrIYrj3r6tqujTX F3CVgK0ZbMwTucYdyQPx3X/ff411RAhSLG/vO/b+hJpLobzQSlBLoLuslMCn/hv91N3i AaJE9RtBh/wqPaSk7mLBnNqR+WhHs9sfwhB2WPeWfbQEprGfGpz6xUXwnemLMb7co5Nn KMI5V0296BHn7TijqODaERxEfhtHVC/Tb3jYa2AXbWjvmZRNNAaCK7xe+fLbnWxebTCc 1WngHtTOP2scTVVWs19ADnOWMzOQoKkacKdlvcAEYti9dTduIBqxtvADOiHZsS+4emR/ zPWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685029957; x=1687621957; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7rVaUtme+EMgdLDqkT+0xJV+Z1WpGr8J4+UhWtVcjr8=; b=go/IZTznMrDhccStBN65+tm6lLN1RZIcak7te2TL8KWrLAXmN2Y61opBFTPjRLiUVQ ylE/0f6fSnmm9HKbriEYDG4A+2NQ0jaPTf60CadydQWKyEKVCPdTuhFHRehjueLwKKCx HSA/+nFq4IcQ1aSpLjMLFWbWFuPyZE2Z3wlMYckLBLt4gYIreyTESMomVsNzeWtLsikl 4l4jjxHMn5hqFo9VCy5peajJpWTGDsG7vHMSa6zNThwTESh+cbHAGYllzusf1pGSQWAX 7t/vIKmRtV5LDbzk27w9Ndj9NEijgiMZENV4ksQnnErVgVx6sQsxnHY5OpnsIeGuYJ9R xLtw== X-Gm-Message-State: AC+VfDzoweHYwgrWglHqza8ipsY9783QdcbraUUcbo4tjRAexGtUhlXj aZJShSwHvrRX77zWGWVQPe4bwxBbtX4= X-Google-Smtp-Source: ACHHUZ5W7kiapIeT1AGeBpVKPigYmydXD2YhEImUqgogV9Ej++7d8rBHc9rIoGANlsYWGfUDQyb6OQ== X-Received: by 2002:a17:902:e852:b0:1a9:5aef:1aea with SMTP id t18-20020a170902e85200b001a95aef1aeamr2316030plg.66.1685029957214; Thu, 25 May 2023 08:52:37 -0700 (PDT) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id 9-20020a170902c10900b001a5fccab02dsm1598335pli.177.2023.05.25.08.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 08:52:36 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields Date: Thu, 25 May 2023 08:52:25 -0700 Message-Id: <20230525155227.560094-2-robdclark@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230525155227.560094-1-robdclark@gmail.com> References: <20230525155227.560094-1-robdclark@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Neil Armstrong , Shashank Sharma , =?utf-8?b?TWFyZWsgT2zFocOhaw==?= , "Pan, Xinhui" , open list , "open list:RADEON and AMDGPU DRM DRIVERS" , Tvrtko Ursulin , Alex Deucher , Dave Airlie , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark Some of the fields that are handled by drm_show_fdinfo() crept back in when rebasing the patch. Remove them again. Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") Signed-off-by: Rob Clark Reviewed-by: --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c index 13d7413d4ca3..a93e5627901a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c @@ -80,23 +80,20 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file) amdgpu_ctx_mgr_usage(&fpriv->ctx_mgr, usage); /* * ****************************************************************** * For text output format description please see drm-usage-stats.rst! * ****************************************************************** */ drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid); - drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name); - drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn); - drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context); drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL); drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL); drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL); drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n", stats.visible_vram/1024UL); drm_printf(p, "amd-evicted-vram:\t%llu KiB\n", stats.evicted_vram/1024UL); drm_printf(p, "amd-evicted-visible-vram:\t%llu KiB\n", stats.evicted_visible_vram/1024UL); drm_printf(p, "amd-requested-vram:\t%llu KiB\n",