public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/bdw: Fix the write setting up the WIZ	hashing mode
Date: Mon, 8 Dec 2014 15:21:02 +0100	[thread overview]
Message-ID: <20141208142102.GT20350@phenom.ffwll.local> (raw)
In-Reply-To: <20141208135950.GB4337@strange.ger.corp.intel.com>

On Mon, Dec 08, 2014 at 01:59:50PM +0000, Damien Lespiau wrote:
> On Mon, Dec 08, 2014 at 02:33:57PM +0200, Jani Nikula wrote:
> > >  #define _MASKED_BIT_ENABLE(a) (((a) << 16) | (a))
> > >  #define _MASKED_BIT_DISABLE(a) ((a) << 16)
> > > +#define _MASKED_FIELD(value, mask) (((mask) << 16) | (value))
> > 
> > Obligatory bikeshed, wouldn't you say _MASKED_BIT_{ENABLE,DISABLE} are
> > special cases of _MASKED_FIELD...? ;)
> 
> That's because we're not just enabling or disabling bits here but
> setting a multi-bits value.
> 
>   _MASKED_FIELD(2 << 4, 0x3 << 4);

#define _MASKED_BIT_ENABLE(a) _MASKED_FIELD(a, a)
#define _MASKED_BIT_DISABLE(a) _MASKED_FIELD(a, 0)

is what I guess Jani thought of.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-12-08 14:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-06 20:14 [PATCH] drm/i915/bdw: Fix the write setting up the WIZ hashing mode Damien Lespiau
2014-12-07  4:48 ` shuang.he
2014-12-08 12:33 ` Jani Nikula
2014-12-08 13:59   ` Damien Lespiau
2014-12-08 14:17     ` Dave Gordon
2014-12-08 14:36       ` Damien Lespiau
2014-12-08 14:21     ` Daniel Vetter [this message]
2014-12-08 14:23       ` Daniel Vetter
2014-12-08 14:46         ` Damien Lespiau
2014-12-08 16:22   ` [PATCH v2] " Damien Lespiau
2014-12-08 16:27     ` Daniel Vetter
2014-12-08 16:50       ` Dave Gordon
2014-12-08 16:54         ` Damien Lespiau
2014-12-08 16:56     ` Dave Gordon
2014-12-08 17:33       ` [PATCH v3] " Damien Lespiau
2014-12-09 22:14         ` shuang.he
2014-12-10  9:42         ` Jani Nikula
2014-12-10 12:03           ` Damien Lespiau
2014-12-10 13:55             ` Daniel Vetter
2014-12-09 19:14     ` [PATCH v2] " shuang.he

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=20141208142102.GT20350@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=damien.lespiau@intel.com \
    --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