Re: [PATCH libdrm 3/4] amdgpu: use the high VA range if possible v2
Hi Marek, it looks like the hardware sign extends bit 47 into bits 48-63. E.g. 0x8000 gets extended to 0x8000. Christian. Am 03.02.2018 um 03:02 schrieb Marek Olšák: Hi Christian, How does this work with 48-bit addresses that the 3D engine uses? It can't set 0x8000 for the high bits. It's trimmed to 0x8000. Thanks, Marek On Sun, Jan 7, 2018 at 10:11 AM, Christian Königwrote: Retire the low range on Vega10 this frees up everything below 0x8000 for HMM. v2: keep the 32bit range working. Signed-off-by: Christian König --- amdgpu/amdgpu_device.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c index d7077184..a0d01727 100644 --- a/amdgpu/amdgpu_device.c +++ b/amdgpu/amdgpu_device.c @@ -264,13 +264,23 @@ int amdgpu_device_initialize(int fd, goto cleanup; } - start = dev->dev_info.virtual_address_offset; - max = MIN2(dev->dev_info.virtual_address_max, 0x1ULL); + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) { + start = dev->dev_info.high_va_offset; + max = dev->dev_info.high_va_max; + } else { + start = dev->dev_info.virtual_address_offset; + max = dev->dev_info.virtual_address_max; + } + + max = MIN2(max, (start & ~0x) + 0x1ULL); amdgpu_vamgr_init(>vamgr_32, start, max, dev->dev_info.virtual_address_alignment); - start = MAX2(dev->dev_info.virtual_address_offset, 0x1ULL); - max = MAX2(dev->dev_info.virtual_address_max, 0x1ULL); + start = max; + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) + max = dev->dev_info.high_va_max; + else + max = dev->dev_info.virtual_address_max; amdgpu_vamgr_init(>vamgr, start, max, dev->dev_info.virtual_address_alignment); -- 2.11.0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH libdrm 3/4] amdgpu: use the high VA range if possible v2
Actually, 0x8000 is fine. For the series: Reviewed-by: Marek OlšákMarek ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH libdrm 3/4] amdgpu: use the high VA range if possible v2
Can we put the 32-bit address space higher? E.g. high bits = 0xfff0 ? Marek On Sun, Jan 7, 2018 at 10:11 AM, Christian Königwrote: > Retire the low range on Vega10 this frees up everything below > 0x8000 for HMM. > > v2: keep the 32bit range working. > > Signed-off-by: Christian König > --- > amdgpu/amdgpu_device.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c > index d7077184..a0d01727 100644 > --- a/amdgpu/amdgpu_device.c > +++ b/amdgpu/amdgpu_device.c > @@ -264,13 +264,23 @@ int amdgpu_device_initialize(int fd, > goto cleanup; > } > > - start = dev->dev_info.virtual_address_offset; > - max = MIN2(dev->dev_info.virtual_address_max, 0x1ULL); > + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) { > + start = dev->dev_info.high_va_offset; > + max = dev->dev_info.high_va_max; > + } else { > + start = dev->dev_info.virtual_address_offset; > + max = dev->dev_info.virtual_address_max; > + } > + > + max = MIN2(max, (start & ~0x) + 0x1ULL); > amdgpu_vamgr_init(>vamgr_32, start, max, > dev->dev_info.virtual_address_alignment); > > - start = MAX2(dev->dev_info.virtual_address_offset, 0x1ULL); > - max = MAX2(dev->dev_info.virtual_address_max, 0x1ULL); > + start = max; > + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) > + max = dev->dev_info.high_va_max; > + else > + max = dev->dev_info.virtual_address_max; > amdgpu_vamgr_init(>vamgr, start, max, > dev->dev_info.virtual_address_alignment); > > -- > 2.11.0 > > ___ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH libdrm 3/4] amdgpu: use the high VA range if possible v2
Retire the low range on Vega10 this frees up everything below 0x8000 for HMM. v2: keep the 32bit range working. Signed-off-by: Christian König--- amdgpu/amdgpu_device.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c index d7077184..a0d01727 100644 --- a/amdgpu/amdgpu_device.c +++ b/amdgpu/amdgpu_device.c @@ -264,13 +264,23 @@ int amdgpu_device_initialize(int fd, goto cleanup; } - start = dev->dev_info.virtual_address_offset; - max = MIN2(dev->dev_info.virtual_address_max, 0x1ULL); + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) { + start = dev->dev_info.high_va_offset; + max = dev->dev_info.high_va_max; + } else { + start = dev->dev_info.virtual_address_offset; + max = dev->dev_info.virtual_address_max; + } + + max = MIN2(max, (start & ~0x) + 0x1ULL); amdgpu_vamgr_init(>vamgr_32, start, max, dev->dev_info.virtual_address_alignment); - start = MAX2(dev->dev_info.virtual_address_offset, 0x1ULL); - max = MAX2(dev->dev_info.virtual_address_max, 0x1ULL); + start = max; + if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) + max = dev->dev_info.high_va_max; + else + max = dev->dev_info.virtual_address_max; amdgpu_vamgr_init(>vamgr, start, max, dev->dev_info.virtual_address_alignment); -- 2.11.0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx