From: Arunpravin Paneer Selvam <arunpravin.paneerselvam@amd.com>
To: "Christian König" <christian.koenig@amd.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: alexander.deucher@amd.com,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: [PATCH v2] drm/ttm: add generic drvparam[] alias for ttm_place::fpfn/lpfn
Date: Tue, 30 Jun 2026 18:17:06 +0530 [thread overview]
Message-ID: <60c6155a-2f0e-4dbc-aa13-58b7d36cd264@amd.com> (raw)
In-Reply-To: <81082f11-8b8a-4420-866e-4e15df3e5b1c@amd.com>
On 6/29/2026 5:36 PM, Christian König wrote:
> On 6/26/26 12:57, Tvrtko Ursulin wrote:
>> On 26/06/2026 07:36, Arunpravin Paneer Selvam wrote:
>>> The fpfn/lpfn fields in struct ttm_place are named after page frame
>>> numbers, but they are really just placement parameters interpreted by
>>> the backend resource manager. Wrap them in a union with a generic
>>> drvparam[2] array so backends can access the same storage without the
>>> PFN-specific naming.
>>>
>>> drvparam[0]/drvparam[1] alias fpfn/lpfn, so existing users and the
>>> VRAM range manager are unchanged. This decouples the API from
>>> PFN/range-specific semantics so that these fields can be used more
>>> flexibly in the future (e.g. mask-based or segment-aware placement
>>> constraints). No functional change.
>>>
>>> v2: Use a union exposing a generic drvparam[2] array instead of
>>> renaming fpfn/lpfn to param1/param2, keeping existing users
>>> unchanged (Tvrtko Ursulin)
>>>
>>> Suggested-by: Christian König <christian.koenig@amd.com>
>>> Assisted-by: Claude:claude-opus-4-8
>>> Cc: Christian König <christian.koenig@amd.com>
>>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>>> Cc: Matthew Auld <matthew.auld@intel.com>
>>> Cc: Matthew Brost <matthew.brost@intel.com>
>>> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
>>> ---
>>> include/drm/ttm/ttm_placement.h | 12 ++++++++++--
>>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
>>> index ab2639e42c54..7db2073f3236 100644
>>> --- a/include/drm/ttm/ttm_placement.h
>>> +++ b/include/drm/ttm/ttm_placement.h
>>> @@ -75,14 +75,22 @@
>>> *
>>> * @fpfn: first valid page frame number to put the object
>>> * @lpfn: last valid page frame number to put the object
>>> + * @drvparam: generic driver/backend placement parameters; the
>>> + * interpretation is defined by the backend resource manager.
>>> + * drvparam[0] and drvparam[1] alias @fpfn and @lpfn.
>>> * @mem_type: One of TTM_PL_* where the resource should be allocated from.
>>> * @flags: memory domain and caching flags for the object
>>> *
>>> * Structure indicating a possible place to put an object.
>>> */
>>> struct ttm_place {
>>> - uint64_t fpfn;
>>> - uint64_t lpfn;
>>> + union {
>>> + struct {
>>> + uint64_t fpfn;
>>> + uint64_t lpfn;
>>> + };
>>> + uint64_t drvparam[2];
>>> + };
>>> uint32_t mem_type;
>>> uint32_t flags;
>>> };
>>>
>>> base-commit: cdeb2ccd993ed8647adbbda2c3b103aa717fd6f7
>> LGTM but then again I suggested it (hint hint) so I may be biased :)
>>
>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Looks good to me as well, Reviewed-by: Christian König <christian.koenig@amd.com>.
>
> I think this way we can also merge it with the AMDGPU patches who needs this through amd-staging-drm-next.
>
> Let's sync up with Alex on the next weekly call, I think we should start creating an internal branch for the new feature if that hasn't be done yet.
Sure Christian.
Thanks,
Arun.
>
> Thanks,
> Christian.
>
>> Regards,
>>
>> Tvrtko
>>
prev parent reply other threads:[~2026-06-30 12:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 6:36 Arunpravin Paneer Selvam
2026-06-26 10:57 ` Tvrtko Ursulin
2026-06-29 12:06 ` Christian König
2026-06-30 12:47 ` Arunpravin Paneer Selvam [this message]
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=60c6155a-2f0e-4dbc-aa13-58b7d36cd264@amd.com \
--to=arunpravin.paneerselvam@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=nouveau@lists.freedesktop.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tursulin@ursulin.net \
/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
Powered by JetHome