mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 23:55:20 -04:00
drm/i915/selftests: Fix GT PM sort comparators
Compare the sampled clock values instead of their addresses. Comparing
addresses leaves the samples unsorted, preventing the code from discarding
the minimum and maximum samples.
Fixes: 1a53924792 ("drm/i915/selftests: Measure CS_TIMESTAMP")
Signed-off-by: Emre Cecanpunar <emreleno@gmail.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260714220430.238433-1-emreleno@gmail.com
This commit is contained in:
committed by
Tvrtko Ursulin
parent
14a2012a49
commit
682ea2d28d
@@ -16,9 +16,9 @@ static int cmp_u64(const void *A, const void *B)
|
||||
{
|
||||
const u64 *a = A, *b = B;
|
||||
|
||||
if (a < b)
|
||||
if (*a < *b)
|
||||
return -1;
|
||||
else if (a > b)
|
||||
else if (*a > *b)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
@@ -28,9 +28,9 @@ static int cmp_u32(const void *A, const void *B)
|
||||
{
|
||||
const u32 *a = A, *b = B;
|
||||
|
||||
if (a < b)
|
||||
if (*a < *b)
|
||||
return -1;
|
||||
else if (a > b)
|
||||
else if (*a > *b)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user