From: Dave Gordon <david.s.gordon@intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>,
Jani Nikula <jani.nikula@linux.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, 08 Dec 2014 14:17:45 +0000 [thread overview]
Message-ID: <5485B309.50103@intel.com> (raw)
In-Reply-To: <20141208135950.GB4337@strange.ger.corp.intel.com>
On 08/12/14 13:59, 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);
>
So you could
#define __MASKED_BIT_DISABLE(a) (__MASKED_FIELD(0, (a)))
#define __MASKED_BIT_ENABLE(a) (__MASKED_FIELD((a), (a)))
which I think is what Jani was referring to ...
Bikeshed++: do we care about the double evaluation of (a) in these macros?
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-08 14:19 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 [this message]
2014-12-08 14:36 ` Damien Lespiau
2014-12-08 14:21 ` Daniel Vetter
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=5485B309.50103@intel.com \
--to=david.s.gordon@intel.com \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.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.