Skip to contentSkip to conversation

drm: increase drm mmap_range size to 1TB

PATCH In review Yang, Philip 5 participants 5 messages Apr 17, 2019 – Apr 18, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: increase drm mmap_range size to 1TB

After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB.

Change-Id Id482af261f56f3289e8873f5985078da599a0998
---
 include/drm/drm_vma_manager.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_vma_manager.h +1 -1
index f4f8ff1cdeec..76ac5e97a559 100644
@@ -35,7 +35,7 @@
  */
 #if BITS_PER_LONG == 64
 #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFFUL >> PAGE_SHIFT) + 1)
-#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 16)
+#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 256)
 #else
 #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFUL >> PAGE_SHIFT) + 1)
 #define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFUL >> PAGE_SHIFT) * 16)
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Adding dri-devel

Quoted 16 lines · Philip

After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB.

Change-Id Id482af261f56f3289e8873f5985078da599a0998
---
  include/drm/drm_vma_manager.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_vma_manager.h +0 -0
index f4f8ff1cdeec..76ac5e97a559 100644

include/drm/drm_vma_manager.h line 41

Quoted 8 lines
include/drm/drm_vma_manager.h +1 -1
@@ -35,7 +35,7 @@
   */
  #if BITS_PER_LONG == 64
  #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFFUL >> PAGE_SHIFT) + 1)
-#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 16)
+#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 256)
  #else
  #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFUL >> PAGE_SHIFT) + 1)
  #define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFUL >> PAGE_SHIFT) * 16)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): c8d289ef-75dc-163e-bea5-cd0d429d8614-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#4 lore raw

Hi

Am 18.04.19 um 00:16 schrieb Kuehling, Felix:

Quoted 7 lines

Adding dri-devel

Quoted 4 lines · Philip

After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB.

That change in size was accidental. Thanks for restoring the original value. The fix will affect GEM as well. If that is not a problem then

Best regards
Thomas

Quoted 24 lines
Quoted 11 lines
Change-Id Id482af261f56f3289e8873f5985078da599a0998
---
  include/drm/drm_vma_manager.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_vma_manager.h +0 -0
index f4f8ff1cdeec..76ac5e97a559 100644

include/drm/drm_vma_manager.h line 41

Quoted 8 lines
include/drm/drm_vma_manager.h +1 -1
@@ -35,7 +35,7 @@
   */
  #if BITS_PER_LONG == 64
  #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFFUL >> PAGE_SHIFT) + 1)
-#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 16)
+#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 256)
  #else
  #define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFUL >> PAGE_SHIFT) + 1)
  #define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFUL >> PAGE_SHIFT) * 16)

_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 5 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#5 lore raw

Quoting Thomas Zimmermann (2019-04-18 08:29:39)

Quoted 5 lines

Hi

Am 18.04.19 um 00:16 schrieb Kuehling, Felix:

Quoted 2 lines

Adding dri-devel

Quoted 9 lines
Quoted 5 lines · Philip
Quoted 4 lines

After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB.

That change in size was accidental. Thanks for restoring the original value. The fix will affect GEM as well. If that is not a problem then

Why even have an artificial restriction?
-Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Am 18.04.19 um 09:32 schrieb Chris Wilson:

Quoted 7 lines

Quoting Thomas Zimmermann (2019-04-18 08:29:39)

Quoted 6 lines

Hi

Am 18.04.19 um 00:16 schrieb Kuehling, Felix:

Quoted 3 lines

Adding dri-devel

On 2019-04-17 6:15 p.m., Yang, Philip wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB.

That change in size was accidental. Thanks for restoring the original value. The fix will affect GEM as well. If that is not a problem then

Why even have an artificial restriction?

Well one possible explanation is that we somewhere need to allocate memory to handle all that address space. E.g. when it is managed with a radix or similar.

But as far as I remember there are only lists and r/b trees involved here, so yeah doesn't make to much sense.

Anyway that is not the topic of this patch and it is Reviewed-by: Christian König <[email protected]> for now.

Regards,
Christian.

Quoted 5 lines

-Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx