From patchwork Wed Jan 4 13:03:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13088555 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 2CA04C4332F for ; Wed, 4 Jan 2023 13:03:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA35110E0B0; Wed, 4 Jan 2023 13:03:19 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAEB610E109 for ; Wed, 4 Jan 2023 13:03:16 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3ADD86602D13; Wed, 4 Jan 2023 13:03:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672837395; bh=0y+rpVvzwhYvzmKLYw7lUlliQJlfh+XouQYi3mXOc9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L+7pfP4B1Lti5ZHJx+HbX4csgBhSzIrg9ZCr/jLYHHf1ZPPr14osi983dz8nxUhCH ciXqpefQrJRrFzA5YDFdRXf0HN9gdabLE6cMits/9jVdwAqpy41GnKZE6z4GyEdm3W /O4oEkcP9RWLIUZnFWkrFlUebwWBJquoTzL4qJsIoHDOSeg+/b+IZ2+Tbmpcb+Oa9Q ESVV/kqvEbNETSrpz2AKVZOlaX68aTw+IFxw3V5ONMS3A1tS5s0pr7nIEJUD7G14YM GnSWpOuhO1+SlNXSQUK0kp9uiLrQ8xKHXN5+UFsZ2lhZm2wQnL5nZrw5M+q/PMbanG KxRuiKxcbUFRw== From: Boris Brezillon To: Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy Subject: [PATCH RFC 1/4] drm/panfrost: Provide a dummy show_fdinfo() implementation Date: Wed, 4 Jan 2023 14:03:05 +0100 Message-Id: <20230104130308.3467806-2-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104130308.3467806-1-boris.brezillon@collabora.com> References: <20230104130308.3467806-1-boris.brezillon@collabora.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: Boris Brezillon , Christopher Healy , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Provide a dummy show_fdinfo() implementation exposing drm-driver and drm-client-id. More stats will be added soon. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_drv.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 2fa5afe21288..6ee43559fc14 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -515,7 +515,22 @@ static const struct drm_ioctl_desc panfrost_drm_driver_ioctls[] = { PANFROST_IOCTL(MADVISE, madvise, DRM_RENDER_ALLOW), }; -DEFINE_DRM_GEM_FOPS(panfrost_drm_driver_fops); +static void panfrost_show_fdinfo(struct seq_file *m, struct file *f) +{ + struct drm_file *file = f->private_data; + struct panfrost_file_priv *panfrost_priv = file->driver_priv; + + seq_printf(m, "drm-driver:\t%s\n", file->minor->dev->driver->name); + seq_printf(m, "drm-client-id:\t%llu\n", panfrost_priv->sched_entity[0].fence_context); +} + +static const struct file_operations panfrost_drm_driver_fops = { + .owner = THIS_MODULE, + DRM_GEM_FOPS, +#ifdef CONFIG_PROC_FS + .show_fdinfo = panfrost_show_fdinfo, +#endif +}; /* * Panfrost driver version: From patchwork Wed Jan 4 13:03:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13088559 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 9F776C4332F for ; Wed, 4 Jan 2023 13:03:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44F8F10E1C9; Wed, 4 Jan 2023 13:03:25 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E4FA10E0B0 for ; Wed, 4 Jan 2023 13:03:17 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id A5F826602D14; Wed, 4 Jan 2023 13:03:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672837396; bh=KRwLsGyLFh5+OOQ/19JO6n21nMZ0lU8npKkIdiqDkdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oun/Petp17+ABOjph8vOhoQVYc70rihh+XYZM4AWhsPPWpdrWZpoPUz9RlYe8JL7h NzKvvr3QJl1o4Q4NS/m7lssR2AAechLe7bUIawOWLUlDtN7tbi770XghkpVZMdME1q tC8bsN/qqYtX3BXxowOYAtQsDVChhtpUJAt6qhkoRcgAgT5DPAovOfm8ZornkAb9on E/k7LW99Pl2pLZtlWB5CFs+cB3y1UGwisRRe4Qm6zDYZy96aE8wuG+hW+iQglnGg1p LY9ETwcTCcLTxHRUPuDNEnkAtagBxK4HJeKjZw1jobKvVgJZua2O/KbJukzxcjlhss VYzLFQnrnAk0A== From: Boris Brezillon To: Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy Subject: [PATCH RFC 2/4] drm/panfrost: Track BO resident size Date: Wed, 4 Jan 2023 14:03:06 +0100 Message-Id: <20230104130308.3467806-3-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104130308.3467806-1-boris.brezillon@collabora.com> References: <20230104130308.3467806-1-boris.brezillon@collabora.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: Boris Brezillon , Christopher Healy , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Heap BOs use an on-demand allocation scheme, meaning that the resident size is different from the BO side. Track resident size so we can more accurately per-FD expose memory usage. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_gem.h | 7 +++++++ drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 1 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.h b/drivers/gpu/drm/panfrost/panfrost_gem.h index 8088d5fd8480..58f5d091c983 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gem.h +++ b/drivers/gpu/drm/panfrost/panfrost_gem.h @@ -36,6 +36,13 @@ struct panfrost_gem_object { */ atomic_t gpu_usecount; + /* Actual memory used by the BO. Should be zero before pages are + * pinned, then the size of the BO, unless it's a heap BO. In + * this case the resident size is updated when the fault handler + * allocates memory. + */ + size_t resident_size; + bool noexec :1; bool is_heap :1; }; diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c index bf0170782f25..efbc8dec4a9f 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c @@ -54,6 +54,7 @@ static bool panfrost_gem_purge(struct drm_gem_object *obj) panfrost_gem_teardown_mappings_locked(bo); drm_gem_shmem_purge_locked(&bo->base); ret = true; + bo->resident_size = 0; mutex_unlock(&shmem->pages_lock); diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index 4e83a1891f3e..454799d5a0ef 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -340,6 +340,7 @@ int panfrost_mmu_map(struct panfrost_gem_mapping *mapping) mmu_map_sg(pfdev, mapping->mmu, mapping->mmnode.start << PAGE_SHIFT, prot, sgt); mapping->active = true; + bo->resident_size = bo->base.base.size; return 0; } @@ -508,6 +509,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, } } + bo->resident_size += SZ_2M; mutex_unlock(&bo->base.pages_lock); sgt = &bo->sgts[page_offset / (SZ_2M / PAGE_SIZE)]; From patchwork Wed Jan 4 13:03:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13088557 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 4E837C4332F for ; Wed, 4 Jan 2023 13:03:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E1D110E1C6; Wed, 4 Jan 2023 13:03:21 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id 892A710E0B0 for ; Wed, 4 Jan 2023 13:03:17 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1A4696602D15; Wed, 4 Jan 2023 13:03:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672837396; bh=3maEX1d1f8xpnzpb1QQTbDCOTjvxdkWQfrmVFNuBow8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WQopY4GD3X5+VIKxrY00APt97BC9fewByqqeQsOkpzQPV5251PPQK2qyuvsNHRPI0 Mmge1dFVqUW4Nv5IOtZ3bAlC6BxpqQ0o3ZHZq3rFobxAH+2qoWOHpKEuG9NRQIC3ge 0G7WzGdhzB7xfEz4vx2UEytessV+AITbVh0CBuQd3mC5ka4/SrnwnKdjUFhvw/Vo/3 EWiYt0E7FR13J2UPPxIAXKA+VuGLgN5VHXHuF+R0mzAsniw1OiLgqpDjdVE3XSI4RE 697Pm+DGyj2rlkoEGZugwcDCdI1QSYALit4e+HwAfRXCk58sI+yS7Q8CnC/QL1awbG gnTyqtix/vovQ== From: Boris Brezillon To: Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy Subject: [PATCH RFC 3/4] drm/panfrost: Add a helper to retrieve MMU context stats Date: Wed, 4 Jan 2023 14:03:07 +0100 Message-Id: <20230104130308.3467806-4-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104130308.3467806-1-boris.brezillon@collabora.com> References: <20230104130308.3467806-1-boris.brezillon@collabora.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: Boris Brezillon , Christopher Healy , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For now we only gather a few memory usage stats that we'll expose through fdinfo, but this can be extended if needed. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_mmu.h | 10 ++++++++++ 2 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index 454799d5a0ef..80c6e0e17195 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -435,6 +435,31 @@ addr_to_mapping(struct panfrost_device *pfdev, int as, u64 addr) return mapping; } +void panfrost_mmu_get_stats(struct panfrost_mmu *mmu, + struct panfrost_mmu_stats *stats) +{ + struct drm_mm_node *node; + + memset(stats, 0, sizeof(*stats)); + + spin_lock(&mmu->mm_lock); + drm_mm_for_each_node(node, &mmu->mm) { + struct panfrost_gem_mapping *mapping; + struct panfrost_gem_object *bo; + + mapping = container_of(node, struct panfrost_gem_mapping, mmnode); + bo = mapping->obj; + + stats->all += bo->base.base.size; + stats->resident += bo->resident_size; + if (bo->base.madv > 0) + stats->purgeable += bo->resident_size; + if (bo->base.base.dma_buf) + stats->shared += bo->base.base.size; + } + spin_unlock(&mmu->mm_lock); +} + #define NUM_FAULT_PAGES (SZ_2M / PAGE_SIZE) static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.h b/drivers/gpu/drm/panfrost/panfrost_mmu.h index cc2a0d307feb..bbffd39deaf3 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.h +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.h @@ -8,6 +8,13 @@ struct panfrost_gem_mapping; struct panfrost_file_priv; struct panfrost_mmu; +struct panfrost_mmu_stats { + u64 all; + u64 resident; + u64 purgeable; + u64 shared; +}; + int panfrost_mmu_map(struct panfrost_gem_mapping *mapping); void panfrost_mmu_unmap(struct panfrost_gem_mapping *mapping); @@ -22,4 +29,7 @@ struct panfrost_mmu *panfrost_mmu_ctx_get(struct panfrost_mmu *mmu); void panfrost_mmu_ctx_put(struct panfrost_mmu *mmu); struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev); +void panfrost_mmu_get_stats(struct panfrost_mmu *mmu, + struct panfrost_mmu_stats *stats); + #endif From patchwork Wed Jan 4 13:03:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13088558 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 41AD0C4332F for ; Wed, 4 Jan 2023 13:03:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEB7210E1C8; Wed, 4 Jan 2023 13:03:21 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02FBE10E0B0 for ; Wed, 4 Jan 2023 13:03:18 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id 83E066602D16; Wed, 4 Jan 2023 13:03:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672837396; bh=MGr/mbTNOLcl4k7CBV/EBBBzXhRL6qEn06K9l1US9YM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HAqJYeg3v8fMq5xBHAhRSIK5d/+TJIlBSiSk90XriZO3emQSRs8EwTNo2tk0EMGFk MnHZk3OAkUXTdyUhSmuskoNwv4iXCnbzxWp6G4nP+0N5dg2jj1H+aYSgxXm5Tv2h61 9wvn61gbXTdhPMVugDg2H1RXCK/kgPqywptlcLQVakirx3SFM6nyZbSz9SE3ff72kq k7yFsiH01CeCxDzGXY3M0C/qsfb/kZLNurbS/KtJgiCt0STR+V7RnbmVVf5oVc9D67 v7lxAG9I2DCU0/TEQz2Z5eTOR6cfrghCBDdOUldqQlnyv+2214BLjrZhgMjEH1jO/0 kHKOWpub/XPCA== From: Boris Brezillon To: Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy Subject: [PATCH RFC 4/4] drm/panfrost: Expose some memory related stats through fdinfo Date: Wed, 4 Jan 2023 14:03:08 +0100 Message-Id: <20230104130308.3467806-5-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104130308.3467806-1-boris.brezillon@collabora.com> References: <20230104130308.3467806-1-boris.brezillon@collabora.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: Boris Brezillon , Christopher Healy , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm-memory-all: memory hold by this context. Not that all the memory is not necessarily resident: heap BO size is counted even though only part of the memory reserved for those BOs might be allocated. drm-memory-resident: resident memory size. For normal BOs it's the same as drm-memory-all, but for heap BOs, only the memory actually allocated is counted. drm-memory-purgeable: amount of memory that can be reclaimed by the system (madvise(DONT_NEED)). drm-memory-shared: amount of memory shared through dma-buf. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 6ee43559fc14..05d5d480df2a 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -519,9 +519,16 @@ static void panfrost_show_fdinfo(struct seq_file *m, struct file *f) { struct drm_file *file = f->private_data; struct panfrost_file_priv *panfrost_priv = file->driver_priv; + struct panfrost_mmu_stats mmu_stats; + + panfrost_mmu_get_stats(panfrost_priv->mmu, &mmu_stats); seq_printf(m, "drm-driver:\t%s\n", file->minor->dev->driver->name); seq_printf(m, "drm-client-id:\t%llu\n", panfrost_priv->sched_entity[0].fence_context); + seq_printf(m, "drm-memory-all:\t%llu KiB\n", mmu_stats.all >> 10); + seq_printf(m, "drm-memory-resident:\t%llu KiB\n", mmu_stats.resident >> 10); + seq_printf(m, "drm-memory-purgeable:\t%llu KiB\n", mmu_stats.purgeable >> 10); + seq_printf(m, "drm-memory-shared:\t%llu KiB\n", mmu_stats.shared >> 10); } static const struct file_operations panfrost_drm_driver_fops = {