Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Weinan Li <weinan.z.li@intel.com>,
	intel-gfx@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/i915/gvt: return the correct usable aperture size under gvt environment
Date: Wed, 10 May 2017 13:42:43 +0300	[thread overview]
Message-ID: <1494412963.6362.18.camel@linux.intel.com> (raw)
In-Reply-To: <1494385161-25662-1-git-send-email-weinan.z.li@intel.com>

On ke, 2017-05-10 at 10:59 +0800, Weinan Li wrote:
> I915_GEM_GET_APERTURE ioctl is used to probe aperture size from userspace.
> In gvt environment, each vm only use the ballooned part of aperture, so we
> should return the correct available aperture size exclude the reserved part
> by balloon.
> 
> v2: add 'reserved' in struct i915_address_space to record the reserved size
> in ggtt.
> 
> v3: remain aper_size as total, adjust aper_available_size exclude reserved
> and pinned. UMD driver need to adjust the max allocation size according to
> the available aperture size but not total size. KMD return the correct
> usable aperture size any time.
> 
> v4: add onion teardown to balloon and deballoon to make sure the reserved
> stays correct. Code style refine.

There's no onion teardown seen yet, please read:

https://www.kernel.org/doc/html/v4.10/process/coding-style.html#central
ized-exiting-of-functions

Please incorporate the addition to vgt_balloon_space function to reduce
code duplication.

Once the proper teardown is implemented, intel_vgt_deballoon function
should unconditionally remove the drm_mm nodes as there's no condition
when only one of them would be allocated. And intel_vgt_balloon
definitely should not call intel_vgt_deballoon in error path as per the
coding style above.

Regards, Joonas
-- 
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

  parent reply	other threads:[~2017-05-10 10:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  2:59 [PATCH v4] drm/i915/gvt: return the correct usable aperture size under gvt environment Weinan Li
2017-05-10  3:24 ` ✓ Fi.CI.BAT: success for drm/i915/gvt: return the correct usable aperture size under gvt environment (rev2) Patchwork
2017-05-10 10:42 ` Joonas Lahtinen [this message]
2017-05-11  6:51   ` [PATCH v4] drm/i915/gvt: return the correct usable aperture size under gvt environment Li, Weinan Z
2017-05-11 12:55     ` Joonas Lahtinen
2017-05-12  3:20       ` Li, Weinan Z
2017-05-18  8:28         ` Joonas Lahtinen
  -- strict thread matches above, loose matches on Subject: below --
2017-05-10  2:47 Weinan Li
2017-05-10  3:01 ` Li, Weinan Z
2017-05-12  0:08 ` kbuild test robot

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=1494412963.6362.18.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=weinan.z.li@intel.com \
    /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