All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/i915: Assert that our hpd pin bitmasks don't overflow
Date: Thu, 5 Jul 2018 20:51:16 +0300	[thread overview]
Message-ID: <20180705175116.GE5565@intel.com> (raw)
In-Reply-To: <153080953679.2087.7876137601608676647@cwilso3-mobl.ger.corp.intel.com>

On Thu, Jul 05, 2018 at 05:52:16PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-07-05 17:43:56)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Make sure our hpd pin count doesn't exceed the bitmasks we use
> > for tracking pending hotplugs. Not ever close to the limit yet,
> > but no harm in making sure either.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_irq.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index bb7c754979f8..c107e0837026 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1713,6 +1713,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv,
> >  {
> >         enum hpd_pin pin;
> >  
> > +       BUILD_BUG_ON(HPD_NUM_PINS > 32);
> 
> sizeof(*pin_mask) * CHAR_BIT ?

For a slightly more pleasing appearance I suppose we might want
to steal BITS_PER_TYPE() from include/linux/net_dim.h. A quick 
grep didn't seem to reveal anything similar in a more general
location.

> 
> Just looking for some explanation as where the limit comes from. Now
> obviously u32, but why was u32 chosen?

Had the right kind of smell perhaps?

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-07-05 17:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 16:43 [PATCH 0/8] drm/i915: Hotplug cleanups and whanot Ville Syrjala
2018-07-05 16:43 ` [PATCH 1/8] drm/i915: Introduce for_each_intel_dp() Ville Syrjala
2018-07-05 21:17   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 2/8] drm/i915: Introduce intel_encoder_is_dig_port() Ville Syrjala
2018-07-06 17:01   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 3/8] drm/i915: Rewrite mst suspend/resume in terms of encoders Ville Syrjala
2018-07-05 21:29   ` Rodrigo Vivi
2018-07-06 10:42     ` Ville Syrjälä
2018-07-06 17:00       ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 4/8] drm/i915: Nuke dev_priv->irq_port[] Ville Syrjala
2018-07-09 21:27   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 5/8] drm/i915: s/int i/enum hpd_pin pin/ Ville Syrjala
2018-07-09 21:28   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 6/8] drm/i915: Pass hpd_pin to long_pulse_detect() Ville Syrjala
2018-07-05 21:14   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 7/8] drm/i915: Assert that our hpd pin bitmasks don't overflow Ville Syrjala
2018-07-05 16:52   ` Chris Wilson
2018-07-05 17:51     ` Ville Syrjälä [this message]
2018-07-05 17:57       ` Chris Wilson
2018-07-05 16:43 ` [PATCH 8/8] drm/i915: Print the long_mask alongside the pin_mask Ville Syrjala
2018-07-05 18:00   ` Chris Wilson
2018-07-05 20:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Hotplug cleanups and whanot Patchwork
2018-07-05 20:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-05 21:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-06 11:05 ` ✓ 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=20180705175116.GE5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.