AMD-GFX Archive mirror
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher@amd.com>
To: "Khatri, Sunil" <Sunil.Khatri@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Khatri,  Sunil" <Sunil.Khatri@amd.com>
Subject: RE: [PATCH v3 1/4] drm/amdgpu: update the ip_dump to ipdump_core
Date: Wed, 15 May 2024 20:07:10 +0000	[thread overview]
Message-ID: <BL1PR12MB5144193323A251F3EB65E697F7EC2@BL1PR12MB5144.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240515121754.1810181-1-sunil.khatri@amd.com>

[Public]

> -----Original Message-----
> From: Sunil Khatri <sunil.khatri@amd.com>
> Sent: Wednesday, May 15, 2024 8:18 AM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Khatri, Sunil <Sunil.Khatri@amd.com>
> Subject: [PATCH v3 1/4] drm/amdgpu: update the ip_dump to ipdump_core
>
> Update the memory pointer from ip_dump to ipdump_core to make it specific
> to core registers and rest other registers to be dumped in their respective
> memories.
>
> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h |  2 +-
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c  | 14 +++++++-------
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> index 109f471ff315..30d7f9c29478 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> @@ -435,7 +435,7 @@ struct amdgpu_gfx {
>       bool                            mcbp; /* mid command buffer
> preemption */
>
>       /* IP reg dump */
> -     uint32_t                        *ip_dump;
> +     uint32_t                        *ipdump_core;

I think this looks cleaner as ip_dump_core.

Alex

>  };
>
>  struct amdgpu_gfx_ras_reg_entry {
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 953df202953a..f6d6a4b9802d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4603,9 +4603,9 @@ static void gfx_v10_0_alloc_dump_mem(struct
> amdgpu_device *adev)
>       ptr = kcalloc(reg_count, sizeof(uint32_t), GFP_KERNEL);
>       if (ptr == NULL) {
>               DRM_ERROR("Failed to allocate memory for IP Dump\n");
> -             adev->gfx.ip_dump = NULL;
> +             adev->gfx.ipdump_core = NULL;
>       } else {
> -             adev->gfx.ip_dump = ptr;
> +             adev->gfx.ipdump_core = ptr;
>       }
>  }
>
> @@ -4815,7 +4815,7 @@ static int gfx_v10_0_sw_fini(void *handle)
>
>       gfx_v10_0_free_microcode(adev);
>
> -     kfree(adev->gfx.ip_dump);
> +     kfree(adev->gfx.ipdump_core);
>
>       return 0;
>  }
> @@ -9283,13 +9283,13 @@ static void gfx_v10_ip_print(void *handle, struct
> drm_printer *p)
>       uint32_t i;
>       uint32_t reg_count = ARRAY_SIZE(gc_reg_list_10_1);
>
> -     if (!adev->gfx.ip_dump)
> +     if (!adev->gfx.ipdump_core)
>               return;
>
>       for (i = 0; i < reg_count; i++)
>               drm_printf(p, "%-50s \t 0x%08x\n",
>                          gc_reg_list_10_1[i].reg_name,
> -                        adev->gfx.ip_dump[i]);
> +                        adev->gfx.ipdump_core[i]);
>  }
>
>  static void gfx_v10_ip_dump(void *handle) @@ -9298,12 +9298,12 @@
> static void gfx_v10_ip_dump(void *handle)
>       uint32_t i;
>       uint32_t reg_count = ARRAY_SIZE(gc_reg_list_10_1);
>
> -     if (!adev->gfx.ip_dump)
> +     if (!adev->gfx.ipdump_core)
>               return;
>
>       amdgpu_gfx_off_ctrl(adev, false);
>       for (i = 0; i < reg_count; i++)
> -             adev->gfx.ip_dump[i] =
> RREG32(SOC15_REG_ENTRY_OFFSET(gc_reg_list_10_1[i]));
> +             adev->gfx.ipdump_core[i] =
> +RREG32(SOC15_REG_ENTRY_OFFSET(gc_reg_list_10_1[i]));
>       amdgpu_gfx_off_ctrl(adev, true);
>  }
>
> --
> 2.34.1


  parent reply	other threads:[~2024-05-15 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 12:17 [PATCH v3 1/4] drm/amdgpu: update the ip_dump to ipdump_core Sunil Khatri
2024-05-15 12:17 ` [PATCH v3 2/4] drm/amdgpu: Add support to dump gfx10 cp registers Sunil Khatri
2024-05-15 20:10   ` Deucher, Alexander
2024-05-16  3:41     ` Khatri, Sunil
2024-05-15 12:17 ` [PATCH v3 3/4] drm/amdgpu: add support to dump gfx10 queue registers Sunil Khatri
2024-05-15 20:12   ` Deucher, Alexander
2024-05-16  3:40     ` Khatri, Sunil
2024-05-15 12:17 ` [PATCH v3 4/4] drm/amdgpu: add prints while ip registr dump Sunil Khatri
2024-05-15 20:07 ` Deucher, Alexander [this message]
2024-05-16  3:38   ` [PATCH v3 1/4] drm/amdgpu: update the ip_dump to ipdump_core Khatri, Sunil

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=BL1PR12MB5144193323A251F3EB65E697F7EC2@BL1PR12MB5144.namprd12.prod.outlook.com \
    --to=alexander.deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Sunil.Khatri@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).