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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 244F7C3F2D1 for ; Tue, 3 Mar 2020 19:07:36 +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 03CB22073B for ; Tue, 3 Mar 2020 19:07:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03CB22073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FB006E942; Tue, 3 Mar 2020 19:07:35 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE8276E941 for ; Tue, 3 Mar 2020 19:07:33 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2020 11:07:33 -0800 X-IronPort-AV: E=Sophos;i="5.70,511,1574150400"; d="scan'208";a="233737454" Received: from ideak-desk.fi.intel.com ([10.237.72.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2020 11:07:31 -0800 Date: Tue, 3 Mar 2020 21:06:48 +0200 From: Imre Deak To: Matt Roper Message-ID: <20200303190648.GA20591@ideak-desk.fi.intel.com> References: <20200303182904.952445-1-matthew.d.roper@intel.com> <20200303183447.GN174531@mdroper-desk1.amr.corp.intel.com> <20200303185021.GB30299@ideak-desk.fi.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200303185021.GB30299@ideak-desk.fi.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [Intel-gfx] [PATCH] drm/i915/ehl: Check PHY type before reading DPLL frequency 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: , Reply-To: imre.deak@intel.com Cc: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, Mar 03, 2020 at 08:50:21PM +0200, Imre Deak wrote: > On Tue, Mar 03, 2020 at 10:34:47AM -0800, Matt Roper wrote: > > On Tue, Mar 03, 2020 at 10:29:04AM -0800, Matt Roper wrote: > > > intel_ddi_clock_get() tests the DPLL ID against DPLL_ID_ICL_TBTPLL (2) > > > to determine whether to try to descend into a TBT-specific handler. > > > However this test will also be true when DPLL4 on EHL is used since t= hat > > > shares the same DPLL ID (2). > > > = > > > Add an extra check to ensure the PHY is actually a Type-C PHY before > > > descending into the TBT handling. This should ensure EHL still takes > > > the correct code path and somewhat future-proof the code as well. > > > = > > > Cc: Jos=E9 Roberto de Souza > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1369 > > = > > Fixes: 45e4728b87ad ("drm/i915: Move DPLL frequency calculation to inte= l_dpll_mgr.c") > = > Reviewed-by: Imre Deak > = > > Cc: Imre Deak > > = > > I think. > > = > > = > > Matt > > = > > > Signed-off-by: Matt Roper > > > --- > > > drivers/gpu/drm/i915/display/intel_ddi.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > = > > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/d= rm/i915/display/intel_ddi.c > > > index 284219da7df8..aa3cc42b0eb9 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_ddi.c > > > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c > > > @@ -1376,8 +1376,9 @@ static void intel_ddi_clock_get(struct intel_en= coder *encoder, > > > struct intel_crtc_state *pipe_config) > > > { > > > struct drm_i915_private *dev_priv =3D to_i915(encoder->base.dev); > > > + enum phy phy =3D intel_port_to_phy(dev_priv, encoder->port); > > > = > > > - if (INTEL_GEN(dev_priv) >=3D 11 && > > > + if (INTEL_GEN(dev_priv) >=3D 11 && intel_phy_is_tc(dev_priv, phy) && Nit: could be just if (intel_phy_is_tc(dev_priv, phy) && ... > > > intel_get_shared_dpll_id(dev_priv, pipe_config->shared_dpll) = =3D=3D > > > DPLL_ID_ICL_TBTPLL) > > > pipe_config->port_clock =3D icl_calc_tbt_pll_link(dev_priv, > > > -- = > > > 2.24.1 > > > = > > = > > -- = > > Matt Roper > > Graphics Software Engineer > > VTT-OSGC Platform Enablement > > Intel Corporation > > (916) 356-2795 > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx