Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	"Jeevan B" <jeevan.b@intel.com>,
	"Dibin Moolakadan Subrahmanian"
	<dibin.moolakadan.subrahmanian@intel.com>,
	"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: [PATCH i-g-t] tests/intel/kms_pm_dc: Fix compilation on arm64
Date: Mon, 20 Jul 2026 13:48:35 +0200	[thread overview]
Message-ID: <20260720114835.35398-1-kamil.konieczny@linux.intel.com> (raw)

Fix compilation on arm64, where following error occurs:

../tests/intel/kms_pm_dc.c:428:16: error: implicit declaration of function ‘poll’; did you mean ‘powl’? [-Werror=implicit-function-declaration]
  428 |   igt_assert_f(poll(&pfd, 1, timeout_ms) > 0,
      |                ^~~~

Also while at this add a newline to separate system includes
from igt ones and a compilation warning in other place:

../tests/intel/kms_pm_dc.c:322:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  322 |         color_t red_green_blue[] = {
      |         ^~~~~~~

Fixes: e4a428ca3a46 ("tests/intel/kms_pm_dc: Detect frame drops via page-flip events")
Cc: Jeevan B <jeevan.b@intel.com>
Cc: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
 tests/intel/kms_pm_dc.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 37c795ca8..29cfa847e 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -32,9 +32,11 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <poll.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+
 #include "igt.h"
 #include "igt_kmod.h"
 #include "igt_psr.h"
@@ -309,14 +311,6 @@ static void assert_dc_counter_negative(data_t *data, int dc_flag, uint32_t prev_
 static void setup_videoplayback(data_t *data)
 {
 	igt_plane_t *primary;
-
-	primary = igt_output_get_plane_type(data->output,
-					    DRM_PLANE_TYPE_PRIMARY);
-	igt_require_f(igt_plane_has_format_mod(primary, data->dc3co_fb_format,
-					       DRM_FORMAT_MOD_LINEAR),
-					       "Primary plane does not support format %s\n",
-					       igt_format_str(data->dc3co_fb_format));
-
 	color_t red_green_blue[] = {
 		{ 1.0, 0.0, 0.0 },
 		{ 0.0, 1.0, 0.0 },
@@ -328,6 +322,13 @@ static void setup_videoplayback(data_t *data)
 		{ 1.0, 0.0, 0.0 },
 	};
 
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+	igt_require_f(igt_plane_has_format_mod(primary, data->dc3co_fb_format,
+					       DRM_FORMAT_MOD_LINEAR),
+					       "Primary plane does not support format %s\n",
+					       igt_format_str(data->dc3co_fb_format));
+
 	create_color_fb(data, &data->fb_rgb, red_green_blue);
 	create_color_fb(data, &data->fb_rgr, red_green_red);
 }
-- 
2.54.0


             reply	other threads:[~2026-07-20 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 11:48 Kamil Konieczny [this message]
2026-07-20 11:55 ` [PATCH i-g-t] tests/intel/kms_pm_dc: Fix compilation on arm64 Zbigniew Kempczyński
2026-07-20 11:55 ` B, Jeevan
2026-07-21  2:28 ` ✗ Fi.CI.BAT: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260720114835.35398-1-kamil.konieczny@linux.intel.com \
    --to=kamil.konieczny@linux.intel.com \
    --cc=dibin.moolakadan.subrahmanian@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=zbigniew.kempczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox