public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915: pass status instead of enable flags to i915_enable_pipestat
Date: Wed, 5 Feb 2014 18:53:28 +0200	[thread overview]
Message-ID: <20140205165328.GO3891@intel.com> (raw)
In-Reply-To: <20140205161239.GI17001@phenom.ffwll.local>

On Wed, Feb 05, 2014 at 05:12:39PM +0100, Daniel Vetter wrote:
> On Wed, Feb 05, 2014 at 03:35:15PM +0000, Jesse Barnes wrote:
> > I almost think we should just separate enable vs status entirely.  As
> > long as the bits are named consistently it may be easier to follow (as
> > Ville found in your next patch with the subtle remapping of status
> > bits).
> 
> Yeah, I think for cases where the hw engineers just made a mess of it it's
> better to be explicit. So what about keeping the current pipestat
> enable/disable functions as wrappers which assume a regular mapping
> betweeen status and mask bit, and then add a low-level function which
> takes both mask and status explicitly?
> 
> That way we have less churn in the code, mostly pipestat enable/disable
> still looks sane but the irregular cases will really stick out. For a name
> I'd just go with __i915_enable_pipestat for lack of better ideas. Or maybe
> i915_enable_pipestat_irregular.

That could lead to someone accidentally using the regular function when
they should be using the irregular one and then we have some weird bug
on our hands. I rather like keeping the mess in one central place.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-02-05 16:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 19:35 [PATCH 0/7] drm/i915: vlv: handle only enabled pipestat interrupts Imre Deak
2014-02-04 19:35 ` [PATCH 1/7] drm/i915: vlv: don't unmask IIR[DISPLAY_PIPE_A/B_VBLANK] interrupt Imre Deak
2014-02-05 15:22   ` Jesse Barnes
2014-02-04 19:35 ` [PATCH 2/7] drm/i915: factor out valleyview_pipestat_irq_handler Imre Deak
2014-02-05 15:24   ` Jesse Barnes
2014-02-05 16:05   ` Daniel Vetter
2014-02-06  7:14     ` Jani Nikula
2014-02-06  9:44       ` Daniel Vetter
2014-02-04 19:35 ` [PATCH 3/7] drm/i915: vlv: s/spin_lock_irqsave/spin_lock/ in irq handler Imre Deak
2014-02-05 15:28   ` Jesse Barnes
2014-02-04 19:35 ` [PATCH 4/7] drm/i915: unify FLIP_DONE macro names Imre Deak
2014-02-05 15:29   ` Jesse Barnes
2014-02-04 19:35 ` [PATCH 5/7] drm/i915: pass status instead of enable flags to i915_enable_pipestat Imre Deak
2014-02-05 15:35   ` Jesse Barnes
2014-02-05 16:12     ` Daniel Vetter
2014-02-05 16:53       ` Ville Syrjälä [this message]
2014-02-05 18:55   ` [PATCH v2 " Imre Deak
2014-02-04 19:35 ` [PATCH 6/7] drm/i915: vlv: fix mapping of pipestat enable to status bits Imre Deak
2014-02-05 14:54   ` Ville Syrjälä
2014-02-05 15:04     ` Imre Deak
2014-02-05 18:55   ` [PATCH v2 " Imre Deak
2014-02-05 19:06     ` Ville Syrjälä
2014-02-05 19:44     ` [PATCH v3 " Imre Deak
2014-02-04 19:35 ` [PATCH 7/7] drm/i915: vlv: handle only enabled pipestat interrupt events Imre Deak
2014-02-05 15:11   ` Ville Syrjälä
2014-02-05 15:22     ` Imre Deak
2014-02-05 18:55   ` [PATCH v2 " Imre Deak

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=20140205165328.GO3891@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox