tests/intel/xe_pmu: Fix gt-frequency failure with raised min freq
PATCH v3 1/1 tests/intel/xe_pmu: Fix gt-frequency failure with raised min freq
The gt-frequency subtest can fail when the min frequency has already been raised above RPn before the test begins. Using that value as the original minimum prevents the later min_freq write from enabling the GuC ignore_efficient_freq parameter, so min_freq can keep moving toward RPe.
Since RPe varies dynamically with thermal conditions, use RPn as the fixed minimum baseline instead. This ensures that writing to min_freq enables the ignore_efficient_freq GuC parameter.
v2: Fix commit message (Vinay)
v3: Cosmetic changes (Kamil)
Signed-off-by Sk Anirban <[email protected]>
Reviewed-by Vinay Belgaumkar <[email protected]>
--- tests/intel/xe_pmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
tests/intel/xe_pmu.c +2 -6
@@ -903,10 +903,8 @@ static void test_gt_frequency(int fd, struct drm_xe_engine_class_instance *eci)unsigned long config_rq_freq, config_act_freq;double min[2 ], max[2 ];uint32_t gt = eci->gt_id; -uint32_t orig_min =xe_gt_get_freq (fd, eci->gt_id,"min" ); +uint32_t orig_min =xe_gt_get_freq (fd, eci->gt_id,"rpn" );uint32_t orig_max =xe_gt_get_freq (fd, eci->gt_id,"max" ); -uint32_t current_min; -uint32_t orig_rpe;uint32_t vm;int pmu_fd[2 ];
@@ -956,9 +954,7 @@ static void test_gt_frequency(int fd, struct drm_xe_engine_class_instance *eci)* Restore min/max. */ igt_assert (xe_gt_set_freq (fd, gt,"min" , orig_min) >0 ); - orig_rpe =xe_gt_get_freq (fd, gt,"rpe" ); - current_min =xe_gt_get_freq (fd, gt,"min" ); -igt_assert (current_min == orig_min || current_min == orig_rpe); +igt_assert (xe_gt_get_freq (fd, gt,"min" ) == orig_min);igt_info ("Minimum frequency: requested %.1f, actual %.1f\n" , min[0 ], min[1 ]);
Signature · 1 line
2.43.0