From patchwork Mon Apr 30 22:05:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 10372975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E955A60116 for ; Mon, 30 Apr 2018 22:05:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D030A288E0 for ; Mon, 30 Apr 2018 22:05:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2914289F2; Mon, 30 Apr 2018 22:05:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A046288E0 for ; Mon, 30 Apr 2018 22:05:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 873196E1AD; Mon, 30 Apr 2018 22:05:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A3EB6E1AD for ; Mon, 30 Apr 2018 22:05:01 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2018 15:05:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,348,1520924400"; d="scan'208";a="50400028" Received: from ldmartin-desk.jf.intel.com (HELO ldmartin-desk.amr.corp.intel.com) ([10.24.10.148]) by fmsmga004.fm.intel.com with ESMTP; 30 Apr 2018 15:05:01 -0700 Date: Mon, 30 Apr 2018 15:05:01 -0700 From: Lucas De Marchi To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Message-ID: <20180430220500.GA17046@ldmartin-desk.amr.corp.intel.com> References: <20180425215524.27613-1-lucas.demarchi@intel.com> <20180426134338.GM23723@intel.com> <20180426152211.GA5990@ldmartin-desk.amr.corp.intel.com> <20180426152726.GS23723@intel.com> <20180426154254.GB5990@ldmartin-desk.amr.corp.intel.com> <20180426155005.GT23723@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180426155005.GT23723@intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Subject: Re: [Intel-gfx] [PATCH] drm/i915: remove check for aux irq X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Apr 26, 2018 at 06:50:05PM +0300, Ville Syrjälä wrote: > On Thu, Apr 26, 2018 at 08:42:54AM -0700, Lucas De Marchi wrote: > > On Thu, Apr 26, 2018 at 06:27:26PM +0300, Ville Syrjälä wrote: > > > On Thu, Apr 26, 2018 at 08:22:12AM -0700, Lucas De Marchi wrote: > > > > On Thu, Apr 26, 2018 at 04:43:38PM +0300, Ville Syrjälä wrote: > > > > > On Wed, Apr 25, 2018 at 02:55:24PM -0700, Lucas De Marchi wrote: > > > > > > This became dead code with commit 309bd8ed464f ("drm/i915: Reinstate > > > > > > GMBUS and AUX interrupts on gen4/g4x"). > > > > > > > > > > > > Cc: Ville Syrjälä > > > > > > Signed-off-by: Lucas De Marchi > > > > > > --- > > > > > > drivers/gpu/drm/i915/i915_drv.h | 3 +-- > > > > > > drivers/gpu/drm/i915/intel_dp.c | 22 +++++++--------------- > > > > > > drivers/gpu/drm/i915/intel_drv.h | 1 - > > > > > > drivers/gpu/drm/i915/intel_psr.c | 2 +- > > > > > > 4 files changed, 9 insertions(+), 19 deletions(-) > > > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > > > > > > index 8444ca8d5aa3..09e1c2289ea1 100644 > > > > > > --- a/drivers/gpu/drm/i915/i915_drv.h > > > > > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > > > > > @@ -2545,7 +2545,7 @@ intel_info(const struct drm_i915_private *dev_priv) > > > > > > IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv)) > > > > > > > > > > > > /* > > > > > > - * dp aux and gmbus irq on gen4 seems to be able to generate legacy interrupts > > > > > > + * gmbus irq on gen4 seems to be able to generate legacy interrupts > > > > > > > > > > Why are you removing vital information from the comment? > > > > > > > > Because it wouldn't match the code anymore. We always use aux irq. > > > > > > The comment is documenting the hardware behaviour. We don't want to lose > > > that information. > > > > IMO it's confusing to have the comment saying one thing and then code > > not following it. Reading it again I see the second paragraph you added > > actually document the code and the first the HW behavior. Maybe starting > > the second paragraph with a "However" would make it clearer. Or I can just > > drop this change in the comment. > > Or you can move the relevant parts of the comment to the place where > we do the "MSI or not to MSI" decision. Humn, not sure I fully understand what you mean by relevant part. Do you mean something like this? ------- It doesn't seem clearer to me. Lucas De Marchi > > -- > Ville Syrjälä > Intel diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b7dbeba72dec..3fc6b915dac1 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1183,6 +1183,9 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv) * get lost on g4x as well, and interrupt delivery seems to stay * properly dead afterwards. So we'll just disable them for all * pre-gen5 chipsets. + * + * Since we don't enable MSI on gen <= 4 we can always use GMBUS/AUX + * interrupts. */ if (INTEL_GEN(dev_priv) >= 5) { if (pci_enable_msi(pdev) < 0) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 09e1c2289ea1..5fd47227da23 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2545,13 +2545,10 @@ intel_info(const struct drm_i915_private *dev_priv) IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv)) /* - * gmbus irq on gen4 seems to be able to generate legacy interrupts + * dp aux and gmbus irq on gen4 seems to be able to generate legacy interrupts * even when in MSI mode. This results in spurious interrupt warnings if the * legacy irq no. is shared with another device. The kernel then disables that * interrupt source and so prevents the other device from working properly. - * - * Since we don't enable MSI anymore on gen4, we can always use GMBUS/AUX - * interrupts. */ #define HAS_GMBUS_IRQ(dev_priv) (INTEL_GEN(dev_priv) >= 4)