From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCEACC44515 for ; Mon, 20 Jul 2026 22:47:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82B9A10E1FB; Mon, 20 Jul 2026 22:47:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UKyzIkMP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A5FC10E1FB for ; Mon, 20 Jul 2026 22:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784587600; x=1816123600; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rnrTDpVjbg8Ri70UAUscdnPZ6+7X2XO3iNoDLeT4S2E=; b=UKyzIkMPcOUH0PbVFCH0V5MHSWnYo/IFIkyBDAEYU2u+A0pSSu42w4eK d+T68EFuSqjyRIfiv4sDJq88uIynIsPNd4PfqKlEkZ8xDylTUjim8DZlg Ukw/hstbPXzoC2O+vCOgfbRPZ/FxTQUv9POUkPXN86B12MbKd6Y138PVQ 322Y24D3A3+fnvYLzvWa5ljNt/DBkrlCpGNmuwYI+p1HJ9WDbrhJw1Kgj gImRh4g8gIfi4RCu8vKfh0sKdesW5UmAvZghZCLMdyAn/84fiYKhswH1P 4Ee1Z5os45Xz3VcCoOO1Afc6GFARU+Pk0r9D9DWhiH+G8DEchCQZcm3+w g==; X-CSE-ConnectionGUID: xSZhQB2tRCGwSgAjh26k/w== X-CSE-MsgGUID: AapL2+txSeWrXPwvpQskAA== X-IronPort-AV: E=McAfee;i="6800,10657,11852"; a="87719487" X-IronPort-AV: E=Sophos;i="6.25,175,1779174000"; d="scan'208";a="87719487" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2026 15:46:39 -0700 X-CSE-ConnectionGUID: VCslcU/EQRC6yGRAlOMcPw== X-CSE-MsgGUID: E7bJUU6JTvGUDEErkYYJ9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,175,1779174000"; d="scan'208";a="254175759" Received: from osgc-sh-dragon.sh.intel.com ([10.239.81.44]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2026 15:46:38 -0700 From: Jonathan Cavitt To: igt-dev@lists.freedesktop.org Cc: jonathan.cavitt@intel.com, alex.zuo@intel.com, daniele.ceraolospurio@intel.com, ville.syrjala@linux.intel.com Subject: [PATCH i-g-t] tests/intel/xe_pxp: Require output for display tests Date: Tue, 21 Jul 2026 06:46:35 +0800 Message-ID: <20260720224635.1963815-1-jonathan.cavitt@intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" The subtests display-pxp-fb and display-black-pxp-fb both call the function igt_create_color_fb with a width and height value generated by getting outputs from for_each_connected_output and selecting the maximum width and height among all available connected outputs. If there are no such outputs, then the resulting values will be zero, which is an invalid input for the DRM_XE_CREATE_DUMB ioctl. Skip these tests if there are no connected outputs. Signed-off-by: Jonathan Cavitt Cc: Daniele Ceraolo Spurio Cc: Ville Syrjälä --- tests/intel/xe_pxp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/intel/xe_pxp.c b/tests/intel/xe_pxp.c index 9320078733..080dc9519e 100644 --- a/tests/intel/xe_pxp.c +++ b/tests/intel/xe_pxp.c @@ -868,6 +868,18 @@ static void compare_crcs(int fd, igt_display_t *display, igt_fb_t *ref_fb, igt_f } } +static void require_connected_output(igt_display_t *display) +{ + igt_output_t *output; + bool connected_output = false; + + for_each_connected_output(display, output) { + connected_output = true; + break; + } + igt_require_f(connected_output, "Display has no connected outputs\n"); +} + /** * SUBTEST: display-pxp-fb * Description: Test that an encrypted fb is displayed correctly by comparing @@ -1165,12 +1177,14 @@ int igt_main() igt_subtest("display-pxp-fb") { require_display(xe_fd, &display); require_pxp_render(xe_fd, pxp_supported); + require_connected_output(&display); test_display_pxp_fb(xe_fd, &display); } igt_subtest("display-black-pxp-fb") { require_display(xe_fd, &display); require_pxp_render(xe_fd, pxp_supported); + require_connected_output(&display); test_display_black_pxp_fb(xe_fd, &display); } } -- 2.53.0