From: vitaly prosyak <vprosyak@amd.com>
To: "Srinivasan Shanmugam" <srinivasan.shanmugam@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Vitaly Prosyak" <vitaly.prosyak@amd.com>
Cc: igt-dev@lists.freedesktop.org, David Yat Sin <David.YatSin@amd.com>
Subject: Re: [PATCH 0/2] tests/amdgpu: Exercise MMIO_REMAP remap page (alloc/map + HDP flush)
Date: Sat, 20 Sep 2025 00:55:31 -0400 [thread overview]
Message-ID: <55ffa49e-e69e-4e51-a4e4-d586a19d5549@amd.com> (raw)
In-Reply-To: <20250918084655.2192395-1-srinivasan.shanmugam@amd.com>
[-- Attachment #1: Type: text/plain, Size: 2279 bytes --]
Both patches look good overall and provide valuable MMIO_REMAP subtests. 2 improvements are suggested:
1. Remove Excess Debug Logs for both patches except when igt_skip is called.
Please reduce the verbosity by removing non-essential igt_info() calls, such as:
igt_info("[mmio_remap] alloc request: size=%u align=%u domain=0x%x flags=0x%llx\n", ...) etc..
2. Ensure MMIO Write Posting (Patch 2/2)
In the HDP flush subtest, please insert a memory barrier to ensure the MMIO write is posted before the read:
mmio[flush_idx] = 0x1;
* __sync_synchronize(); *
(void)mmio[flush_idx];
This ensures correctness on platforms with weak memory ordering (e.g., ARM, RISC-V), where MMIO writes can be delayed or reordered.
Reviewed-by: Vitaly Prosyak vitaly.prosyak@amd.com
On 2025-09-18 04:46, Srinivasan Shanmugam wrote:
> This series adds two IGT subtests in amd_bo.c to exercise the MMIO_REMAP
> remap page:
>
> 1) mmio_remap_gem_create_close
> - Allocates a 4 KiB, page-aligned BO in
> AMDGPU_GEM_DOMAIN_MMIO_REMAP and immediately frees it. Skips
> gracefully when the domain is not supported
> (-EOPNOTSUPP/-ENODEV/-EINVAL) or system PAGE_SIZE > 4K.
>
> 2) mmio_remap_map_and_poke
> - Allocates and CPU-maps the 4 KiB remap page, then write-1 to
> HDP_MEM_FLUSH_CNTL (offset 0) twice, followed by a dummy read to
> post the writes. Unmaps and frees on exit.
>
> These tests help cover the basic KGD/KFD MMIO_REMAP path (allocation and
> BAR-mapped MMIO access).
>
> TODO: A kernel patch enabling this path is pending merge; once it lands,
> the Link below can serve as the stable reference.
>
> Link: https://patchwork.freedesktop.org/series/153209/#rev5
> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
> Cc: David Yat Sin <David.YatSin@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
>
> Srinivasan Shanmugam (2):
> tests/amdgpu/amd_bo: Add mmio_remap_gem_create_close subtest
> tests/amdgpu/amd_bo: Add mmio_remap_map_and_poke (HDP flush) subtest
>
> tests/amdgpu/amd_bo.c | 144 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 144 insertions(+)
>
[-- Attachment #2: Type: text/html, Size: 3440 bytes --]
next prev parent reply other threads:[~2025-09-20 4:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 8:46 [PATCH 0/2] tests/amdgpu: Exercise MMIO_REMAP remap page (alloc/map + HDP flush) Srinivasan Shanmugam
2025-09-18 8:46 ` [PATCH 1/2] tests/amdgpu/amd_bo: Add mmio_remap_gem_create_close subtest Srinivasan Shanmugam
2025-09-18 8:46 ` [PATCH 2/2] tests/amdgpu/amd_bo: Add mmio_remap_map_and_poke (HDP flush) subtest Srinivasan Shanmugam
2025-09-18 13:46 ` ✓ Xe.CI.BAT: success for tests/amdgpu: Exercise MMIO_REMAP remap page (alloc/map + HDP flush) Patchwork
2025-09-18 18:44 ` ✓ i915.CI.BAT: " Patchwork
2025-09-18 21:47 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-19 1:27 ` ✓ i915.CI.Full: success " Patchwork
2025-09-20 4:55 ` vitaly prosyak [this message]
2025-09-22 1:37 ` [PATCH 0/2] " vitaly prosyak
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=55ffa49e-e69e-4e51-a4e4-d586a19d5549@amd.com \
--to=vprosyak@amd.com \
--cc=David.YatSin@amd.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=srinivasan.shanmugam@amd.com \
--cc=vitaly.prosyak@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox