From patchwork Tue Apr 19 11:40:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8878971 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BB0BFBF29F for ; Tue, 19 Apr 2016 11:41:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C894420145 for ; Tue, 19 Apr 2016 11:40:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EA7CB2012B for ; Tue, 19 Apr 2016 11:40:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECA246E740; Tue, 19 Apr 2016 11:40:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7919E6E740 for ; Tue, 19 Apr 2016 11:40:49 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id l6so4347281wml.3 for ; Tue, 19 Apr 2016 04:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vecbtMxn27iIMveL1ioin4gpX9EM5fs9mhOzJ0h8L1k=; b=dsMLbP6/pAJtVBescCsu3WGeNJVfQTKoNKCJOuvQiwqquA2qgno2sQpphYDetvEJ3k nOW9luJvm86BXwlk+NKVFH8GyFT4SWrUtp3E4SmFi8DAOhndJLnDP5qep7D6+lMJwVvZ e+LE6D4D4idgviC04gtryHWpHdajGmjkuNy7F+BY+K1eJo5uRQGj5vJxIuV0J7NlVcTV 4fMSRzgXCiupp4nHNwxN9/GaGjztFOnWxbLtysHRktteiz7C8+/Xz0oAwV3/WpJj5E6W LeQVAo3ZhC7jwL1RsQXLozYz7UikCo+Oi02Je03aBJ8jOhjzEYsiI6vA9RsxnllCbcsb Qo2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vecbtMxn27iIMveL1ioin4gpX9EM5fs9mhOzJ0h8L1k=; b=kdKs1HmZRzX7/Skk7f1Y1YdA77o1K04j+fCVlQV9hihIESMCfINAh541yPHronBNK8 wIaS01g4EU3nuAzASacTqw1AiOxZ+g8PCuPgi2sL/N3PhZMCMHcIFFuI51fhCKngHBA7 idWLRC0UQSQdplsR2jrAZsvgCmKXxQ6k+QZEwZmuzoqbZH4sfcTlPXZ2hPQ1s0EFUrhZ aBzspoH6TVDXuCEJET/xTyLCTnqAk2kfhFGek6Y+pLtNHQZoCOwIAR6bOg8M8eIZqASA 29HLpeLbe0/DaFfcuBNp/hLiBi9QiAoAOUBcrMUTcFR2/60d3N24+pMaXLVJFpV3WeV3 deKw== X-Gm-Message-State: AOPr4FXSfu6JwdQDGAtxUIKJnQ4ldq7/jpo0dkW2PcJYVw6mwvGGkzQZJGsAicfrceCxsQ== X-Received: by 10.28.10.7 with SMTP id 7mr8695611wmk.43.1461066047650; Tue, 19 Apr 2016 04:40:47 -0700 (PDT) Received: from cizrna.lan ([109.72.12.68]) by smtp.gmail.com with ESMTPSA id g78sm3860424wme.21.2016.04.19.04.40.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Apr 2016 04:40:46 -0700 (PDT) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 19 Apr 2016 13:40:28 +0200 Message-Id: <1461066028-30499-3-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1461066028-30499-1-git-send-email-tomeu.vizoso@collabora.com> References: <1461066028-30499-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Daniel Stone , Tomeu Vizoso , Micah Fedke , Gustavo Padovan , Emil Velikov Subject: [Intel-gfx] [i-g-t PATCH v1 2/2] tests/kms_setmode: Remove superfluous call to kmstest_get_pipe_from_crtc_id 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=-5.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 connector_config.crtc_idx already contains the pipe ID, so just use that and drop the call to kmstest_get_pipe_from_crtc_id which is problematic on drivers other than i915 because it uses DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID. Signed-off-by: Tomeu Vizoso danvet --- tests/kms_setmode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 24fb34ca0006..34f27c66d79e 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -89,7 +89,6 @@ struct connector_config { struct crtc_config { int crtc_idx; int crtc_id; - int pipe_id; int connector_count; struct connector_config *cconfs; struct igt_fb fb_info; @@ -241,7 +240,7 @@ static void get_crtc_config_str(struct crtc_config *crtc, char *buf, pos = snprintf(buf, buf_size, "CRTC[%d] [Pipe %s] Mode: %s@%dHz Connectors: ", - crtc->crtc_id, kmstest_pipe_name(crtc->pipe_id), + crtc->crtc_id, kmstest_pipe_name(crtc->crtc_idx), crtc->mode.name, crtc->mode.vrefresh); if (pos > buf_size) return; @@ -285,8 +284,6 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, resources->crtcs[crtc->crtc_idx]); crtc->crtc_id = drm_crtc->crtc_id; drmModeFreeCrtc(drm_crtc); - crtc->pipe_id = kmstest_get_pipe_from_crtc_id(drm_fd, - crtc->crtc_id); crtc->connector_count = 1; for (j = i + 1; j < connector_count; j++)