From patchwork Thu Jan 14 22:08:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 8036171 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1BF799F716 for ; Thu, 14 Jan 2016 22:09:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07C492045A for ; Thu, 14 Jan 2016 22:09:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7B41B2040F for ; Thu, 14 Jan 2016 22:09:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82D8F6E05F; Thu, 14 Jan 2016 14:09:09 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy4-pub.mail.unifiedlayer.com (gproxy4-pub.mail.unifiedlayer.com [69.89.23.142]) by gabe.freedesktop.org (Postfix) with SMTP id 2EF196E05F for ; Thu, 14 Jan 2016 14:09:08 -0800 (PST) Received: (qmail 17942 invoked by uid 0); 14 Jan 2016 22:09:06 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy4.mail.unifiedlayer.com with SMTP; 14 Jan 2016 22:09:06 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by cmgw3 with id 658y1s00P2UhLwi01591zD; Thu, 14 Jan 2016 22:09:03 -0700 X-Authority-Analysis: v=2.1 cv=bej4Do/B c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=AYXDDH2dM-MA:10 a=7aQ_Q-yQQ-AA:10 a=cZmgNCUo71eVZjhXHaUA:9 a=zOqj3bFHUP5jA_j3:21 a=3E1nkfkJO_9jgfKD:21 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Message-Id:Date:Subject:To:From; bh=Lv1wx8ktMAZoZbCpx0P8FnKIeakeYQFxWJ+H2rvfxmU=; b=X+ttHV60tbsA1G3ym8QVCZ+lRGbxypOoDGllPARetY4mHiOdtsOBUOWeiZCqH0Tz2EtIj5bLVxRZ5PZBxDs5+JJHvuYqZCZ6cpLYTR0CY9/dJuXpCXtwM3+EytGC0X66; Received: from [98.207.216.137] (port=41078 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.84) (envelope-from ) id 1aJq4i-00045w-OR for intel-gfx@lists.freedesktop.org; Thu, 14 Jan 2016 15:09:00 -0700 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Thu, 14 Jan 2016 14:08:55 -0800 Message-Id: <1452809335-24609-1-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.9.1 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 98.207.216.137 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH i-g-t] lib/igt_kms, tests/testdisplay: allow probing of new connector modes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixup some fallout from the connector probing changes so testdisplay -m will pick up newly hotplugged displays correctly. Signed-off-by: Jesse Barnes mode_valid = 0; return; } @@ -456,7 +463,7 @@ set_stereo_mode(struct connector *c) * Each connector has a corresponding encoder, except in the SDVO case * where an encoder may have multiple connectors. */ -int update_display(void) +int update_display(bool probe) { struct connector *connectors; int c; @@ -488,7 +495,7 @@ int update_display(void) connector_find_preferred_mode(connector->id, crtc_idx_mask, specified_mode_num, - connector); + connector, probe); if (!connector->mode_valid) continue; @@ -513,7 +520,7 @@ int update_display(void) connector_find_preferred_mode(connector->id, -1UL, specified_mode_num, - connector); + connector, probe); if (!connector->mode_valid) continue; @@ -765,7 +772,7 @@ int main(int argc, char **argv) ret = 0; - if (!update_display()) { + if (!update_display(false)) { ret = 1; goto out_stdio; } diff --git a/tests/testdisplay.h b/tests/testdisplay.h index 962e621..27f8209 100644 --- a/tests/testdisplay.h +++ b/tests/testdisplay.h @@ -32,4 +32,4 @@ gboolean testdisplay_setup_hotplug(void); void testdisplay_cleanup_hotplug(void); /* called by the hotplug code */ -int update_display(void); +int update_display(bool probe); diff --git a/tests/testdisplay_hotplug.c b/tests/testdisplay_hotplug.c index 9d11399..3b900ca 100644 --- a/tests/testdisplay_hotplug.c +++ b/tests/testdisplay_hotplug.c @@ -59,7 +59,7 @@ static gboolean hotplug_event(GIOChannel *source, GIOCondition condition, if (memcmp(&s.st_rdev, &udev_devnum, sizeof(dev_t)) == 0 && hotplug && atoi(hotplug) == 1) - update_display(); + update_display(true); udev_device_unref(dev); out: