aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-14 00:06:54 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-14 00:06:54 +0000
commitf2f8a5ae66dd20b7c3fd9d9316259dc8bb3048bc (patch)
tree7aefe538bc5f1030b3d75f90474222d614c0e76f
parent56a6958aceef11944096e2a91468c375042d18b4 (diff)
parent4fdc9fba5b003522630757c4aeb0a17f6da2906b (diff)
downloadigt-gpu-tools-android14-qpr2-release.tar.gz
Change-Id: Ie427d50b6ac14c34ae6aa60ed7f6bfe6763a5632
-rw-r--r--Android.bp6
-rw-r--r--tests/kms_setmode.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 01f59dbed..567772d75 100644
--- a/Android.bp
+++ b/Android.bp
@@ -231,3 +231,9 @@ cc_test {
defaults: ["igt-gpu-tools-test-defaults"],
srcs: ["tests/syncobj_wait.c"],
}
+
+cc_test {
+ name: "kms_setmode",
+ defaults: ["igt-gpu-tools-test-defaults"],
+ srcs: ["tests/kms_setmode.c"],
+}
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 8ace587ee..a47a886ee 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -23,7 +23,9 @@
#include "config.h"
#include "igt.h"
+#if defined(USE_CAIRO_PIXMAN)
#include <cairo.h>
+#endif
#include <errno.h>
#include <stdint.h>
#include <unistd.h>
@@ -134,6 +136,7 @@ static bool crtc_supports_mode(struct crtc_config *crtc, drmModeModeInfo *mode)
return true;
}
+#if defined(USE_CAIRO_PIXMAN)
static int paint_fb(struct igt_fb *fb, const char *test_name,
const char **crtc_str, int crtc_count, int current_crtc_idx)
{
@@ -165,6 +168,7 @@ static int paint_fb(struct igt_fb *fb, const char *test_name,
return 0;
}
+#endif
static void create_fb_for_crtc(struct crtc_config *crtc,
struct igt_fb *fb_info)
@@ -569,7 +573,9 @@ static void test_crtc_config(const struct test_config *tconf,
igt_info(" %s\n", crtc_strs[i]);
create_fb_for_crtc(crtc, &crtc->fb_info);
+#if defined(USE_CAIRO_PIXMAN)
paint_fb(&crtc->fb_info, tconf->name, crtc_strs, crtc_count, i);
+#endif
ids = get_connector_ids(crtc);
if (tconf->flags & TEST_STEALING)