[igt-dev] [i-g-t 4/5] tests/intel/kms_dirtyfb: Use blitter if rendercopy isn't present
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Wed Nov 15 07:03:43 UTC 2023
As Rendercopy support in IGT is not present for few latest
platforms. So, fallback to use Blitter if Rendercopy isn't
present.
Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Jouni Högander <jouni.hogander at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/intel/kms_dirtyfb.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
index c072c221d..a0f61b7a3 100644
--- a/tests/intel/kms_dirtyfb.c
+++ b/tests/intel/kms_dirtyfb.c
@@ -237,8 +237,6 @@ static void run_test(data_t *data)
igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
int r;
- igt_skip_on(!rendercopy);
-
src = intel_buf_create_full(data->bops, data->fbs[1].gem_handle,
data->fbs[1].width,
data->fbs[1].height,
@@ -259,13 +257,19 @@ static void run_test(data_t *data)
spin = igt_spin_new(data->drm_fd, .ahnd = ibb->allocator_handle);
igt_spin_set_timeout(spin, NSEC_PER_SEC);
- rendercopy(ibb, src, 0, 0, data->fbs[2].width, data->fbs[2].height, dst, 0, 0);
+ if (rendercopy) {
+ rendercopy(ibb, src, 0, 0, data->fbs[2].width, data->fbs[2].height, dst, 0, 0);
+ } else {
+ intel_bb_blt_copy(ibb, src, 0, 0, src->surface[0].stride,
+ dst, 0, 0, dst->surface[0].stride,
+ data->fbs[2].width, data->fbs[2].height, dst->bpp);
+ }
- /* Perfom dirtyfb right after initiating rendercopy */
+ /* Perfom dirtyfb right after initiating rendercopy/blitter */
r = drmModeDirtyFB(data->drm_fd, data->fbs[2].fb_id, NULL, 0);
igt_assert(r == 0 || r == -ENOSYS);
- /* Ensure rendercopy is complete */
+ /* Ensure rendercopy/blitter is complete */
intel_bb_sync(ibb);
igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
--
2.40.0
More information about the igt-dev
mailing list