Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp652536pxb; Tue, 5 Apr 2022 17:23:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz24NTMwGtz92llGmJRnFyRvsS4XB3zjta4q1sL6LP0NN5uMnC2qfrYwJqgVWQzixbeQh5R X-Received: by 2002:aa7:8256:0:b0:4e0:78ad:eb81 with SMTP id e22-20020aa78256000000b004e078adeb81mr6299085pfn.30.1649204636616; Tue, 05 Apr 2022 17:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649204636; cv=none; d=google.com; s=arc-20160816; b=q4Z/9tEaW1j5DPNgVPzpHwcs4mxs3SN52zONy+FxcctOcZgRiqZjMIwZ+PMTV4FxVS 0I5tLRZ0lwHc7SWCF4cnzROJIQr6tQidV2uuL3bn9oBIK6siqsD6NXk+jQJ67Y1IKGsU 8LrolSotG2okC8zbR84u4vUU6jdltO3dilnMVyogE/TsD4j3HqE7ZoK858BhuKeWCQhL iOMJF3fU+eusUyGq2mE/n3nHKRKlRLQskBBOFvvKfNqBTOi/ZahIKcvhPR5+D1UiGi3f yKkN7PBRng3RM5ipR23F8OiHN2/zBhgu5a3ZtuQdST4ykTO5/6OIpsXn1M9ZLTDDkSXc cO5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kgYur5A3KR2xG7hbgJHko7jTv3tIbgeyZ+V7licTT74=; b=tlSJBH8e4LjbP8oUaqUeetWKB1c42/qOixlPW1I7TVHZqvwqsQSiXE/R1LY3ALwvNU JH6y+HvNBXER8II3pd4oV5J9aJrdwtj6ZpM+cspaynRWuAXRjn18FhJ64FhXHgaifXYN TIPvXqMCCX/8/UyCqDUIz8h74hxAtNK/W09GfMN8EBy2x/YqpO+ZB9EtntVhO0k20+yi bITv0p1mR3wGrPePk23ROCR10DieeIifeKnIHUFKj0skT1uWWHOewle/NfM9aXxK4hGL sjxPcT1OTxdMM6+7l45Ioob3O9zkQnFDdXHkzeqnGwGsayG0bfCaYy7smtpYr7gxVRWZ hW/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sVXj6aId; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x9-20020a1709028ec900b00153b2d16519si12773537plo.289.2022.04.05.17.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 17:23:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sVXj6aId; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76DDB2325D6; Tue, 5 Apr 2022 17:10:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383669AbiDENbL (ORCPT + 99 others); Tue, 5 Apr 2022 09:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345631AbiDEJWx (ORCPT ); Tue, 5 Apr 2022 05:22:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EE3A4ECE1; Tue, 5 Apr 2022 02:11:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D63C261003; Tue, 5 Apr 2022 09:11:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAC63C385A0; Tue, 5 Apr 2022 09:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149885; bh=r0yx3Istyx8LKKzY2BhVP/B45E7YnwmAFuCpV/DMYCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sVXj6aIdhilV3waEMUTMoj/YwlGjDuy8Jlzlz4qhNz7qqIXJBjc3+X2EV2G30Ffcx ZIalv9vrur40ZuQ8thsOOip0UCR3p47D3Gw7joIkq+DypS90mDFO783eB7xs2JaUMJ GVKcDJQIi0IPxsC47ip5WhmRchLyM3u1FKF+y59g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Mika Kahola , Tvrtko Ursulin Subject: [PATCH 5.16 0874/1017] drm/i915: Reject unsupported TMDS rates on ICL+ Date: Tue, 5 Apr 2022 09:29:47 +0200 Message-Id: <20220405070420.178728428@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ville Syrjälä commit 9cddf03b2af07443bebdc73cba21acb360c079e8 upstream. ICL+ PLLs can't genenerate certain frequencies. Running the PLL algorithms through for all frequencies 25-594MHz we see a gap just above 500 MHz. Specifically 500-522.8MHZ for TC PLLs, and 500-533.2 MHz for combo PHY PLLs. Reject those frequencies hdmi_port_clock_valid() so that we properly filter out unsupported modes and/or color depths for HDMI. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5247 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220311212845.32358-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola (cherry picked from commit e5086cb3f3d3f94091be29eec38cf13f8a75a778) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -1831,6 +1831,7 @@ hdmi_port_clock_valid(struct intel_hdmi bool has_hdmi_sink) { struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi); + enum phy phy = intel_port_to_phy(dev_priv, hdmi_to_dig_port(hdmi)->base.port); if (clock < 25000) return MODE_CLOCK_LOW; @@ -1851,6 +1852,14 @@ hdmi_port_clock_valid(struct intel_hdmi if (IS_CHERRYVIEW(dev_priv) && clock > 216000 && clock < 240000) return MODE_CLOCK_RANGE; + /* ICL+ combo PHY PLL can't generate 500-533.2 MHz */ + if (intel_phy_is_combo(dev_priv, phy) && clock > 500000 && clock < 533200) + return MODE_CLOCK_RANGE; + + /* ICL+ TC PHY PLL can't generate 500-532.8 MHz */ + if (intel_phy_is_tc(dev_priv, phy) && clock > 500000 && clock < 532800) + return MODE_CLOCK_RANGE; + /* * SNPS PHYs' MPLLB table-based programming can only handle a fixed * set of link rates.