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=-15.3 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,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 B0B85C64E8A for ; Mon, 30 Nov 2020 14:20:11 +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 4988F2084C for ; Mon, 30 Nov 2020 14:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4988F2084C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.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 8181B6E4CB; Mon, 30 Nov 2020 14:20:10 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AB6B6E4CB for ; Mon, 30 Nov 2020 14:20:09 +0000 (UTC) IronPort-SDR: iUgDS8Tr3vW95fWnbpoPvwplGV5TwWW0wD8UKSvOXXvG4ardzXP37BIKRmTWe60CalqdnQ+sII nSav1IqTetgA== X-IronPort-AV: E=McAfee;i="6000,8403,9820"; a="159694438" X-IronPort-AV: E=Sophos;i="5.78,381,1599548400"; d="scan'208";a="159694438" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 06:19:57 -0800 IronPort-SDR: 8gmqPiY+gibcQu6eohkqUuH5s+y/IyhxO4aoHeDR4Yfw3RYUcy23ZZZT2m2DTVhM7hov7sZ8Sl WrQXg5v4Gh/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,381,1599548400"; d="scan'208";a="434310714" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 30 Nov 2020 06:19:55 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 30 Nov 2020 16:19:54 +0200 Date: Mon, 30 Nov 2020 16:19:54 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Lucas De Marchi Message-ID: <20201130141954.GS6112@intel.com> References: <20201127145748.29491-1-chris@chris-wilson.co.uk> <20201128045229.kvxiqjin7k67zkod@ldmartin-desk1> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201128045229.kvxiqjin7k67zkod@ldmartin-desk1> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH] Revert "drm/i915: re-order if/else ladder for hpd_irq_setup" 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: intel-gfx@lists.freedesktop.org, Chris Wilson 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 Fri, Nov 27, 2020 at 08:52:29PM -0800, Lucas De Marchi wrote: > On Fri, Nov 27, 2020 at 02:57:48PM +0000, Chris Wilson wrote: > >We now use ilk_hpd_irq_setup for all GMCH platforms that do not have > >hotplug. These are early gen3 and gen2 devices that now explode on boot > >as they try to access non-existent registers. > = > humn... true, my bad. But I don't think a revert is the right fix. It > would be much better if we would not be setting up the hpd setup > function at all for platforms that do not have hotplug. I think a > separate early check for I915_HAS_HOTPLUG() would be deserved. I think it generally leads to much less convoluted logic when we keep gmch vs. rest separate. So I'm confused as to what we're even trying to achieve here? > = > Lucas De Marchi > = > > > >Fixes: 794d61a19090 ("drm/i915: re-order if/else ladder for hpd_irq_setu= p") > >Signed-off-by: Chris Wilson > >Cc: Lucas De Marchi > >Cc: Jos=E9 Roberto de Souza > >Cc: Jani Nikula > = > = > >--- > > drivers/gpu/drm/i915/i915_irq.c | 27 +++++++++++++++------------ > > 1 file changed, 15 insertions(+), 12 deletions(-) > > > >diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915= _irq.c > >index dc6febc63f1c..c80eeac53952 100644 > >--- a/drivers/gpu/drm/i915/i915_irq.c > >+++ b/drivers/gpu/drm/i915/i915_irq.c > >@@ -4242,18 +4242,21 @@ void intel_irq_init(struct drm_i915_private *dev= _priv) > > */ > > dev_priv->hotplug.hpd_short_storm_enabled =3D !HAS_DP_MST(dev_priv); > > > >- if (HAS_PCH_DG1(dev_priv)) > >- dev_priv->display.hpd_irq_setup =3D dg1_hpd_irq_setup; > >- else if (INTEL_GEN(dev_priv) >=3D 11) > >- dev_priv->display.hpd_irq_setup =3D gen11_hpd_irq_setup; > >- else if (IS_GEN9_LP(dev_priv)) > >- dev_priv->display.hpd_irq_setup =3D bxt_hpd_irq_setup; > >- else if (INTEL_PCH_TYPE(dev_priv) >=3D PCH_SPT) > >- dev_priv->display.hpd_irq_setup =3D spt_hpd_irq_setup; > >- else if (HAS_GMCH(dev_priv) && I915_HAS_HOTPLUG(dev_priv)) > >- dev_priv->display.hpd_irq_setup =3D i915_hpd_irq_setup; > >- else > >- dev_priv->display.hpd_irq_setup =3D ilk_hpd_irq_setup; > >+ if (HAS_GMCH(dev_priv)) { > >+ if (I915_HAS_HOTPLUG(dev_priv)) > >+ dev_priv->display.hpd_irq_setup =3D i915_hpd_irq_setup; > >+ } else { > >+ if (HAS_PCH_DG1(dev_priv)) > >+ dev_priv->display.hpd_irq_setup =3D dg1_hpd_irq_setup; > >+ else if (INTEL_GEN(dev_priv) >=3D 11) > >+ dev_priv->display.hpd_irq_setup =3D gen11_hpd_irq_setup; > >+ else if (IS_GEN9_LP(dev_priv)) > >+ dev_priv->display.hpd_irq_setup =3D bxt_hpd_irq_setup; > >+ else if (INTEL_PCH_TYPE(dev_priv) >=3D PCH_SPT) > >+ dev_priv->display.hpd_irq_setup =3D spt_hpd_irq_setup; > >+ else > >+ dev_priv->display.hpd_irq_setup =3D ilk_hpd_irq_setup; > >+ } > > } > > > > /** > >-- = > >2.20.1 > > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx