From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 08/11] drm/i915: Start exploiting drm_device subclassing
Date: Fri, 27 May 2016 15:15:17 +0100 [thread overview]
Message-ID: <57485675.7090807@linux.intel.com> (raw)
In-Reply-To: <1464357644-16775-9-git-send-email-chris@chris-wilson.co.uk>
On 27/05/16 15:00, Chris Wilson wrote:
> Baby step, update to_i915() conversion from drm_device to
> drm_i915_private:
>
> text data bss dec hex filename
> 1108812 23207 416 1132435 114793 i915.ko (before)
> 1104999 23207 416 1128622 1138ae i915.ko (after)
This patch on its own? Impressive!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 3f6a3648c50a..b95a10fa002a 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2033,7 +2033,7 @@ struct drm_i915_private {
>
> static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
> {
> - return dev->dev_private;
> + return container_of(dev, struct drm_i915_private, drm);
> }
>
> static inline struct drm_i915_private *dev_to_i915(struct device *dev)
> @@ -2602,7 +2602,7 @@ struct drm_i915_cmd_table {
> #define INTEL_DEVID(p) (INTEL_INFO(p)->device_id)
>
> #define REVID_FOREVER 0xff
> -#define INTEL_REVID(p) (__I915__(p)->dev->pdev->revision)
> +#define INTEL_REVID(p) (__I915__(p)->drm.pdev->revision)
>
> #define GEN_FOREVER (0)
> /*
> @@ -3439,7 +3439,7 @@ i915_gem_context_lookup(struct drm_i915_file_private *file_priv, u32 id)
> {
> struct i915_gem_context *ctx;
>
> - lockdep_assert_held(&file_priv->dev_priv->dev->struct_mutex);
> + lockdep_assert_held(&file_priv->dev_priv->drm.struct_mutex);
>
> ctx = idr_find(&file_priv->context_idr, id);
> if (!ctx)
> @@ -3455,7 +3455,7 @@ static inline void i915_gem_context_reference(struct i915_gem_context *ctx)
>
> static inline void i915_gem_context_unreference(struct i915_gem_context *ctx)
> {
> - lockdep_assert_held(&ctx->i915->dev->struct_mutex);
> + lockdep_assert_held(&ctx->i915->drm.struct_mutex);
> kref_put(&ctx->ref, i915_gem_context_free);
> }
>
> @@ -3531,7 +3531,7 @@ void i915_gem_shrinker_cleanup(struct drm_i915_private *dev_priv);
> /* i915_gem_tiling.c */
> static inline bool i915_gem_object_needs_bit17_swizzle(struct drm_i915_gem_object *obj)
> {
> - struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
> + struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
>
> return dev_priv->mm.bit_6_swizzle_x == I915_BIT_6_SWIZZLE_9_10_17 &&
> obj->tiling_mode != I915_TILING_NONE;
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-05-27 14:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 14:00 Reordering debugfs registration vs driver loading Chris Wilson
2016-05-27 14:00 ` [PATCH 01/11] drm: Export drm_dev_init() for subclassing Chris Wilson
2016-05-27 15:29 ` Nils Wallménius
2016-05-27 15:36 ` Chris Wilson
2016-05-27 15:54 ` Emil Velikov
2016-05-27 16:08 ` [Intel-gfx] " Chris Wilson
2016-05-27 16:11 ` Emil Velikov
2016-05-27 14:00 ` [PATCH 02/11] drm: Add a callback from connector registering Chris Wilson
2016-05-30 8:49 ` Daniel Vetter
2016-05-30 8:57 ` Chris Wilson
2016-05-27 14:00 ` [PATCH 03/11] drm/i915: Perform async fbdev initialisation much later Chris Wilson
2016-05-27 14:00 ` [PATCH 04/11] drm/i915: Move connector registration to driver registration phase Chris Wilson
2016-05-27 14:00 ` [PATCH 05/11] drm/i915: Register debugfs interface last Chris Wilson
2016-05-27 14:00 ` [PATCH 06/11] drm/i915: Demidlayer driver loading Chris Wilson
2016-05-27 14:00 ` [PATCH 07/11] drm/i915: Demidlayer driver unloading Chris Wilson
2016-05-27 14:00 ` [PATCH 08/11] drm/i915: Start exploiting drm_device subclassing Chris Wilson
2016-05-27 14:15 ` Tvrtko Ursulin [this message]
2016-05-27 14:46 ` [PATCH] drm/i915: Remove drm_i915_private->dev backpointer Chris Wilson
2016-05-30 6:58 ` Joonas Lahtinen
2016-05-30 8:21 ` Chris Wilson
2016-05-27 14:00 ` [PATCH 09/11] drm/i915: Merge i915_dma.c into i915_drv.c Chris Wilson
2016-05-30 6:30 ` Joonas Lahtinen
2016-05-27 14:00 ` [PATCH 10/11] drm/i915: Split out the PCI driver interface to i915_pci.c Chris Wilson
2016-05-30 6:36 ` Joonas Lahtinen
2016-05-27 14:00 ` [PATCH 11/11] drm/i915: Move module init/exit " Chris Wilson
2016-05-30 6:44 ` Joonas Lahtinen
2016-05-30 7:55 ` Chris Wilson
2016-05-27 14:58 ` ✗ Ro.CI.BAT: failure for series starting with [01/11] drm: Export drm_dev_init() for subclassing (rev2) 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=57485675.7090807@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@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