From 5ae953b5e97831a1bc3db9f24b06bd916f89e76f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 6 Jun 2023 16:25:37 -0700 Subject: [PATCH] radv: disable calibrated timestamps on raven/raven2 amdgpu enables gfxoff by default and the feature resets the RLC clock counter on idle on raven/raven2. Querying AMDGPU_INFO_TIMESTAMP does not work as expected on those platforms. There was an attempt in amdgpu to read from the TSC register instead, but it did not work without a firmware update[1]. Another possible solution is to disable the clock counter reset by clearing AMD_PG_SUPPORT_RLC_SMU_HS, but that causes a 0.2W increase of power consumption on idle which is undesirable. The clock counter reset affects vkCmdWriteTimestamp as well. The spec is vague on whether that is allowed or not. The WG is aware of the issue[2] but never really addresses it. [1] https://lists.freedesktop.org/archives/amd-gfx/2023-May/093731.html [2] https://github.com/KhronosGroup/Vulkan-Docs/issues/216 Part-of: --- src/amd/vulkan/radv_physical_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 3fe2294..afe8755 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -485,7 +485,9 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device .EXT_attachment_feedback_loop_layout = true, .EXT_border_color_swizzle = device->rad_info.gfx_level >= GFX10, .EXT_buffer_device_address = true, - .EXT_calibrated_timestamps = RADV_SUPPORT_CALIBRATED_TIMESTAMPS, + .EXT_calibrated_timestamps = RADV_SUPPORT_CALIBRATED_TIMESTAMPS && + !(device->rad_info.family == CHIP_RAVEN || + device->rad_info.family == CHIP_RAVEN2), .EXT_color_write_enable = true, .EXT_conditional_rendering = true, .EXT_conservative_rasterization = device->rad_info.gfx_level >= GFX9, -- 2.7.4