From patchwork Fri Nov 2 11:44:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10665785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9805214E2 for ; Fri, 2 Nov 2018 16:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84F5D2C3FD for ; Fri, 2 Nov 2018 16:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78C6D2C3EA; Fri, 2 Nov 2018 16:01:29 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SUBJ_OBFU_PUNCT_MANY autolearn=unavailable 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 40C152C3EF for ; Fri, 2 Nov 2018 16:01:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E98C6E57E; Fri, 2 Nov 2018 16:01:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F4F089D64; Fri, 2 Nov 2018 11:44:53 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id n19-v6so1581956edq.11; Fri, 02 Nov 2018 04:44:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ny38AvYcdj0FmuiLPb95Xc9hKu8H9xs8uAmEcN5tH0s=; b=q4nm50cixiozxZQZdS/AX5dROagq/92ZnLTOnsAKpXkLmnWunRUYq5XSUvEmypndDh PCjUD5BmvO5dY1ihtb1nGXCdkoXhFSwUDFjHBYuUJYo0D9O2My0CY/qPEArY62Fa8JNo vqnzo6BLCulYpIWImNcoI+zo+xGApzHEZ9U5hjZMPgy29jj385kjNSy1SaDNF2Lx776m +DABQoKktW7IAtbOm8hWe+TKyqxt+vBJffz79GngPfYkvV6JlWrYhOrRL3MGVA9cmLo9 cgzLd7CIy5bk2ctttrtaTKGY4VAQgDZ07omMTcwcJ3H4pjcE8iUFsJVyP8YiPvymKCnw rWgw== X-Gm-Message-State: AGRZ1gLDBYQxZogBsMfvm7m6Qa8Ayze5JLRb3LWtX1KRUzV123ZPrPP2 1SjbZKN3gsfIAnLsWPi2dYg= X-Google-Smtp-Source: AJdET5f1jn+Q55ijs42s90y8z2cgi+mvFVIfmzzAcsq4Hjg0SonIGGF/WAef0BTq8caaBc6aUhzzng== X-Received: by 2002:a17:906:f108:: with SMTP id gv8-v6mr6331383ejb.173.1541159091758; Fri, 02 Nov 2018 04:44:51 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id e8-v6sm3502376eje.4.2018.11.02.04.44.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 04:44:50 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter Subject: [PATCH] drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting Date: Fri, 2 Nov 2018 12:44:47 +0100 Message-Id: <20181102114447.29501-1-hdegoede@redhat.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 02 Nov 2018 16:01:14 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The GOP sometimes initializes the DSI pclk at a (slightly) different freq then the pclk which we pick. intel_pipe_config_compare() allows for this by doing a fuzzy compare on the port_clock. But the pclk difference not only results in the port_clock and base.adjusted_mode.crtc_clock clocks being a bit different, but also in us picking different dsi_pll register values matching the different pclk. This commit makes us only do the dsi_pll register compare when the adjust parameter is false, so only from verify_crtc_state(), so that we correctly do a fast modeset at boot avoiding the screen going black for about 1 sec. Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b219d5858160..82fa85df0fba 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11759,8 +11759,10 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv, PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_bias); PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_tdc_coldst_bias); - PIPE_CONF_CHECK_X(dsi_pll.ctrl); - PIPE_CONF_CHECK_X(dsi_pll.div); + if (!adjust) { + PIPE_CONF_CHECK_X(dsi_pll.ctrl); + PIPE_CONF_CHECK_X(dsi_pll.div); + } if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) PIPE_CONF_CHECK_I(pipe_bpp);