Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 4/4] drm/i915/stolen: actually mark as contiguous
Date: Wed, 21 Apr 2021 15:28:15 +0100	[thread overview]
Message-ID: <d4993c34-18c7-83f7-f0b5-a34d94af5ea3@linux.intel.com> (raw)
In-Reply-To: <20210421104658.304142-4-matthew.auld@intel.com>


On 21/04/2021 11:46, Matthew Auld wrote:
> Stolen memory is always allocated as physically contiguous pages, so
> mark the object flags as such. It looks like the flags were previously
> just ignored so this had no effect. In the future we might to add the
> proper plumbing for passing the flags all over the way down from the
> caller, but for now we don't have a use for that.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index b43929da8de8..c5b64b2400e8 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -637,10 +637,17 @@ static int __i915_gem_object_create_stolen(struct intel_memory_region *mem,
>   {
>   	static struct lock_class_key lock_class;
>   	unsigned int cache_level;
> +	unsigned int flags;
>   	int err;
>   
> +	/*
> +	 * Stolen objects are always physically contiguous since we just
> +	 * allocate one big block underneath using the drm_mm range allocator.
> +	 */
> +	flags = I915_BO_ALLOC_CONTIGUOUS;
> +
>   	drm_gem_private_object_init(&mem->i915->drm, &obj->base, stolen->size);
> -	i915_gem_object_init(obj, &i915_gem_object_stolen_ops, &lock_class, 0);
> +	i915_gem_object_init(obj, &i915_gem_object_stolen_ops, &lock_class, flags);
>   
>   	obj->stolen = stolen;
>   	obj->read_domains = I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT;
> @@ -699,8 +706,7 @@ struct drm_i915_gem_object *
>   i915_gem_object_create_stolen(struct drm_i915_private *i915,
>   			      resource_size_t size)
>   {
> -	return i915_gem_object_create_region(i915->mm.stolen_region,
> -					     size, I915_BO_ALLOC_CONTIGUOUS);
> +	return i915_gem_object_create_region(i915->mm.stolen_region, size, 0);
>   }
>   
>   static int init_stolen_smem(struct intel_memory_region *mem)
> 

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

  reply	other threads:[~2021-04-21 14:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 10:46 [Intel-gfx] [PATCH v2 1/4] drm/i915: Create stolen memory region from local memory Matthew Auld
2021-04-21 10:46 ` [Intel-gfx] [PATCH v2 2/4] drm/i915/stolen: treat stolen local as normal " Matthew Auld
2021-04-21 10:46 ` [Intel-gfx] [PATCH v2 3/4] drm/i915/stolen: enforce the min_page_size contract Matthew Auld
2021-04-21 10:46 ` [Intel-gfx] [PATCH v2 4/4] drm/i915/stolen: actually mark as contiguous Matthew Auld
2021-04-21 14:28   ` Tvrtko Ursulin [this message]
2021-04-21 14:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/4] drm/i915: Create stolen memory region from local memory Patchwork
2021-04-21 14:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-04-21 14:33 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-04-21 14:35 ` [Intel-gfx] [PATCH v2 1/4] " Tvrtko Ursulin
2021-04-21 14:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/4] " Patchwork
2021-04-21 20:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=d4993c34-18c7-83f7-f0b5-a34d94af5ea3@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 \
    /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