From: Chia-I Wu Date: Tue, 6 Jun 2023 23:25:37 +0000 (-0700) Subject: radv: disable calibrated timestamps on raven/raven2 X-Git-Tag: upstream/23.3.3~7225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ae953b5e97831a1bc3db9f24b06bd916f89e76f;p=platform%2Fupstream%2Fmesa.git 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: --- 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,