Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1012870pxb; Wed, 6 Apr 2022 06:43:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgEEmq+5C9UTnsux5n54i1Aac15fXr2GcO6LJEdkOxe15dvQLxiSTJjFoVp3NJMhwtys9a X-Received: by 2002:a63:6e43:0:b0:386:4801:13a6 with SMTP id j64-20020a636e43000000b00386480113a6mr7211501pgc.403.1649252593391; Wed, 06 Apr 2022 06:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649252593; cv=none; d=google.com; s=arc-20160816; b=dXn5UBUzYWptDzg55BpTTr7w4zY5jn9lS8uP875q0xnNfSBSsCamF8CWiJ/7XhqsUA zQZHQandNk0V6wt88vL9AKJWFpMLwejZJaQO2A1bSwkrNQO3g10WTL3nAHoPqE/QmmTe HmvYo3dgW99x9JLC0dMr2SkUKfgPi3eiclAd0XF3QVpJImpERxZzH+gKchh1TD5sgLD1 egslaveLk61MSG8v1g4qeJd8dAVOZ2FVSzKMrmTNJGZMbR0CGXSC5855wSJ+P8qsPphQ aSX/8NQa+jOwuwh9OxTHSi7G3oSx8joS08tOKJQRRfn+JQs6H7buw51XPx5GH3klR21p HgIw== 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=i9gf2nPM7BvHzhvpxRbwBUrov21X6D8fJRgyDJpgP35LDoqDlxpsLY9dEW3KZav0MQ pAugDL3FbrLBLg1DvEeOAZMJ4CXuZYu3wDfAAq0HK6ej/+E43CA0fS47rLylXvOsPYlD AnAj3EDrGLRq3bFg3cZVyntdyt5ZDAOXt1wBpTojgDYfTye9Gf5d0TwjEX1ZgtCD+7pX EMdvLwctwdEmr54jxfdZdAL4I0dhTEGanYeEETlyYfMJNCQeZxcAEVlfSfx7BhA3dpxK +yV6k+Gtqb5fGwKXg0puiWZktexgfnNR4y8ngkiYbXtkkC2bVR/EF6olbaZG9OrFUFLe 0sJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b3tPPUFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y6-20020a656c06000000b0039926d3463fsi8742496pgu.764.2022.04.06.06.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b3tPPUFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 ACA7E6094A0; Wed, 6 Apr 2022 04:32:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346026AbiDEVJN (ORCPT + 99 others); Tue, 5 Apr 2022 17:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353977AbiDEKKO (ORCPT ); Tue, 5 Apr 2022 06:10:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06DDC5599; Tue, 5 Apr 2022 02:56:07 -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 7648061676; Tue, 5 Apr 2022 09:56:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A096C385A2; Tue, 5 Apr 2022 09:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152566; bh=r0yx3Istyx8LKKzY2BhVP/B45E7YnwmAFuCpV/DMYCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b3tPPUFKoYGEDA8XRewFVrzBwRqS1oVyeXwMaQImRQg5936eLSjmN1wZ2VFb5SWmI 6pKAup9JPdJ/K+LFmvojwssO9LsS7EL58HgqylxkyjJg5OsqpQDVa7IkKAsNnAiAh8 sCeHpQ94WNnJTWByF3PvJMdJ6q734vLoXVsLE1F0= 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.15 786/913] drm/i915: Reject unsupported TMDS rates on ICL+ Date: Tue, 5 Apr 2022 09:30:48 +0200 Message-Id: <20220405070403.394798356@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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.