From: Andi Shyti <andi.shyti@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: [Intel-gfx] [CI 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection
Date: Mon, 7 Aug 2023 14:19:55 +0200 [thread overview]
Message-ID: <20230807121957.598420-2-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20230807121957.598420-1-andi.shyti@linux.intel.com>
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
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.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801153242.2445478-2-jonathan.cavitt@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 449c9ed443822..bccc3a1200bc6 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);
--
2.40.1
next prev parent reply other threads:[~2023-08-07 12:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 12:19 [Intel-gfx] [CI 0/3] Test conflict fix for "Fix Wa_22016122933 implementation" Andi Shyti
2023-08-07 12:19 ` Andi Shyti [this message]
2023-08-07 12:19 ` [Intel-gfx] [CI 2/3] drm/i915: Make i915_coherent_map_type GT-centric Andi Shyti
2023-08-07 12:19 ` [Intel-gfx] [CI 3/3] drm/i915/gt: Apply workaround 22016122933 correctly Andi Shyti
2023-08-07 13:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Test conflict fix for "Fix Wa_22016122933 implementation" Patchwork
2023-08-07 13:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-07 13:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-07 18:21 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-08 2:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Test conflict fix for "Fix Wa_22016122933 implementation" (rev2) Patchwork
2023-08-08 2:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-08 2:33 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-08 10:04 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-08 18:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Test conflict fix for "Fix Wa_22016122933 implementation" (rev3) Patchwork
2023-08-08 18:36 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-08 18:55 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-08-08 23:41 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Test conflict fix for "Fix Wa_22016122933 implementation" (rev4) Patchwork
2023-08-08 23:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-08 23:56 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-08-09 12:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Test conflict fix for "Fix Wa_22016122933 implementation" (rev5) Patchwork
2023-08-09 12:05 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-09 12:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-10 11:39 ` [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=20230807121957.598420-2-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jonathan.cavitt@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