iris: Fix memory size with disabled resizable bar

When the resizable bar feature is disabled,
then vram.mappable.size is only 256MB.
The second half of the total size is in the vram.unmappable.size variable.

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23402>
This commit is contained in:
Mykhailo Skorokhodov
2023-06-02 18:18:09 +03:00
committed by Marge Bot
parent 07207d12b0
commit 49c7fd7a7e
+7 -1
View File
@@ -2325,8 +2325,14 @@ iris_bufmgr_get_meminfo(struct iris_bufmgr *bufmgr,
bufmgr->sys.region = &devinfo->mem.sram.mem;
bufmgr->sys.size = devinfo->mem.sram.mappable.size;
/* When the resizable bar feature is disabled,
* then vram.mappable.size is only 256MB.
* The second half of the total size is in the vram.unmappable.size
* variable.
*/
bufmgr->vram.region = &devinfo->mem.vram.mem;
bufmgr->vram.size = devinfo->mem.vram.mappable.size;
bufmgr->vram.size = devinfo->mem.vram.mappable.size +
devinfo->mem.vram.unmappable.size;
return true;
}