From: Ben Widawsky <ben@bwidawsk.net>
To: armin.c.reese@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Optimize the i915_gem_gtt_finish_object function
Date: Thu, 17 Jul 2014 16:16:29 -0700 [thread overview]
Message-ID: <20140717231629.GA4545@bwidawsk.net> (raw)
In-Reply-To: <1405099208-4085-2-git-send-email-armin.c.reese@intel.com>
On Fri, Jul 11, 2014 at 10:20:08AM -0700, armin.c.reese@intel.com wrote:
> From: Armin Reese <armin.c.reese@intel.com>
>
> Signed-off-by: Armin Reese <armin.c.reese@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index afd4eef..7e2190e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1624,18 +1624,17 @@ static void ggtt_unbind_vma(struct i915_vma *vma)
>
> void i915_gem_gtt_finish_object(struct drm_i915_gem_object *obj)
> {
> - struct drm_device *dev = obj->base.dev;
> - struct drm_i915_private *dev_priv = dev->dev_private;
> - bool interruptible;
> -
> - interruptible = do_idling(dev_priv);
> + if (!obj->has_dma_mapping) {
> + struct drm_device *dev = obj->base.dev;
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + bool interruptible = do_idling(dev_priv);
>
> - if (!obj->has_dma_mapping)
> dma_unmap_sg(&dev->pdev->dev,
> obj->pages->sgl, obj->pages->nents,
> PCI_DMA_BIDIRECTIONAL);
>
> - undo_idling(dev_priv, interruptible);
> + undo_idling(dev_priv, interruptible);
> + }
> }
>
> static void i915_gtt_color_adjust(struct drm_mm_node *node,
Note that this doesn't do much on platforms you care about.
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-07-17 23:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 17:20 [PATCH] drm/i915: Do not unmap object unless no other VMAs reference it armin.c.reese
2014-07-11 17:20 ` [PATCH] drm/i915: Optimize the i915_gem_gtt_finish_object function armin.c.reese
2014-07-17 23:16 ` Ben Widawsky [this message]
2014-07-18 12:05 ` Daniel Vetter
2014-07-17 23:45 ` [PATCH] drm/i915: Do not unmap object unless no other VMAs reference it Ben Widawsky
2014-07-17 23:48 ` Ben Widawsky
2014-07-18 13:21 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2014-07-11 17:15 armin.c.reese
2014-07-11 17:15 ` [PATCH] drm/i915: Optimize the i915_gem_gtt_finish_object function armin.c.reese
2014-07-11 17:19 ` Chris Wilson
2014-07-11 17:29 ` Reese, Armin C
2014-07-11 17:32 ` Chris Wilson
2014-07-11 17:36 ` Chris Wilson
2014-07-11 17:46 ` Reese, Armin C
2014-07-11 17:49 ` Chris Wilson
2014-07-11 18:05 ` Reese, Armin C
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=20140717231629.GA4545@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=armin.c.reese@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