From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Also check view->type for a normal GGTT view
Date: Tue, 20 Feb 2018 13:53:37 +0200 [thread overview]
Message-ID: <20180220115337.GB5453@intel.com> (raw)
In-Reply-To: <20180220105011.11651-1-chris@chris-wilson.co.uk>
On Tue, Feb 20, 2018 at 10:50:10AM +0000, Chris Wilson wrote:
> We cannot simply use !view as shorthand for all normal GGTT views as a
> few callers will always populate a i915_ggtt_view struct and set the
> type to NORMAL instead. So check for (!view || view->type == NORMAL)
> inside i915_gem_object_ggtt_pin().
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 631a2db2bb6e..1854a69bc354 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4282,7 +4282,8 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
>
> lockdep_assert_held(&obj->base.dev->struct_mutex);
>
> - if (!view && flags & PIN_MAPPABLE) {
> + if ((!view || view->type == I915_GGTT_VIEW_NORMAL) &&
> + flags & PIN_MAPPABLE) {
So looks like this is just an optimization to quickly reject clearly
impossible things. So I assume the only proble was the optimization
not working in all cases.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> /* If the required space is larger than the available
> * aperture, we will not able to find a slot for the
> * object and unbinding the object now will be in
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-20 11:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 10:50 [PATCH 1/2] drm/i915: Also check view->type for a normal GGTT view Chris Wilson
2018-02-20 10:50 ` [PATCH 2/2] drm/i915: Move the policy for placement of the GGTT vma into the caller Chris Wilson
2018-02-20 11:39 ` Ville Syrjälä
2018-02-20 11:45 ` Chris Wilson
2018-02-20 11:47 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Also check view->type for a normal GGTT view Patchwork
2018-02-20 11:53 ` Ville Syrjälä [this message]
2018-02-20 12:03 ` ✗ Fi.CI.BAT: " Patchwork
2018-02-20 12:08 ` 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=20180220115337.GB5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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