From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: remove check for aux irq
Date: Wed, 2 May 2018 15:07:50 +0300 [thread overview]
Message-ID: <20180502120750.GF23723@intel.com> (raw)
In-Reply-To: <20180430220500.GA17046@ldmartin-desk.amr.corp.intel.com>
On Mon, Apr 30, 2018 at 03:05:01PM -0700, Lucas De Marchi wrote:
> 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ä <ville.syrjala@linux.intel.com>
> > > > > > > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > > > > > > ---
> > > > > > > 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?
>
> 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.
I mean all of that ^
> - *
> - * 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)
>
> -------
>
> It doesn't seem clearer to me.
>
> Lucas De Marchi
>
>
> >
> > --
> > Ville Syrjälä
> > Intel
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-05-02 12:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 21:55 [PATCH] drm/i915: remove check for aux irq Lucas De Marchi
2018-04-25 22:11 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-04-25 22:28 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-25 23:24 ` [PATCH] " Rodrigo Vivi
2018-04-26 2:45 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-04-26 13:43 ` [PATCH] " Ville Syrjälä
2018-04-26 15:22 ` Lucas De Marchi
2018-04-26 15:27 ` Ville Syrjälä
2018-04-26 15:42 ` Lucas De Marchi
2018-04-26 15:50 ` Ville Syrjälä
2018-04-30 22:05 ` Lucas De Marchi
2018-05-02 12:07 ` Ville Syrjälä [this message]
2018-05-23 18:04 ` [PATCH v2] " Lucas De Marchi
2018-06-15 17:58 ` Ville Syrjälä
2018-06-15 21:51 ` Lucas De Marchi
2018-06-19 14:02 ` Ville Syrjälä
2018-06-19 15:24 ` Lucas De Marchi
2018-06-19 20:17 ` Dhinakaran Pandiyan
2018-06-21 17:04 ` Lucas De Marchi
2018-06-21 19:37 ` Dhinakaran Pandiyan
2018-06-21 16:01 ` Ville Syrjälä
2018-04-30 22:17 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: remove check for aux irq (rev2) Patchwork
2018-04-30 22:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-04-30 22:35 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-01 0:54 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-23 18:13 ` ✗ Fi.CI.SPARSE: warning for drm/i915: remove check for aux irq (rev3) Patchwork
2018-05-23 18:28 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-23 22:38 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180502120750.GF23723@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox