All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 5/5] drm/i915/psr: Timestamps for PSR entry and exit interrupts.
Date: Thu, 22 Mar 2018 21:08:58 +0000	[thread overview]
Message-ID: <152175293836.23562.17827295777696638848@mail.alporthouse.com> (raw)
In-Reply-To: <20180320224151.6009-6-dhinakaran.pandiyan@intel.com>

Quoting Dhinakaran Pandiyan (2018-03-20 22:41:51)
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 64ecea80438d..a83d95b1b587 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -125,28 +125,44 @@ void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir)
>  {
>         u32 transcoders = BIT(TRANSCODER_EDP);
>         enum transcoder cpu_transcoder;
> +       ktime_t time_ns =  ktime_get();
> +       unsigned long flags = 0;
>  
>         if (INTEL_GEN(dev_priv) >= 8)
>                 transcoders |= BIT(TRANSCODER_A) |
>                                BIT(TRANSCODER_B) |
>                                BIT(TRANSCODER_C);
>  
> +       write_seqlock_irqsave(&dev_priv->psr.debug_lock, flags);

You are inside a hardirq handler. irqsave/irqrestore are not required.

Even a seqlock here looks overkill, but whatever. (I don't buy that you
need that precise level of coordination for a slow debugfs interface.)

>         for_each_cpu_transcoder_masked(dev_priv, cpu_transcoder, transcoders) {
> +               bool handled = false;
> +
> +               /* PSR supported only on one transcoder currently */
> +               WARN_ON_ONCE(handled);

Now this is just silly. At least get the check right.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-03-22 21:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 22:41 [PATCH 0/5] PSR interrupts Dhinakaran Pandiyan
2018-03-20 22:41 ` [PATCH 1/5] drm/i915: Enable edp psr error interrupts on hsw Dhinakaran Pandiyan
2018-03-21 18:59   ` Ville Syrjälä
2018-03-21 19:19     ` Pandiyan, Dhinakaran
2018-03-21 19:29       ` Ville Syrjälä
2018-03-22  1:19         ` Pandiyan, Dhinakaran
2018-03-22 11:33           ` Ville Syrjälä
2018-03-22 20:39             ` Rodrigo Vivi
2018-03-23  0:01             ` Pandiyan, Dhinakaran
2018-03-20 22:41 ` [PATCH 2/5] drm/i915: Drop reg_write from the PSR mask Dhinakaran Pandiyan
2018-03-20 22:41 ` [PATCH 3/5] drm/i915: Enable edp psr error interrupts on bdw+ Dhinakaran Pandiyan
2018-03-20 22:41 ` [PATCH 4/5] drm/i915/psr: Control PSR interrupts via debugfs Dhinakaran Pandiyan
2018-03-21 19:45   ` Ville Syrjälä
2018-03-22  0:59     ` Pandiyan, Dhinakaran
2018-03-20 22:41 ` [PATCH 5/5] drm/i915/psr: Timestamps for PSR entry and exit interrupts Dhinakaran Pandiyan
2018-03-21 19:48   ` Ville Syrjälä
2018-03-22  1:05     ` Pandiyan, Dhinakaran
2018-03-22  9:21       ` Ville Syrjälä
2018-03-22 20:59         ` Pandiyan, Dhinakaran
2018-03-22 21:08   ` Chris Wilson [this message]
2018-03-22 23:55     ` Pandiyan, Dhinakaran
2018-03-21  8:02 ` ✗ Fi.CI.CHECKPATCH: warning for PSR interrupts Patchwork
2018-03-21  8:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-03-21  8:16 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-21  9:13 ` ✓ 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=152175293836.23562.17827295777696638848@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.