Mesa (master): ac: get tcc_harvested from the kernel
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 29 01:38:57 UTC 2019
Module: Mesa
Branch: master
Commit: 9edcce2a32ed872fef3167258ad2ae4952ca4c60
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9edcce2a32ed872fef3167258ad2ae4952ca4c60
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Sep 24 17:55:52 2019 -0400
ac: get tcc_harvested from the kernel
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
meson.build | 2 +-
src/amd/common/ac_gpu_info.c | 11 ++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 180401c9a23..7eed5319564 100644
--- a/meson.build
+++ b/meson.build
@@ -1286,7 +1286,7 @@ dep_libdrm_radeon = null_dep
dep_libdrm_nouveau = null_dep
dep_libdrm_intel = null_dep
-_drm_amdgpu_ver = '2.4.99'
+_drm_amdgpu_ver = '2.4.100'
_drm_radeon_ver = '2.4.71'
_drm_nouveau_ver = '2.4.66'
_drm_intel_ver = '2.4.75'
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index e64f94d8923..9caa51cb8b9 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -470,9 +470,14 @@ bool ac_query_gpu_info(int fd, void *dev_p,
}
if (info->chip_class >= GFX10) {
info->tcc_cache_line_size = 128;
- /* This is a hack, but it's all we can do without a kernel upgrade. */
- info->tcc_harvested =
- (info->vram_size / info->num_tcc_blocks) != 512*1024*1024;
+
+ if (info->drm_minor >= 35) {
+ info->tcc_harvested = device_info.tcc_disabled_mask != 0;
+ } else {
+ /* This is a hack, but it's all we can do without a kernel upgrade. */
+ info->tcc_harvested =
+ (info->vram_size / info->num_tcc_blocks) != 512*1024*1024;
+ }
} else {
info->tcc_cache_line_size = 64;
}
More information about the mesa-commit
mailing list