ac: add ac_gpu_info::has_stable_pstate
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 3 Dec 2021 07:47:36 +0000 (08:47 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 21 Feb 2022 11:16:11 +0000 (11:16 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14038>

src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h

index 3e51eec..f483487 100644 (file)
@@ -1164,6 +1164,8 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
 
    info->has_gds_ordered_append = info->chip_class >= GFX7 && info->drm_minor >= 29;
 
+   info->has_stable_pstate = info->drm_minor >= 45;
+
    if (info->chip_class >= GFX9 && info->has_graphics) {
       unsigned pc_lines = 0;
 
@@ -1394,6 +1396,7 @@ void ac_print_gpu_info(struct radeon_info *info, FILE *f)
    fprintf(f, "    has_2d_tiling = %u\n", info->has_2d_tiling);
    fprintf(f, "    has_read_registers_query = %u\n", info->has_read_registers_query);
    fprintf(f, "    has_gds_ordered_append = %u\n", info->has_gds_ordered_append);
+   fprintf(f, "    has_stable_pstate = %u\n", info->has_stable_pstate);
    fprintf(f, "    has_scheduled_fence_dependency = %u\n", info->has_scheduled_fence_dependency);
    fprintf(f, "    mid_command_buffer_preemption_enabled = %u\n",
            info->mid_command_buffer_preemption_enabled);
index 51e27f0..413ddea 100644 (file)
@@ -187,6 +187,7 @@ struct radeon_info {
    bool has_read_registers_query;
    bool has_gds_ordered_append;
    bool has_scheduled_fence_dependency;
+   bool has_stable_pstate;
    /* Whether SR-IOV is enabled or amdgpu.mcbp=1 was set on the kernel command line. */
    bool mid_command_buffer_preemption_enabled;
    bool has_tmz_support;