All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel graphics driver community testing & development
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 1/3] drm/i915: Use i915_vm_to_ppgtt instead of manual container_of
Date: Fri, 01 Apr 2016 10:15:44 +0300	[thread overview]
Message-ID: <1459494944.4199.3.camel@linux.intel.com> (raw)
In-Reply-To: <20160401071253.GA5981@nuc-i3427.alporthouse.com>

On pe, 2016-04-01 at 08:12 +0100, Chris Wilson wrote:
> On Fri, Apr 01, 2016 at 10:05:03AM +0300, Joonas Lahtinen wrote:
> > 
> > Looks much better without container_of everywhere.
> > 
> > v2:
> > 
> > - In i915_gem_restore_gtt_mappings too (Chris)
> > @@ -3294,9 +3282,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
> >  		list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
> >  			/* TODO: Perhaps it shouldn't be gen6 specific */
> >  
> > -			struct i915_hw_ppgtt *ppgtt =
> > -					container_of(vm, struct i915_hw_ppgtt,
> > -						     base);
> > +			struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
> >  
> >  			if (i915_is_ggtt(vm))
> >  				ppgtt = dev_priv->mm.aliasing_ppgtt;
> Sadly, WARN.
> 

Oops.

> struct i915_hw_ppgtt *ppgtt;
> 
> if (i915_is_ggtt(vm))
> 	ppgtt = dev_priv->mm.aliasing_ppgtt;
> else
> 	ppgtt = i915_vm_to_ppgtt(vm);
> -Chris
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-01  7:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 16:49 [PATCH 1/2] drm/i915: Use i915_vm_to_ppgtt instead of manual container_of Joonas Lahtinen
2016-03-31 16:49 ` [PATCH 2/2] drm/i915: Do not use INTEL_INFO(dev_priv->dev) Joonas Lahtinen
2016-03-31 17:12   ` Chris Wilson
2016-03-31 17:10 ` [PATCH 1/2] drm/i915: Use i915_vm_to_ppgtt instead of manual container_of Chris Wilson
2016-04-01  7:05 ` [PATCH v2 1/3] " Joonas Lahtinen
2016-04-01  7:05   ` [PATCH v2 2/3] drm/i915: Do not WARN_ON in i915_vm_to_ppgtt Joonas Lahtinen
2016-04-01  7:15     ` Chris Wilson
2016-04-01  7:05   ` [PATCH v2 3/3] drm/i915: Do not use {HAS_*, IS_*, INTEL_INFO}(dev_priv->dev) Joonas Lahtinen
2016-04-01  7:14     ` Chris Wilson
2016-04-01  7:12   ` [PATCH v2 1/3] drm/i915: Use i915_vm_to_ppgtt instead of manual container_of Chris Wilson
2016-04-01  7:15     ` Joonas Lahtinen [this message]
2016-04-01  8:08 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " 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=1459494944.4199.3.camel@linux.intel.com \
    --to=joonas.lahtinen@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 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.