From: John Olender <john.olender@gmail.com>
To: "Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexdeucher@gmail.com>
Cc: amd-gfx@lists.freedesktop.org, arunpravin.paneerselvam@amd.com
Subject: Re: [RFC PATCH 2/2] drm/amdgpu/uvd: Ensure vcpu bos are within the uvd segment
Date: Tue, 3 Jun 2025 10:34:41 -0400 [thread overview]
Message-ID: <a28a0a4d-614e-4ba6-a8d5-8ab06335f410@gmail.com> (raw)
In-Reply-To: <4b919d57-1f90-48e8-9c7b-5a1814c4a07b@gmail.com>
>> Oh, that's a very interesting find. Could you try to turn around the way the patch works?
>>
>> E.g. instead of forcing the UVD FW into the first segment, change amdgpu_uvd_force_into_uvd_segment() so that the BOs are forced into the same segment as the UVD firmware.
>>
I started implementing this and I realized two main problems with this
approach.
First, there's currently no guarantee the UVD FW does not cross a 256MB
boundary. Checking for this and providing a fallback is going to make
this patch... not really any less complex than the original.
Second, most of time this is just going to end up selecting the first
segment anyway. I'll go more into this below.
>> That would resolve my concern that this could overload the first segment. The feedback and message BO are usually rather small (4 or 128k IIRC), but the firmware is a couple of megabytes in size.
>>
>> When we have other FW and VGA emulation buffers in the first segment as well then that could result into clashing that segment to much.
>>
During my initial investigation, I found out that the UVD FW got placed
in the first segment *because* things were already placed there. This
is why adding a 'stolen_vga_memory' substitute was an effective workaround.
So, CIK is *already* forced to deal with an overloaded first segment
and, with the inverted approach, will continue to do so for typical use
cases. Explicitly placing the UVD FW into the first segment just makes
this guaranteed.
I did implement a module parameter for testing that allows designating a
specific 256MB segment as the legacy UVD segment. I can polish this up
so the user has the option to manually relieve some of the first segment
pressure on SI and CIK devices.
I haven't run into a situation where I've needed this during normal use,
but I can certainly appreciate it being available.
Thanks,
John
next prev parent reply other threads:[~2025-06-03 14:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 11:24 [RFC PATCH 0/2] drm/amdgpu: CIK UVD initialization fixes John Olender
2025-04-29 11:24 ` [RFC PATCH 1/2] drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram John Olender
2025-04-30 21:20 ` Alex Deucher
2025-04-30 21:44 ` Paneer Selvam, Arunpravin
2025-05-02 15:32 ` John Olender
2025-05-03 12:23 ` Paneer Selvam, Arunpravin
2025-05-11 20:33 ` Paneer Selvam, Arunpravin
2025-05-11 20:37 ` Paneer Selvam, Arunpravin
2025-05-12 7:09 ` Christian König
2025-05-12 7:11 ` Paneer Selvam, Arunpravin
2025-05-15 15:49 ` Paneer Selvam, Arunpravin
2025-05-23 11:31 ` Paneer Selvam, Arunpravin
2025-05-02 8:28 ` Christian König
2025-04-29 11:24 ` [RFC PATCH 2/2] drm/amdgpu/uvd: Ensure vcpu bos are within the uvd segment John Olender
2025-04-30 21:39 ` Alex Deucher
2025-05-02 8:36 ` Christian König
2025-05-03 20:31 ` John Olender
2025-05-05 9:02 ` Christian König
2025-05-05 16:06 ` John Olender
2025-05-07 11:31 ` John Olender
2025-05-29 23:15 ` John Olender
2025-06-02 10:00 ` Christian König
2025-06-02 13:03 ` John Olender
2025-06-03 14:34 ` John Olender [this message]
2025-06-03 16:26 ` Christian König
2025-06-03 17:52 ` John Olender
2025-06-05 9:21 ` John Olender
2025-06-05 9:54 ` Christian König
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=a28a0a4d-614e-4ba6-a8d5-8ab06335f410@gmail.com \
--to=john.olender@gmail.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arunpravin.paneerselvam@amd.com \
--cc=christian.koenig@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