From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Damien Lespiau <damien.lespiau@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/8] drm/i915: Always use INTEL_INFO() to access the device_info structure
Date: Thu, 12 Dec 2013 20:47:48 +0200 [thread overview]
Message-ID: <20131212184748.GI10036@intel.com> (raw)
In-Reply-To: <20131212172308.GI6195@nuc-i3427.alporthouse.com>
On Thu, Dec 12, 2013 at 05:23:08PM +0000, Chris Wilson wrote:
> On Thu, Dec 12, 2013 at 05:05:18PM +0000, Damien Lespiau wrote:
> > On Thu, Dec 12, 2013 at 04:58:21PM +0000, Chris Wilson wrote:
> > > On Thu, Dec 12, 2013 at 02:36:37PM +0000, Damien Lespiau wrote:
> > > > If we make sure that all the dev_priv->info usages are wrapped by
> > > > INTEL_INFO(), we can easily modify the ->info field to be structure and
> > > > not a pointer while keeping the const protection in the INTEL_INFO()
> > > > macro.
> > >
> > > Yuck.
> >
> > Would Jani's suggestion to transmogrify INTEL_INFO() into a function
> > make you happier? Or is it the back and forth from *dev_priv to *dev
> > to dev_priv->info that is of utmost disgust?
>
> Ultimately, I'd like to see the pointer dance die. But in the meantime,
> I'd like to see the macro die, dev_priv->info is far less scary than
> INTEL_INFO(dev_priv->dev)->info, even to_i915(dev)->info is more
> pleasant to read.
I guess another option would be to make keep the dev_priv.info as a
const struct, and just explicitly cast the const away when modifying
the struct.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-12-12 18:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 14:36 Supporting fused display configurations v3 Damien Lespiau
2013-12-12 14:36 ` [PATCH 1/8] drm/i915: Use IS_VALLEYVIEW() to test the is_valleyview flag Damien Lespiau
2013-12-17 9:38 ` Daniel Vetter
2013-12-17 11:17 ` Damien Lespiau
2013-12-17 12:18 ` Daniel Vetter
2013-12-12 14:36 ` [PATCH 2/8] drm/i915: Always use INTEL_INFO() to access the device_info structure Damien Lespiau
2013-12-12 16:58 ` Chris Wilson
2013-12-12 17:05 ` Damien Lespiau
2013-12-12 17:23 ` Chris Wilson
2013-12-12 18:47 ` Ville Syrjälä [this message]
2013-12-12 14:36 ` [PATCH 3/8] drm/i915: Make the intel_device_info structure kept in dev_priv writable Damien Lespiau
2013-12-12 15:30 ` Jani Nikula
2013-12-12 15:38 ` Damien Lespiau
2013-12-12 16:58 ` Ville Syrjälä
2013-12-12 14:36 ` [PATCH 4/8] drm/i915: Move num_plane to the intel_device_info structure Damien Lespiau
2013-12-12 14:36 ` [PATCH 5/8] drm/i915: Consolidate FUSE_STRAP in one set of defines Damien Lespiau
2013-12-12 14:36 ` [PATCH 6/8] drm/i915: Disable display when fused off Damien Lespiau
2013-12-12 14:36 ` [PATCH 7/8] drm/i915: Remove the Quanta special case Damien Lespiau
2013-12-12 14:36 ` [PATCH 8/8] drm/i915: Use I915_MAX_PIPES in the pipe/plane_to_crtc_mapping definitions Damien Lespiau
2013-12-13 8:51 ` Supporting fused display configurations v3 Mika Kuoppala
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=20131212184748.GI10036@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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 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.