From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/stolen: shuffle around init_memory_region
Date: Mon, 10 May 2021 10:17:37 +0100 [thread overview]
Message-ID: <41dd4d70-1bc9-c414-d0ed-e5502ef83038@linux.intel.com> (raw)
In-Reply-To: <20210507095948.384230-1-matthew.auld@intel.com>
On 07/05/2021 10:59, Matthew Auld wrote:
> We generally want to first call i915_gem_object_init_memory_region()
> before calling into get_pages(), since this sets up various bits of
> state which might be needed there. Currently for stolen this doesn't
> matter much, but it might in the future, and at the very least this
> makes things consistent with the other backends.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index 293f640faa0a..b5553fc3ac4d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -657,9 +657,11 @@ static int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
> if (WARN_ON(!i915_gem_object_trylock(obj)))
> return -EBUSY;
>
> + i915_gem_object_init_memory_region(obj, mem);
> +
> err = i915_gem_object_pin_pages(obj);
> - if (!err)
> - i915_gem_object_init_memory_region(obj, mem);
> + if (err)
> + i915_gem_object_release_memory_region(obj);
> i915_gem_object_unlock(obj);
>
> return err;
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/stolen: shuffle around init_memory_region
Date: Mon, 10 May 2021 10:17:37 +0100 [thread overview]
Message-ID: <41dd4d70-1bc9-c414-d0ed-e5502ef83038@linux.intel.com> (raw)
In-Reply-To: <20210507095948.384230-1-matthew.auld@intel.com>
On 07/05/2021 10:59, Matthew Auld wrote:
> We generally want to first call i915_gem_object_init_memory_region()
> before calling into get_pages(), since this sets up various bits of
> state which might be needed there. Currently for stolen this doesn't
> matter much, but it might in the future, and at the very least this
> makes things consistent with the other backends.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index 293f640faa0a..b5553fc3ac4d 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -657,9 +657,11 @@ static int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
> if (WARN_ON(!i915_gem_object_trylock(obj)))
> return -EBUSY;
>
> + i915_gem_object_init_memory_region(obj, mem);
> +
> err = i915_gem_object_pin_pages(obj);
> - if (!err)
> - i915_gem_object_init_memory_region(obj, mem);
> + if (err)
> + i915_gem_object_release_memory_region(obj);
> i915_gem_object_unlock(obj);
>
> return err;
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
next prev parent reply other threads:[~2021-05-10 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 9:59 [Intel-gfx] [PATCH] drm/i915/stolen: shuffle around init_memory_region Matthew Auld
2021-05-07 9:59 ` Matthew Auld
2021-05-07 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-07 18:35 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-10 9:17 ` Tvrtko Ursulin [this message]
2021-05-10 9:17 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
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=41dd4d70-1bc9-c414-d0ed-e5502ef83038@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=thomas.hellstrom@linux.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 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.