Module: Mesa
Branch: staging/23.3
Commit: db5d58d009e7dad2ccac1bd049751853669c5266
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=db5d58d009e7dad2ccac1bd049751853669c5266

Author: Kenneth Graunke <[email protected]>
Date:   Wed Dec  6 07:48:11 2023 -0800

anv: Drop 3/4 of PPGTT size restriction for sys heap size calculation

This was mainly useful for older Gen7.x GPUs with 32-bit PPGTT, which
are now supported by hasvk rather than anv.  The remaining platforms
which anv supports have 36, 47, or 48-bit PPGTT, which imposes a 3/4
limit of 48GB, 96TB, and 192TB of memory.

The GPUs with 36-bit PPGTT are Elkhart Lake and Jasper Lake, which
appear to be Atom CPUs that have a maximum supported memory
configuration of 32GB or less, so this limit should not matter there.
Nor is a multi-TB limit likely to matter on our other parts.

Drop this check to simplify the heap and memory budget calculations.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: José Roberto de Souza <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26553>
(cherry picked from commit 029b1d3f262051c9b0fc3ba6c7faca2affa18ddf)

---

 .pick_status.json             | 2 +-
 src/intel/vulkan/anv_device.c | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index d46e808404d..aa6dcd0bf01 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -474,7 +474,7 @@
         "description": "anv: Drop 3/4 of PPGTT size restriction for sys heap 
size calculation",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 05c837ff8ca..1b1c7fba3dc 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -880,11 +880,6 @@ anv_compute_sys_heap_size(struct anv_physical_device 
*device,
    else
       available_ram = total_ram * 3 / 4;
 
-   /* We also want to leave some padding for things we allocate in the driver,
-    * so don't go over 3/4 of the GTT either.
-    */
-   available_ram = MIN2(available_ram, device->gtt_size * 3 / 4);
-
    return available_ram;
 }
 

Reply via email to