Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/3] drm/i915: Fix Wa_22016122933 implementation
@ 2023-08-01 15:32 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
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Jonathan Cavitt @ 2023-08-01 15:32 UTC (permalink / raw)
  To: intel-gfx
  Cc: andi.shyti, chris.p.wilson, jonathan.cavitt, matthew.d.roper,
	nirmoy.das

WA_22016122933 was recently applied to all MeteorLake engines, which is
simultaneously too broad (should only apply to Media engines) and too
specific (should apply to all platforms that use the same media engine
as MeteorLake).  Correct this for all current use cases.

There are two additional changes that deserve special attention:


First, the usage of the workaround in i915_coherent_map_type required
a more invasive change to check the gt, which was split into its own
patch.

Second, the addition of write barriers during ct_read and
gsc_fw_load_prepare were found to be unconditional, so the workaround
tags were removed as the usages were not platform dependent.

v2:
- Refactor i915_coherent_map_type to intel_gt_coherent_map_type and move
  it to the gt folder as it now takes an intel_gt instead of a
  drm_i915_private.

v3:
- Remove additional gt requirement from shmem_create_from_object.
  Instead of passing a gt to check if the workaround applies in
  intel_gt_coherent_map_type, only check if the object is lmem to
  determine the map type to use.

v4:
- Fix formatting warnings.
- Add this cover letter and all missing revision notes.
- Add missing acks and reviews to commit messages.
- Fix contributor ordering in commit messages.

Jonathan Cavitt (3):
  drm/i915/gt: Simplify shmem_create_from_object map_type selection
  drm/i915: Make i915_coherent_map_type GT-centric
  drm/i915/gt: Apply workaround 22016122933 correctly

 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c    |  3 ++-
 drivers/gpu/drm/i915/gem/i915_gem_object.h       |  4 ----
 drivers/gpu/drm/i915/gem/i915_gem_pages.c        | 15 ---------------
 .../drm/i915/gem/selftests/i915_gem_migrate.c    | 12 ++++++------
 drivers/gpu/drm/i915/gt/intel_engine_pm.c        |  2 +-
 drivers/gpu/drm/i915/gt/intel_gt.c               | 16 ++++++++++++++++
 drivers/gpu/drm/i915/gt/intel_gt.h               |  9 +++++++++
 drivers/gpu/drm/i915/gt/intel_gtt.c              |  4 ++--
 drivers/gpu/drm/i915/gt/intel_lrc.c              | 13 +++++++------
 drivers/gpu/drm/i915/gt/intel_ring.c             |  3 ++-
 drivers/gpu/drm/i915/gt/selftest_context.c       |  5 +++--
 drivers/gpu/drm/i915/gt/selftest_hangcheck.c     |  4 ++--
 drivers/gpu/drm/i915/gt/selftest_lrc.c           |  6 +++---
 drivers/gpu/drm/i915/gt/shmem_utils.c            |  3 +--
 drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c        |  7 +------
 drivers/gpu/drm/i915/gt/uc/intel_guc.c           | 11 ++++++-----
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c        |  4 ----
 drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c        |  3 +--
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c         |  3 ++-
 drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c       |  3 ++-
 drivers/gpu/drm/i915/pxp/intel_pxp_tee.c         |  5 ++++-
 drivers/gpu/drm/i915/selftests/igt_spinner.c     |  2 +-
 22 files changed, 71 insertions(+), 66 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection
@ 2023-07-26 15:53 Jonathan Cavitt
  2023-07-27 11:27 ` Tvrtko Ursulin
  2023-07-27 12:23 ` Andi Shyti
  0 siblings, 2 replies; 13+ messages in thread
From: Jonathan Cavitt @ 2023-07-26 15:53 UTC (permalink / raw)
  To: intel-gfx
  Cc: andi.shyti, chris.p.wilson, jonathan.cavitt, matthew.d.roper,
	nirmoy.das

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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-10 12:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-08-01 15:32 ` [Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric Jonathan Cavitt
2023-08-01 15:32 ` [Intel-gfx] [PATCH 3/3] drm/i915/gt: Apply workaround 22016122933 correctly Jonathan Cavitt
2023-08-01 17:22 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Fix Wa_22016122933 implementation Patchwork
2023-08-01 17:40 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-08-01 18:59 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Fix Wa_22016122933 implementation (rev2) Patchwork
2023-08-01 19:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-01 23:45 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-08-10 12:34 ` [Intel-gfx] [PATCH 0/3] drm/i915: Fix Wa_22016122933 implementation Andi Shyti
  -- strict thread matches above, loose matches on Subject: below --
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-27 11:27 ` Tvrtko Ursulin
2023-07-27 12:23 ` Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox