From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1024C4338F for ; Mon, 26 Jul 2021 10:41:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8FBC60F46 for ; Mon, 26 Jul 2021 10:41:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A8FBC60F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 575596E3A0; Mon, 26 Jul 2021 10:41:31 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C4BF6E3A0; Mon, 26 Jul 2021 10:41:30 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10056"; a="212198887" X-IronPort-AV: E=Sophos;i="5.84,270,1620716400"; d="scan'208";a="212198887" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 03:41:28 -0700 X-IronPort-AV: E=Sophos;i="5.84,270,1620716400"; d="scan'208";a="455733974" Received: from dechasso-mobl3.amr.corp.intel.com (HELO intel.com) ([10.212.115.115]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 03:41:26 -0700 Date: Mon, 26 Jul 2021 06:41:24 -0400 From: Rodrigo Vivi To: Lucas De Marchi Message-ID: References: <20210724001114.249295-1-lucas.demarchi@intel.com> <20210724001114.249295-12-lucas.demarchi@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210724001114.249295-12-lucas.demarchi@intel.com> Subject: Re: [Intel-gfx] [PATCH 11/30] drm/i915/display: remove explicit CNL handling from intel_dp.c X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Jul 23, 2021 at 05:10:55PM -0700, Lucas De Marchi wrote: > The only real platform with DISPLAY_VER == 10 is GLK. We don't need to > handle CNL explicitly in intel_dp.c. > > Remove code and rename functions/macros accordingly to use ICL prefix. > > Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi > --- > drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++--------------------- > 1 file changed, 5 insertions(+), 30 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index c386ef8eb200..db701ec5a221 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -222,29 +222,6 @@ bool intel_dp_can_bigjoiner(struct intel_dp *intel_dp) > encoder->port != PORT_A); > } > > -static int cnl_max_source_rate(struct intel_dp *intel_dp) > -{ > - struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > - struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev); > - enum port port = dig_port->base.port; > - > - u32 voltage = intel_de_read(dev_priv, CNL_PORT_COMP_DW3) & VOLTAGE_INFO_MASK; > - > - /* Low voltage SKUs are limited to max of 5.4G */ > - if (voltage == VOLTAGE_INFO_0_85V) > - return 540000; > - > - /* For this SKU 8.1G is supported in all ports */ > - if (IS_CNL_WITH_PORT_F(dev_priv)) > - return 810000; > - > - /* For other SKUs, max rate on ports A and D is 5.4G */ > - if (port == PORT_A || port == PORT_D) > - return 540000; > - > - return 810000; > -} > - > static int icl_max_source_rate(struct intel_dp *intel_dp) > { > struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > @@ -270,7 +247,7 @@ static void > intel_dp_set_source_rates(struct intel_dp *intel_dp) > { > /* The values must be in increasing order */ > - static const int cnl_rates[] = { > + static const int icl_rates[] = { > 162000, 216000, 270000, 324000, 432000, 540000, 648000, 810000 > }; > static const int bxt_rates[] = { > @@ -295,12 +272,10 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp) > drm_WARN_ON(&dev_priv->drm, > intel_dp->source_rates || intel_dp->num_source_rates); > > - if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) { > - source_rates = cnl_rates; > - size = ARRAY_SIZE(cnl_rates); > - if (DISPLAY_VER(dev_priv) == 10) > - max_rate = cnl_max_source_rate(intel_dp); > - else if (IS_JSL_EHL(dev_priv)) > + if (DISPLAY_VER(dev_priv) >= 11) { > + source_rates = icl_rates; > + size = ARRAY_SIZE(icl_rates); > + if (IS_JSL_EHL(dev_priv)) > max_rate = ehl_max_source_rate(intel_dp); > else > max_rate = icl_max_source_rate(intel_dp); > -- > 2.31.1 > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx