From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: grab a pages pin count for preallocate stolen
Date: Tue, 17 Dec 2013 16:00:13 -0800 [thread overview]
Message-ID: <20131218000013.GC24628@intel.com> (raw)
In-Reply-To: <1387320131-16740-1-git-send-email-daniel.vetter@ffwll.ch>
On Tue, Dec 17, 2013 at 11:42:11PM +0100, Daniel Vetter wrote:
> But only when we indeed set up a gtt mapping. We need this since the
> vma also holds a pages_pin_count, on top of the unconditional
> pages_pin_count we grab for all stolen objects (to avoid swap-out).
>
> This should avoid a pages_pin_count underrun when cleaning up
> framebuffers objects taken over from the BIOS.
>
> Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Ben Widawsky <benjamin.widawsky@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_gem_stolen.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index d284d892ed94..fed87ec17211 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -420,6 +420,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
>
> list_add_tail(&obj->global_list, &dev_priv->mm.bound_list);
> list_add_tail(&vma->mm_list, &ggtt->inactive_list);
> + i915_gem_object_pin_pages(obj);
>
> return obj;
>
> --
> 1.8.4.3
>
I'm missing why _i915_gem_object_create_stolen() isn't good enough for
pinning the pages.
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-12-18 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 22:42 [PATCH] drm/i915: grab a pages pin count for preallocate stolen Daniel Vetter
2013-12-18 0:00 ` Ben Widawsky [this message]
2013-12-18 8:03 ` Daniel Vetter
2013-12-18 12:05 ` Chris Wilson
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=20131218000013.GC24628@intel.com \
--to=benjamin.widawsky@intel.com \
--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