* [PATCH] drm/ttm: Support 52-bit PAs in ttm_place
@ 2026-05-12 22:31 Felix Kuehling
2026-05-13 8:08 ` Christian König
0 siblings, 1 reply; 4+ messages in thread
From: Felix Kuehling @ 2026-05-12 22:31 UTC (permalink / raw)
To: amd-gfx, dri-devel; +Cc: christian.koenig
fpfn and lpfn in struct ttm_place are 32-bit page numbers. With 4KB page
size this can support up to 44-bit physical addressing. Grow these to
unsigned long to support larger physical addresses.
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
---
include/drm/ttm/ttm_placement.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
index b510a4812609..3e88869c0f58 100644
--- a/include/drm/ttm/ttm_placement.h
+++ b/include/drm/ttm/ttm_placement.h
@@ -81,8 +81,8 @@
* Structure indicating a possible place to put an object.
*/
struct ttm_place {
- unsigned fpfn;
- unsigned lpfn;
+ unsigned long fpfn;
+ unsigned long lpfn;
uint32_t mem_type;
uint32_t flags;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/ttm: Support 52-bit PAs in ttm_place
2026-05-12 22:31 [PATCH] drm/ttm: Support 52-bit PAs in ttm_place Felix Kuehling
@ 2026-05-13 8:08 ` Christian König
2026-05-13 14:15 ` Kuehling, Felix
0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2026-05-13 8:08 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx, dri-devel
On 5/13/26 00:31, Felix Kuehling wrote:
> fpfn and lpfn in struct ttm_place are 32-bit page numbers. With 4KB page
> size this can support up to 44-bit physical addressing. Grow these to
> unsigned long to support larger physical addresses.
>
> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
> ---
> include/drm/ttm/ttm_placement.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
> index b510a4812609..3e88869c0f58 100644
> --- a/include/drm/ttm/ttm_placement.h
> +++ b/include/drm/ttm/ttm_placement.h
> @@ -81,8 +81,8 @@
> * Structure indicating a possible place to put an object.
> */
> struct ttm_place {
> - unsigned fpfn;
> - unsigned lpfn;
> + unsigned long fpfn;
> + unsigned long lpfn;
That should be uint64_t instead, long is CPU architecture dependent and we clearly don't want that in TTM.
But apart from that looks reasonable to me.
Regards,
Christian.
> uint32_t mem_type;
> uint32_t flags;
> };
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/ttm: Support 52-bit PAs in ttm_place
2026-05-13 8:08 ` Christian König
@ 2026-05-13 14:15 ` Kuehling, Felix
2026-05-13 15:42 ` Christian König
0 siblings, 1 reply; 4+ messages in thread
From: Kuehling, Felix @ 2026-05-13 14:15 UTC (permalink / raw)
To: Christian König, amd-gfx, dri-devel
On 2026-05-13 03:08, Christian König wrote:
>
> On 5/13/26 00:31, Felix Kuehling wrote:
>> fpfn and lpfn in struct ttm_place are 32-bit page numbers. With 4KB page
>> size this can support up to 44-bit physical addressing. Grow these to
>> unsigned long to support larger physical addresses.
>>
>> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
>> ---
>> include/drm/ttm/ttm_placement.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
>> index b510a4812609..3e88869c0f58 100644
>> --- a/include/drm/ttm/ttm_placement.h
>> +++ b/include/drm/ttm/ttm_placement.h
>> @@ -81,8 +81,8 @@
>> * Structure indicating a possible place to put an object.
>> */
>> struct ttm_place {
>> - unsigned fpfn;
>> - unsigned lpfn;
>> + unsigned long fpfn;
>> + unsigned long lpfn;
> That should be uint64_t instead, long is CPU architecture dependent and we clearly don't want that in TTM.
>
> But apart from that looks reasonable to me.
Thanks. I sent out v2. What's the best branch for getting this change
upstream? We'll need it on our NPI branch in the interim.
Regards,
Felix
>
> Regards,
> Christian.
>
>> uint32_t mem_type;
>> uint32_t flags;
>> };
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/ttm: Support 52-bit PAs in ttm_place
2026-05-13 14:15 ` Kuehling, Felix
@ 2026-05-13 15:42 ` Christian König
0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2026-05-13 15:42 UTC (permalink / raw)
To: Kuehling, Felix, amd-gfx, dri-devel
On 5/13/26 16:15, Kuehling, Felix wrote:
> On 2026-05-13 03:08, Christian König wrote:
>>
>> On 5/13/26 00:31, Felix Kuehling wrote:
>>> fpfn and lpfn in struct ttm_place are 32-bit page numbers. With 4KB page
>>> size this can support up to 44-bit physical addressing. Grow these to
>>> unsigned long to support larger physical addresses.
>>>
>>> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
>>> ---
>>> include/drm/ttm/ttm_placement.h | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
>>> index b510a4812609..3e88869c0f58 100644
>>> --- a/include/drm/ttm/ttm_placement.h
>>> +++ b/include/drm/ttm/ttm_placement.h
>>> @@ -81,8 +81,8 @@
>>> * Structure indicating a possible place to put an object.
>>> */
>>> struct ttm_place {
>>> - unsigned fpfn;
>>> - unsigned lpfn;
>>> + unsigned long fpfn;
>>> + unsigned long lpfn;
>> That should be uint64_t instead, long is CPU architecture dependent and we clearly don't want that in TTM.
>>
>> But apart from that looks reasonable to me.
>
> Thanks. I sent out v2. What's the best branch for getting this change upstream? We'll need it on our NPI branch in the interim.
Arun will push it to drm-misc-next, if you also need it in amd-staging-drm-next you need to sync up with Alex. But that shouldn't be much of a problem.
Regards,
Christian
>
> Regards,
> Felix
>
>
>>
>> Regards,
>> Christian.
>>
>>> uint32_t mem_type;
>>> uint32_t flags;
>>> };
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-13 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 22:31 [PATCH] drm/ttm: Support 52-bit PAs in ttm_place Felix Kuehling
2026-05-13 8:08 ` Christian König
2026-05-13 14:15 ` Kuehling, Felix
2026-05-13 15:42 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox