From patchwork Sat Feb 18 15:37:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9581117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CFA36049F for ; Sat, 18 Feb 2017 15:38:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07F282871E for ; Sat, 18 Feb 2017 15:38:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE16128728; Sat, 18 Feb 2017 15:37:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F86F2871E for ; Sat, 18 Feb 2017 15:37:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79EE76E0DB; Sat, 18 Feb 2017 15:37:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 131366E0DB for ; Sat, 18 Feb 2017 15:37:57 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id c85so7248289wmi.1 for ; Sat, 18 Feb 2017 07:37:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=46F8zVfagPGMc81FpDMqDjBzOf6hg5jl6pdGpddGgiA=; b=Ah+IcMMPBU82NStd5gFuL/1hqwSw6SkCeVjoVX85kBjDUeGHK7Kns255ZjOulU6AQk 250GUHlqknPbRTWAYrb4d9YcCGYeHXfOv15ZqGrKLUvGzS9gEonNjKkn3HPhlnyxy96s ETHamenrNfu4bjWaQUWNUSTiGp+DWoizCA7rf8dpHk2pNh3CJnBRVAns5H+4iaWV9uO4 vjURKizfgllLk3IRp1IfvGsOocC6yzAjnWwwZi2CrsYFlWbYabvlOVRMiwilcvB7HJmQ eY5PJbdqekByOaFscoxrtSQTM7N94n0gjGoa96DfwbtqoEw0zIUzVpQwfwSA2FYWwRFe bGRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=46F8zVfagPGMc81FpDMqDjBzOf6hg5jl6pdGpddGgiA=; b=g5JrPGzVBrjMPLW57IwBpre+Xk7aqNv/+4kzVZNi+YKCL8SS0rCFmrpg7nmbqpbhpt W8ygr2snLKHxfumtayarOy50yZxukqiTU6TSErqrcl/urkW1BSxIjRbySvyL2nlvmX6I Pn0CpXv3iXpdBRgTn0Dg9+aKFGNAmwuTSpXsPphnEYZIoc/5HyCcOVWdTMuDPEPs3OFw oUoe6eq/tCCU9LYdcUh58YlXVJtNmmrbYo1ThoJF1GF+TfxNiciweeouXjTlw/8I14Yu 6itCe0ETt9aJhmiQh+9Ls12aXAXyZJXcrdJpM3IdlHkAMGp5E4r2HfYA/dwQ64gYO5qC kvnQ== X-Gm-Message-State: AMke39k8HnCc9knQvkTGI9VOewtBPt7sOwdWRDeCvy9p1hzuR5e7VGvXWLlxsL2x5/zfcg== X-Received: by 10.28.6.210 with SMTP id 201mr9975752wmg.85.1487432275750; Sat, 18 Feb 2017 07:37:55 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id 40sm17340959wry.22.2017.02.18.07.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Feb 2017 07:37:55 -0800 (PST) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Sat, 18 Feb 2017 15:37:53 +0000 Message-Id: <20170218153753.4559-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <1487326666-15789-2-git-send-email-tomasz.lis@intel.com> References: <1487326666-15789-2-git-send-email-tomasz.lis@intel.com> Cc: "# v3 . 19+" , Dave Airlie , Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915/fbdev: Stop repeating tile configuration on stagnation 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-Virus-Scanned: ClamAV using ClamSMTP If we cease making progress in finding matching outputs for a tiled configuration, stop looping over the remaining unconfigured outputs. Fixes: b0ee9e7fa5b4 ("drm/fb: add support for tiled monitor configurations. (v2)") Cc: Tomasz Lis Cc: Dave Airlie Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: # v3.19+ --- drivers/gpu/drm/i915/intel_fbdev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 041322fef607..32d0af6b07a7 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -348,7 +348,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, bool *enabled, int width, int height) { struct drm_i915_private *dev_priv = to_i915(fb_helper->dev); - unsigned long conn_configured, mask; + unsigned long conn_configured, conn_seq, mask; unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG); int i, j; bool *save_enabled; @@ -365,6 +365,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, mask = GENMASK(count - 1, 0); conn_configured = 0; retry: + conn_seq = conn_configured; for (i = 0; i < count; i++) { struct drm_fb_helper_connector *fb_conn; struct drm_connector *connector; @@ -489,10 +490,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, conn_configured |= BIT(i); } - if ((conn_configured & mask) != mask) { - pass++; + if ((conn_configured & mask) != mask && conn_configured != conn_seq) goto retry; - } /* * If the BIOS didn't enable everything it could, fall back to have the