Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2771459imj; Mon, 11 Feb 2019 08:13:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ+Pj1pgt+D3Tp3d/fx/cfJl7dzS9S5XOyPfrMoEn7h6DWTpzBtKvuz6BqWApE9bnp8uFcR X-Received: by 2002:a17:902:b48d:: with SMTP id y13mr6243831plr.273.1549901607146; Mon, 11 Feb 2019 08:13:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901607; cv=none; d=google.com; s=arc-20160816; b=o+44Xla9QQUiKQu74XysiDnhozK4F7k2FfV7g7HDk0KQfgg0KNij/YTp20e4692Iba EcIz555jtx6SaXi2zKAWl4neIy1hnnrSbJpXN2elcXiv6omaUjt2tG/MCqOsMftLYguJ I4lzD+TS0813XBjfZ2vtkk3cf13/N235pCOQ7jNeHYFgvUtFujHs1TlMRvxWlvrVxl3O cprVDC6p/Kpz4oydmIzMz0UpucyqI8bjH5g95NnWOe3jFtfX0dHtBf++qev0NpyYa3T2 rQM8SGyNvdnUXFbktpLseYaVLdU4L+0g+XfSdhaQWFpjxmPkARBMdg0DwKLQKgeNBIMV 2WJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cqDKsbNeyqYU/GcSxTMc49vaPwE/12AbWrOMVl+8/3Y=; b=IqcrHhQ09REXpWnh7tIytdOHP7RSlJ+9KbEXcVcz45OICIqifinOBtdsOb2JQ0NS9t UxiuK5EXgMdCAdvTlOzQGpyUawKXGQlVK+t9T8JJ5feWeUCujW2snsEL5n6De+k2/DG8 SnchcVLPE/apfqKf1uNtGHFB9lzxkRxFVzimnD8SEhpMUqd7ecWeBqqNBs8DDkp1K+wz 9E/WJSaapVJ2I8z21tah4F/8pOn0ar+4BBwKT1M7T4dIeRR8Gmioceuh+ztCcnZGZIgy EMvTlMUz8OtKY/KapEYayI1crbnZiKqfgU7mPy7L4Fd/aIU2qDrCohbKcGqU/0bSQfm/ T5rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FhvUiZbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 130si6810993pfy.262.2019.02.11.08.13.04; Mon, 11 Feb 2019 08:13:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FhvUiZbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729198AbfBKOY3 (ORCPT + 99 others); Mon, 11 Feb 2019 09:24:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:57660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729155AbfBKOY1 (ORCPT ); Mon, 11 Feb 2019 09:24:27 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D5AA20821; Mon, 11 Feb 2019 14:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895067; bh=8bdwF+H/m3crtHWEaSx6fgOJ9F/m5B2m9UukNZW6VXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FhvUiZburV3DB2si/1vQ5xoY0RJJCJFmbB+syhOlY0Hrn+4jdOA40zaHEDWrO4pJp PdfyWvZgwSOXRpZBzlWMOXEEs70RpR7eecKQcooY8hgo9iZNYuiv4hf6942F4C71dt AzvclTEMc4Ieg4kRMs1GMEvAjbCN0kMvJlDENGck= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yogesh Mohan Marimuthu , Harry Wentland , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 4.20 050/352] drm/amd/display: calculate stream->phy_pix_clk before clock mapping Date: Mon, 11 Feb 2019 15:14:37 +0100 Message-Id: <20190211141849.425789844@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 08e1c28dd521c7b08d1b0af0bae9fb22ccc012a4 ] [why] phy_pix_clk is one of the variable used to check if one PLL can be shared with displays having common mode set configuration. As of now phy_pix_clock varialbe is calculated in function dc_validate_stream(). dc_validate_stream() function is called after clocks are assigned for the new display. Due to this during hotplug, when PLL sharing conditions are checked for new display phy_pix_clk variable will be 0 and for displays that are already enabled phy_pix_clk will have some value. Hence PLL will not be shared and if the display hardware doesn't have any more PLL to assign, mode set will fail due to resource unavailability. [how] Instead of only calculating the phy_pix_clk variable after the PLL is assigned for new display, this patch calculates phy_pix_clk also during the before assigning the PLL for new display. Signed-off-by: Yogesh Mohan Marimuthu Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index b6fe29b9fb65..8bd8f34b979c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -2002,6 +2002,8 @@ enum dc_status resource_map_pool_resources( } */ + calculate_phy_pix_clks(stream); + /* acquire new resources */ pipe_idx = acquire_first_free_pipe(&context->res_ctx, pool, stream); -- 2.19.1