Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, chris.p.wilson@linux.intel.com,
	andi.shyti@intel.com, nirmoy.das@intel.com
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection
Date: Thu, 27 Jul 2023 12:27:56 +0100	[thread overview]
Message-ID: <e613f226-a744-d476-1747-078ccb962515@linux.intel.com> (raw)
In-Reply-To: <20230726155356.1652979-1-jonathan.cavitt@intel.com>


On 26/07/2023 16:53, Jonathan Cavitt wrote:
> The object pin created for shmem_create_from_object is just a
> single use mapping with the sole purpose of reading the contents
> of the whole object in bulk. And the whole source object is also
> even a throw-away.  Ergo, the additional logic required by
> i915_coherent_map_type can be safely dropped and simplified.
> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/gt/shmem_utils.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/shmem_utils.c b/drivers/gpu/drm/i915/gt/shmem_utils.c
> index 449c9ed44382..bccc3a1200bc 100644
> --- a/drivers/gpu/drm/i915/gt/shmem_utils.c
> +++ b/drivers/gpu/drm/i915/gt/shmem_utils.c
> @@ -33,7 +33,6 @@ struct file *shmem_create_from_data(const char *name, void *data, size_t len)
>   
>   struct file *shmem_create_from_object(struct drm_i915_gem_object *obj)
>   {
> -	struct drm_i915_private *i915 = to_i915(obj->base.dev);
>   	enum i915_map_type map_type;
>   	struct file *file;
>   	void *ptr;
> @@ -44,7 +43,7 @@ struct file *shmem_create_from_object(struct drm_i915_gem_object *obj)
>   		return file;
>   	}
>   
> -	map_type = i915_coherent_map_type(i915, obj, true);
> +	map_type = i915_gem_object_is_lmem(obj) ? I915_MAP_WC : I915_MAP_WB;
>   	ptr = i915_gem_object_pin_map_unlocked(obj, map_type);
>   	if (IS_ERR(ptr))
>   		return ERR_CAST(ptr);

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

  parent reply	other threads:[~2023-07-27 11:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 15:53 [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection Jonathan Cavitt
2023-07-26 15:53 ` [Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric Jonathan Cavitt
2023-07-27 11:35   ` Tvrtko Ursulin
2023-07-28  1:34     ` Andi Shyti
2023-07-28  8:07       ` Tvrtko Ursulin
2023-07-28  8:18         ` Andi Shyti
2023-07-27 12:16   ` Andi Shyti
2023-08-01 14:32   ` Andi Shyti
2023-07-26 15:53 ` [Intel-gfx] [PATCH 3/3] drm/i915/gt: Apply workaround 22016122933 correctly Jonathan Cavitt
2023-07-27 12:20   ` Andi Shyti
2023-07-26 16:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection Patchwork
2023-07-26 16:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-07-26 16:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-26 20:30 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-27 11:27 ` Tvrtko Ursulin [this message]
2023-07-27 12:23 ` [Intel-gfx] [PATCH 1/3] " Andi Shyti
2023-08-01 12:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection (rev2) Patchwork
2023-08-01 12:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-01 12:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-01 15:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-08-01 15:32 [Intel-gfx] [PATCH 0/3] drm/i915: Fix Wa_22016122933 implementation Jonathan Cavitt
2023-08-01 15:32 ` [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection Jonathan Cavitt

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=e613f226-a744-d476-1747-078ccb962515@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=andi.shyti@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=nirmoy.das@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