From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros
Date: Thu, 27 Sep 2018 12:40:19 +0300 [thread overview]
Message-ID: <cover.1538040594.git.jani.nikula@intel.com> (raw)
This is an RFC to get input on how people feel about moving towards
using <linux/bits.h> and <linux/bitfield.h> macros for register field
definitions and manipulation:
* BIT()
* GENMASK()
* FIELD_GET()
* FIELD_PREP()
I'm not necessarily proposing pushing the patches in this series;
they're more of a piece-by-piece transformation of the power sequencer
macros and code to use the above macros, to give an idea what the end
result would look like.
I'm also not proposing mass conversions that are error prone and cause
unnecessary conflicts. At least not outside of i915_reg.h.
I'd like to figure out the *direction* where we'd like to go with what
we're adding in the future.
BR,
Jani.
Jani Nikula (4):
drm/i915/registers: prefer GENMASK() over hand rolled masks
drm/i915/registers: prefer BIT() for single bits
drm/i915/registers: deprecate _SHIFT in favor of FIELD_GET() and _MASK
drm/i915/registers: define field values using FIELD_PREP()
drivers/gpu/drm/i915/i915_reg.h | 82 +++++++++++++++++----------------------
drivers/gpu/drm/i915/intel_dp.c | 43 +++++++++-----------
drivers/gpu/drm/i915/intel_lvds.c | 41 +++++++++-----------
3 files changed, 73 insertions(+), 93 deletions(-)
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-09-27 9:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 9:40 Jani Nikula [this message]
2018-09-27 9:40 ` [RFC 1/4] drm/i915/registers: prefer GENMASK() over hand rolled masks Jani Nikula
2018-09-28 8:34 ` Mika Kuoppala
2018-09-27 9:40 ` [RFC 2/4] drm/i915/registers: prefer BIT() for single bits Jani Nikula
2018-09-27 9:40 ` [RFC 3/4] drm/i915/registers: deprecate _SHIFT in favor of FIELD_GET() and _MASK Jani Nikula
2018-09-27 9:40 ` [RFC 4/4] drm/i915/registers: define field values using FIELD_PREP() Jani Nikula
2018-09-27 10:35 ` Chris Wilson
2018-09-27 11:53 ` Jani Nikula
2018-09-27 12:44 ` Jani Nikula
2018-09-27 12:02 ` Joonas Lahtinen
2018-09-27 9:44 ` [RFC 0/4] drm/i915/registers: use standard bits.h and bitfield.h macros Jani Nikula
2018-09-27 11:09 ` Michal Wajdeczko
2018-09-27 11:22 ` Jani Nikula
2018-09-27 11:44 ` Jani Nikula
2018-09-27 14:20 ` ✗ Fi.CI.BAT: failure for " 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=cover.1538040594.git.jani.nikula@intel.com \
--to=jani.nikula@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;
as well as URLs for NNTP newsgroup(s).