mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 09:35:53 -04:00
drm/v3d: Use write_to_buffer() helper in performance query copy
The copy of performance query results to the output buffer open-codes the 32-bit/64-bit selection with two nearly identical loops. As the write_to_buffer() helper already encapsulates the do_64bit decision, use it instead of open-coding it. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patch.msgid.link/20260703-v3d-cpu-job-fixes-v3-3-bc51b1f3eeb5@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
This commit is contained in:
@@ -587,15 +587,8 @@ v3d_write_performance_query_result(struct v3d_cpu_job *job, void *data,
|
||||
|
||||
v3d_perfmon_stop(v3d, perfmon, true);
|
||||
|
||||
if (job->copy.do_64bit) {
|
||||
for (j = 0; j < perfmon->ncounters; j++)
|
||||
write_to_buffer_64(data, offset + j,
|
||||
perfmon->values[j]);
|
||||
} else {
|
||||
for (j = 0; j < perfmon->ncounters; j++)
|
||||
write_to_buffer_32(data, offset + j,
|
||||
perfmon->values[j]);
|
||||
}
|
||||
for (j = 0; j < perfmon->ncounters; j++)
|
||||
write_to_buffer(data, offset + j, job->copy.do_64bit, perfmon->values[j]);
|
||||
|
||||
v3d_perfmon_put(perfmon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user