From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
Alexander.Deucher@amd.com, amd-gfx@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 2/2] drm/amdgpu: add drm-client-id to fdinfo
Date: Wed, 11 May 2022 09:05:27 +0100 [thread overview]
Message-ID: <1264e910-bb36-25ae-c4d7-c42983e9b5c5@linux.intel.com> (raw)
In-Reply-To: <20220510165550.2048-2-christian.koenig@amd.com>
On 10/05/2022 17:55, Christian König wrote:
> This is enough to get gputop working :)
Super cool! So I guess it's time for me to cleanup that code base a bit.
Regards,
Tvrtko
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> index 38cb5eb105ad..4ef23224b617 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> @@ -55,17 +55,15 @@ static const char *amdgpu_ip_name[AMDGPU_HW_IP_NUM] = {
>
> void amdgpu_show_fdinfo(struct seq_file *m, struct file *f)
> {
> - struct amdgpu_fpriv *fpriv;
> uint64_t vram_mem = 0, gtt_mem = 0, cpu_mem = 0;
> struct drm_file *file = f->private_data;
> struct amdgpu_device *adev = drm_to_adev(file->minor->dev);
> + struct amdgpu_fpriv *fpriv = file->driver_priv;
> + struct amdgpu_vm *vm = &fpriv->vm;
> uint32_t bus, dev, fn, domain, hw_ip;
> struct amdgpu_bo *root;
> int ret;
>
> - ret = amdgpu_file_to_fpriv(f, &fpriv);
> - if (ret)
> - return;
> bus = adev->pdev->bus->number;
> domain = pci_domain_nr(adev->pdev->bus);
> dev = PCI_SLOT(adev->pdev->devfn);
> @@ -93,6 +91,7 @@ void amdgpu_show_fdinfo(struct seq_file *m, struct file *f)
> seq_printf(m, "drm-driver:\t%s\n", file->minor->dev->driver->name);
> seq_printf(m, "drm-pdev:\t%04x:%02x:%02x.%d\npasid:\t%u\n", domain, bus,
> dev, fn, fpriv->vm.pasid);
> + seq_printf(m, "drm-client-id:\t%Lu\n", vm->immediate.fence_context);
> seq_printf(m, "drm-memory-vram:\t%llu KiB\n", vram_mem/1024UL);
> seq_printf(m, "drm-memory-gtt:\t%llu KiB\n", gtt_mem/1024UL);
> seq_printf(m, "drm-memory-cpu:\t%llu KiB\n", cpu_mem/1024UL);
next prev parent reply other threads:[~2022-05-11 8:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 16:55 [PATCH 1/2] drm/amdgpu: Convert to common fdinfo format v2 Christian König
2022-05-10 16:55 ` [PATCH 2/2] drm/amdgpu: add drm-client-id to fdinfo Christian König
2022-05-11 8:05 ` Tvrtko Ursulin [this message]
2022-05-11 8:04 ` [PATCH 1/2] drm/amdgpu: Convert to common fdinfo format v2 Tvrtko Ursulin
2022-05-11 9:04 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2022-05-11 12:02 [PATCH 1/2] drm/amdgpu: Convert to common fdinfo format v3 Christian König
2022-05-11 12:02 ` [PATCH 2/2] drm/amdgpu: add drm-client-id to fdinfo Christian König
2022-05-13 8:20 ` Sharma, Shashank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264e910-bb36-25ae-c4d7-c42983e9b5c5@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.