Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp707128pxb; Tue, 5 Apr 2022 19:39:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr+qteJCFj69ElR5JJEPYvTnPdb86ormhVwOYs1/Y8Kqf0f9l+4qPg1rXegpDxqZJUgPjm X-Received: by 2002:a17:906:5d11:b0:6e5:344f:22e7 with SMTP id g17-20020a1709065d1100b006e5344f22e7mr5941048ejt.178.1649212773165; Tue, 05 Apr 2022 19:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212773; cv=none; d=google.com; s=arc-20160816; b=tAGGkLGfWKeDL5S3dXG1XbQ2nEeTFF2IioTZXFk8S7Nm7ZLviCp/EUHdN24FWo5HDH 7omqsHQqCCT92FXE7rgL/bLLgYiG32fNX7OGoCkDR5kw2z8yi+OxB6tNQog8M/ff75ON m9CNjkb6WUrw5L63bjXQou8PjCrn0wmEkH3vyWYQwsEL8Z/dOpP9F10vWfEGoUcyoLJW m3DmjKZkz08rk+r66cPG9UIbWHQOS+fiQWfRDUB+h+Dk7IUWuit99AAWHJcG4vj6k4k4 FXqFd/6fdQ74WJgsd4W0kEYm5FtRIARkM5hiXSGOoJjfS9J+zCxww6OHmZikFN2URJ/q pA9Q== 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=N/kpmWmMXDAzZLnTc16AUVojjhbUMi/4gaJzOknnf7U=; b=DEXK7xVsYaFafRqQT4huJHdxAF8qzc217s+rSiJYAAfZvkmRttSKOAb/8ZnkMOff0Q PF8s+k43WW4C9KV8YWu+J2SYGy6yMQKnRl12dZEJsOwo5+WW2Q4UMqj06BlV/ZzFO8sN ppbmY32blK04mNF6CCFPs3v9ksSZ2bSqfKtmu7etf1FQMFbtNWwLx02/AMiaVAKS0mLa 8ZYVVHggSeYh3a10UAf7DVF8953uNdpHp5Fi6UZS0s4fDapOPdninLGsKfDCf7xYKm97 PA17gzjxllM4XqTwj6Aa+2EcZrWXLOKX4l1nkQiyqiSnP/KGmwksBgB/nQlxHjD+PC0y sgUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lP+5Va8H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a50d9cc000000b0041904b21a46si8914192edj.281.2022.04.05.19.39.04; Tue, 05 Apr 2022 19:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lP+5Va8H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240452AbiDEKfI (ORCPT + 99 others); Tue, 5 Apr 2022 06:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240910AbiDEIci (ORCPT ); Tue, 5 Apr 2022 04:32:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 319B18CD89; Tue, 5 Apr 2022 01:25:18 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5CF42B81BC0; Tue, 5 Apr 2022 08:25:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1770C385A1; Tue, 5 Apr 2022 08:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649147116; bh=wFHIxxBTTP4wOS9bz+1lwhshF/VP5NrSb9hmYItn70Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lP+5Va8HaNDjQBhIdk6yy+tDdh0oTaG4FOVgpbAe+xeNojE4iUWE/dF5iCYaFvUhK VR97/+yewmvhKZZCpGZMDOJWji/9YmPKtYCFPc+ha6ZHrs9djmGwrXYz9heVVoaaka 2Vvhb4UJmnX5C8NZMqfo9yGTIXCuQK/RU72J9TZE= 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.17 0969/1126] drm/i915: Reject unsupported TMDS rates on ICL+ Date: Tue, 5 Apr 2022 09:28:36 +0200 Message-Id: <20220405070435.946243241@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 @@ -1836,6 +1836,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; @@ -1856,6 +1857,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.