[PATCH i-g-t v6 07/12] benchmarks/kms_fb_stress: Set writeback rectangle size outside the loop
Arthur Grillo
arthurgrillo at riseup.net
Fri Sep 13 00:39:31 UTC 2024
This doesn't need to be inside the loop, so move out of it.
Signed-off-by: Arthur Grillo <arthurgrillo at riseup.net>
---
benchmarks/kms_fb_stress.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/benchmarks/kms_fb_stress.c b/benchmarks/kms_fb_stress.c
index dce69d0b5b81..6f70f201be0d 100644
--- a/benchmarks/kms_fb_stress.c
+++ b/benchmarks/kms_fb_stress.c
@@ -72,14 +72,14 @@ static void gen_fbs(struct data_t *data)
{
struct kms_t *kms = &data->kms;
drmModeModeInfo *mode = igt_output_get_mode(data->wb_output);
+ kms->writeback.rect.width = mode->hdisplay;
+ kms->writeback.rect.height = mode->vdisplay;
for (int i = 0; i < NUM_FBS; i++) {
create_fb(data->fd, &kms->primary, i, !i, i, i);
create_fb(data->fd, &kms->overlay_a, i, i, !i, i);
create_fb(data->fd, &kms->overlay_b, i, i, i, !i);
- kms->writeback.rect.width = mode->hdisplay;
- kms->writeback.rect.height = mode->vdisplay;
igt_create_fb(data->fd, kms->writeback.rect.width, kms->writeback.rect.height,
kms->writeback.format, DRM_FORMAT_MOD_LINEAR,
&kms->writeback.fbs[i]);
--
2.46.0
More information about the igt-dev
mailing list