From cf302c9a22fab86da0bc70f377c8f0c43f5d8d77 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Thu, 27 Feb 2020 11:18:45 -0500 Subject: turnip: don't hardcode gmem base for input attachment Newer a6xx no longer has programmable GMEM base, so we can't rely on the kernel driver setting it to 0x100000 (GMEM base is 0 on such GPUs). Signed-off-by: Jonathan Marek Reviewed-by: Eric Anholt Part-of: --- src/freedreno/vulkan/tu_drm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/freedreno/vulkan/tu_drm.c') diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index 9b2e6f78879..5e91adaf89e 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -79,6 +79,12 @@ tu_drm_get_gmem_size(const struct tu_physical_device *dev, uint32_t *size) return 0; } +int +tu_drm_get_gmem_base(const struct tu_physical_device *dev, uint64_t *base) +{ + return tu_drm_get_param(dev, MSM_PARAM_GMEM_BASE, base); +} + int tu_drm_submitqueue_new(const struct tu_device *dev, int priority, -- cgit v1.2.3