freedreno: Fix shader-clock when kernel exposes UCHE_TRAP_BASE

Fixes: 4b1b4ee10c ("freedreno,tu: Read and pass to compiler uche_trap_base)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35010>
(cherry picked from commit 65e18a8494)
This commit is contained in:
Rob Clark 2025-05-15 14:29:53 -07:00 committed by Eric Engestrom
parent 12ddaa6b8b
commit 9a36291900
2 changed files with 5 additions and 2 deletions

View file

@ -1514,7 +1514,7 @@
"description": "freedreno: Fix shader-clock when kernel exposes UCHE_TRAP_BASE",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4b1b4ee10c0768a5a43dee508601e4e2b39520eb",
"notes": null

View file

@ -923,8 +923,11 @@ fd_screen_create(int fd,
if (fd_device_version(dev) >= FD_VERSION_ROBUSTNESS)
screen->has_robustness = true;
if (fd_pipe_get_param(screen->pipe, FD_UCHE_TRAP_BASE, &val))
if (fd_pipe_get_param(screen->pipe, FD_UCHE_TRAP_BASE, &val)) {
screen->uche_trap_base = screen->gen >= 6 ? 0x1fffffffff000ull : 0ull;
} else {
screen->uche_trap_base = val;
}
screen->has_syncobj = fd_has_syncobj(screen->dev);