* [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables.
@ 2021-09-09 3:07 Dave Airlie
2021-09-09 3:07 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Dave Airlie @ 2021-09-09 3:07 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
static const vtables are more secure than writeable function pointers.
These two patches cleanup the uncore vtable to use static const tables.
v2: rebased onto drm-tip
v3: fix selftests build failure.
Dave.
^ permalink raw reply [flat|nested] 8+ messages in thread* [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc 2021-09-09 3:07 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie @ 2021-09-09 3:07 ` Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 2/2] drm/i915/uncore: constify the register vtables. (v2) Dave Airlie ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Dave Airlie @ 2021-09-09 3:07 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula, Dave Airlie, Jani Nikula From: Dave Airlie <airlied@redhat.com> constify it while here. drop the put function since it was never overloaded and always has done the same thing, no point in indirecting it for show. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> --- drivers/gpu/drm/i915/intel_uncore.c | 70 ++++++++++++++++------------- drivers/gpu/drm/i915/intel_uncore.h | 7 +-- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index f9767054dbdf..8652e4221404 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -36,6 +36,12 @@ #define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__)) +static void +fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +{ + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); +} + void intel_uncore_mmio_debug_init_early(struct intel_uncore_mmio_debug *mmio_debug) { @@ -248,7 +254,7 @@ fw_domain_put(const struct intel_uncore_forcewake_domain *d) } static void -fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +fw_domains_get_normal(struct intel_uncore *uncore, enum forcewake_domains fw_domains) { struct intel_uncore_forcewake_domain *d; unsigned int tmp; @@ -396,7 +402,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) GEM_BUG_ON(!domain->wake_count); if (--domain->wake_count == 0) - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); spin_unlock_irqrestore(&uncore->lock, irqflags); @@ -454,7 +460,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) fw = uncore->fw_domains_active; if (fw) - uncore->funcs.force_wake_put(uncore, fw); + fw_domains_put(uncore, fw); fw_domains_reset(uncore, uncore->fw_domains); assert_forcewakes_inactive(uncore); @@ -562,7 +568,7 @@ static void forcewake_early_sanitize(struct intel_uncore *uncore, intel_uncore_forcewake_reset(uncore); if (restore_forcewake) { spin_lock_irq(&uncore->lock); - uncore->funcs.force_wake_get(uncore, restore_forcewake); + fw_domains_get(uncore, restore_forcewake); if (intel_uncore_has_fifo(uncore)) uncore->fifo_count = fifo_free_entries(uncore); @@ -623,7 +629,7 @@ static void __intel_uncore_forcewake_get(struct intel_uncore *uncore, } if (fw_domains) - uncore->funcs.force_wake_get(uncore, fw_domains); + fw_domains_get(uncore, fw_domains); } /** @@ -644,7 +650,7 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; assert_rpm_wakelock_held(uncore->rpm); @@ -711,7 +717,7 @@ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_get(uncore, fw_domains); @@ -733,7 +739,7 @@ static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, continue; } - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); } } @@ -750,7 +756,7 @@ void intel_uncore_forcewake_put(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; spin_lock_irqsave(&uncore->lock, irqflags); @@ -769,7 +775,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore *uncore, struct intel_uncore_forcewake_domain *domain; unsigned int tmp; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; fw_domains &= uncore->fw_domains; @@ -793,7 +799,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_put(uncore, fw_domains); @@ -801,7 +807,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, void assert_forcewakes_inactive(struct intel_uncore *uncore) { - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; drm_WARN(&uncore->i915->drm, uncore->fw_domains_active, @@ -818,7 +824,7 @@ void assert_forcewakes_active(struct intel_uncore *uncore, if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)) return; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; spin_lock_irq(&uncore->lock); @@ -1582,7 +1588,7 @@ static noinline void ___force_wake_auto(struct intel_uncore *uncore, for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) fw_domain_arm_timer(domain); - uncore->funcs.force_wake_get(uncore, fw_domains); + fw_domains_get(uncore, fw_domains); } static inline void __force_wake_auto(struct intel_uncore *uncore, @@ -1841,6 +1847,18 @@ static void intel_uncore_fw_domains_fini(struct intel_uncore *uncore) fw_domain_fini(uncore, d->id); } +static const struct intel_uncore_fw_get uncore_get_fallback = { + .force_wake_get = fw_domains_get_with_fallback +}; + +static const struct intel_uncore_fw_get uncore_get_normal = { + .force_wake_get = fw_domains_get_normal, +}; + +static const struct intel_uncore_fw_get uncore_get_thread_status = { + .force_wake_get = fw_domains_get_with_thread_status +}; + static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) { struct drm_i915_private *i915 = uncore->i915; @@ -1856,8 +1874,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) intel_engine_mask_t emask = INTEL_INFO(i915)->platform_engine_mask; int i; - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1882,8 +1899,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE_ACK_MEDIA_VEBOX_GEN11(i)); } } else if (IS_GRAPHICS_VER(i915, 9, 10)) { - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1893,16 +1909,13 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9); } else if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) { - uncore->funcs.force_wake_get = fw_domains_get; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_normal; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_VLV, FORCEWAKE_ACK_VLV); fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_VLV, FORCEWAKE_ACK_MEDIA_VLV); } else if (IS_HASWELL(i915) || IS_BROADWELL(i915)) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_MT, FORCEWAKE_ACK_HSW); } else if (IS_IVYBRIDGE(i915)) { @@ -1917,9 +1930,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) * (correctly) interpreted by the test below as MT * forcewake being disabled. */ - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; /* We need to init first for ECOBUS access and then * determine later if we want to reinit, in case of MT access is @@ -1950,9 +1961,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE, FORCEWAKE_ACK); } } else if (GRAPHICS_VER(i915) == 6) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE, FORCEWAKE_ACK); } @@ -2161,8 +2170,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore) } /* make sure fw funcs are set if and only if we have fw*/ - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_get); - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_put); + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->fw_get_funcs); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.read_fw_domains); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.write_fw_domains); diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index 531665b08039..1950380c0d79 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -84,12 +84,12 @@ enum forcewake_domains { FORCEWAKE_ALL = BIT(FW_DOMAIN_ID_COUNT) - 1, }; -struct intel_uncore_funcs { +struct intel_uncore_fw_get { void (*force_wake_get)(struct intel_uncore *uncore, enum forcewake_domains domains); - void (*force_wake_put)(struct intel_uncore *uncore, - enum forcewake_domains domains); +}; +struct intel_uncore_funcs { enum forcewake_domains (*read_fw_domains)(struct intel_uncore *uncore, i915_reg_t r); enum forcewake_domains (*write_fw_domains)(struct intel_uncore *uncore, @@ -143,6 +143,7 @@ struct intel_uncore { unsigned int fw_domains_table_entries; struct notifier_block pmic_bus_access_nb; + const struct intel_uncore_fw_get *fw_get_funcs; struct intel_uncore_funcs funcs; unsigned int fifo_count; -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Intel-gfx] [PATCH 2/2] drm/i915/uncore: constify the register vtables. (v2) 2021-09-09 3:07 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie @ 2021-09-09 3:07 ` Dave Airlie 2021-09-09 3:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for i915/uncore: constify the uncore vtables. (rev3) Patchwork 2021-09-09 5:00 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Dave Airlie @ 2021-09-09 3:07 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula, Dave Airlie, Jani Nikula From: Dave Airlie <airlied@redhat.com> This reworks the uncore function vtable so that it's constant. v2: fixup selftest mocking. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> --- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++-------- drivers/gpu/drm/i915/intel_uncore.h | 8 +- drivers/gpu/drm/i915/selftests/mock_uncore.c | 9 +- 3 files changed, 89 insertions(+), 61 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 8652e4221404..e0e7f133f2b9 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -1737,32 +1737,24 @@ __vgpu_write(8) __vgpu_write(16) __vgpu_write(32) -#define ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, x) \ -do { \ - (uncore)->funcs.mmio_writeb = x##_write8; \ - (uncore)->funcs.mmio_writew = x##_write16; \ - (uncore)->funcs.mmio_writel = x##_write32; \ -} while (0) - -#define ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, x) \ -do { \ - (uncore)->funcs.mmio_readb = x##_read8; \ - (uncore)->funcs.mmio_readw = x##_read16; \ - (uncore)->funcs.mmio_readl = x##_read32; \ - (uncore)->funcs.mmio_readq = x##_read64; \ -} while (0) - -#define ASSIGN_WRITE_MMIO_VFUNCS(uncore, x) \ -do { \ - ASSIGN_RAW_WRITE_MMIO_VFUNCS((uncore), x); \ - (uncore)->funcs.write_fw_domains = x##_reg_write_fw_domains; \ -} while (0) - -#define ASSIGN_READ_MMIO_VFUNCS(uncore, x) \ -do { \ - ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, x); \ - (uncore)->funcs.read_fw_domains = x##_reg_read_fw_domains; \ -} while (0) +#define MMIO_RAW_WRITE_VFUNCS(x) \ + .mmio_writeb = x##_write8, \ + .mmio_writew = x##_write16, \ + .mmio_writel = x##_write32 + +#define MMIO_RAW_READ_VFUNCS(x) \ + .mmio_readb = x##_read8, \ + .mmio_readw = x##_read16, \ + .mmio_readl = x##_read32, \ + .mmio_readq = x##_read64 + +#define MMIO_WRITE_FW_VFUNCS(x) \ + MMIO_RAW_WRITE_VFUNCS(x), \ + .write_fw_domains = x##_reg_write_fw_domains + +#define MMIO_READ_FW_VFUNCS(x) \ + MMIO_RAW_READ_VFUNCS(x), \ + .read_fw_domains = x##_reg_read_fw_domains static int __fw_domain_init(struct intel_uncore *uncore, enum forcewake_domain_id domain_id, @@ -2067,22 +2059,64 @@ void intel_uncore_init_early(struct intel_uncore *uncore, uncore->debug = &i915->mmio_debug; } +static const struct intel_uncore_funcs vgpu_funcs = { + MMIO_RAW_WRITE_VFUNCS(vgpu), + MMIO_RAW_READ_VFUNCS(vgpu), +}; + +static const struct intel_uncore_funcs gen5_funcs = { + MMIO_RAW_WRITE_VFUNCS(gen5), + MMIO_RAW_READ_VFUNCS(gen5), +}; + +static const struct intel_uncore_funcs gen2_funcs = { + MMIO_RAW_WRITE_VFUNCS(gen2), + MMIO_RAW_READ_VFUNCS(gen2), +}; + static void uncore_raw_init(struct intel_uncore *uncore) { GEM_BUG_ON(intel_uncore_has_forcewake(uncore)); if (intel_vgpu_active(uncore->i915)) { - ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, vgpu); - ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, vgpu); + uncore->funcs = &vgpu_funcs; } else if (GRAPHICS_VER(uncore->i915) == 5) { - ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, gen5); - ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, gen5); + uncore->funcs = &gen5_funcs; } else { - ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, gen2); - ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, gen2); + uncore->funcs = &gen2_funcs; } } +static const struct intel_uncore_funcs gen12_funcs = { + MMIO_WRITE_FW_VFUNCS(gen12_fwtable), + MMIO_READ_FW_VFUNCS(gen11_fwtable) +}; + +static const struct intel_uncore_funcs gen11_funcs = { + MMIO_WRITE_FW_VFUNCS(gen11_fwtable), + MMIO_READ_FW_VFUNCS(gen11_fwtable) +}; + +static const struct intel_uncore_funcs fwtable_funcs = { + MMIO_WRITE_FW_VFUNCS(fwtable), + MMIO_READ_FW_VFUNCS(fwtable) +}; + +static const struct intel_uncore_funcs gen8_funcs = { + MMIO_WRITE_FW_VFUNCS(gen8), + MMIO_READ_FW_VFUNCS(gen6) +}; + +static const struct intel_uncore_funcs vlv_funcs = { + MMIO_WRITE_FW_VFUNCS(gen6), + MMIO_READ_FW_VFUNCS(fwtable) +}; + +static const struct intel_uncore_funcs gen6_funcs = { + MMIO_WRITE_FW_VFUNCS(gen6), + MMIO_READ_FW_VFUNCS(gen6) +}; + static int uncore_forcewake_init(struct intel_uncore *uncore) { struct drm_i915_private *i915 = uncore->i915; @@ -2097,38 +2131,29 @@ static int uncore_forcewake_init(struct intel_uncore *uncore) if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 55)) { ASSIGN_FW_DOMAINS_TABLE(uncore, __dg2_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable); + uncore->funcs = &gen12_funcs; } else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) { ASSIGN_FW_DOMAINS_TABLE(uncore, __xehp_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable); + uncore->funcs = &gen12_funcs; } else if (GRAPHICS_VER(i915) >= 12) { ASSIGN_FW_DOMAINS_TABLE(uncore, __gen12_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen12_fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable); + uncore->funcs = &gen12_funcs; } else if (GRAPHICS_VER(i915) == 11) { ASSIGN_FW_DOMAINS_TABLE(uncore, __gen11_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen11_fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen11_fwtable); + uncore->funcs = &gen11_funcs; } else if (IS_GRAPHICS_VER(i915, 9, 10)) { ASSIGN_FW_DOMAINS_TABLE(uncore, __gen9_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable); + uncore->funcs = &fwtable_funcs; } else if (IS_CHERRYVIEW(i915)) { ASSIGN_FW_DOMAINS_TABLE(uncore, __chv_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, fwtable); - ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable); + uncore->funcs = &fwtable_funcs; } else if (GRAPHICS_VER(i915) == 8) { - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen8); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen6); + uncore->funcs = &gen8_funcs; } else if (IS_VALLEYVIEW(i915)) { ASSIGN_FW_DOMAINS_TABLE(uncore, __vlv_fw_ranges); - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6); - ASSIGN_READ_MMIO_VFUNCS(uncore, fwtable); + uncore->funcs = &vlv_funcs; } else if (IS_GRAPHICS_VER(i915, 6, 7)) { - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen6); + uncore->funcs = &gen6_funcs; } uncore->pmic_bus_access_nb.notifier_call = i915_pmic_bus_access_notifier; @@ -2171,8 +2196,8 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore) /* make sure fw funcs are set if and only if we have fw*/ GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->fw_get_funcs); - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.read_fw_domains); - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.write_fw_domains); + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs->read_fw_domains); + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs->write_fw_domains); if (HAS_FPGA_DBG_UNCLAIMED(i915)) uncore->flags |= UNCORE_HAS_FPGA_DBG_UNCLAIMED; @@ -2511,10 +2536,10 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, return 0; if (op & FW_REG_READ) - fw_domains = uncore->funcs.read_fw_domains(uncore, reg); + fw_domains = uncore->funcs->read_fw_domains(uncore, reg); if (op & FW_REG_WRITE) - fw_domains |= uncore->funcs.write_fw_domains(uncore, reg); + fw_domains |= uncore->funcs->write_fw_domains(uncore, reg); drm_WARN_ON(&uncore->i915->drm, fw_domains & ~uncore->fw_domains); diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index 1950380c0d79..92b4279119d2 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -144,7 +144,7 @@ struct intel_uncore { struct notifier_block pmic_bus_access_nb; const struct intel_uncore_fw_get *fw_get_funcs; - struct intel_uncore_funcs funcs; + const struct intel_uncore_funcs *funcs; unsigned int fifo_count; @@ -318,14 +318,14 @@ __raw_write(64, q) static inline u##x__ intel_uncore_##name__(struct intel_uncore *uncore, \ i915_reg_t reg) \ { \ - return uncore->funcs.mmio_read##s__(uncore, reg, (trace__)); \ + return uncore->funcs->mmio_read##s__(uncore, reg, (trace__)); \ } #define __uncore_write(name__, x__, s__, trace__) \ static inline void intel_uncore_##name__(struct intel_uncore *uncore, \ i915_reg_t reg, u##x__ val) \ { \ - uncore->funcs.mmio_write##s__(uncore, reg, val, (trace__)); \ + uncore->funcs->mmio_write##s__(uncore, reg, val, (trace__)); \ } __uncore_read(read8, 8, b, true) @@ -344,7 +344,7 @@ __uncore_write(write_notrace, 32, l, false) * an arbitrary delay between them. This can cause the hardware to * act upon the intermediate value, possibly leading to corruption and * machine death. For this reason we do not support intel_uncore_write64, - * or uncore->funcs.mmio_writeq. + * or uncore->funcs->mmio_writeq. * * When reading a 64-bit value as two 32-bit values, the delay may cause * the two reads to mismatch, e.g. a timestamp overflowing. Also note that diff --git a/drivers/gpu/drm/i915/selftests/mock_uncore.c b/drivers/gpu/drm/i915/selftests/mock_uncore.c index ca57e4008701..9b0d56dc98d4 100644 --- a/drivers/gpu/drm/i915/selftests/mock_uncore.c +++ b/drivers/gpu/drm/i915/selftests/mock_uncore.c @@ -39,11 +39,14 @@ __nop_read(16) __nop_read(32) __nop_read(64) +static const struct intel_uncore_funcs nop_funcs = { + MMIO_RAW_WRITE_VFUNCS(nop), + MMIO_RAW_READ_VFUNCS(nop) +}; + void mock_uncore_init(struct intel_uncore *uncore, struct drm_i915_private *i915) { intel_uncore_init_early(uncore, i915); - - ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, nop); - ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, nop); + uncore->funcs = &nop_funcs; } -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for i915/uncore: constify the uncore vtables. (rev3) 2021-09-09 3:07 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 2/2] drm/i915/uncore: constify the register vtables. (v2) Dave Airlie @ 2021-09-09 3:49 ` Patchwork 2021-09-09 5:00 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2021-09-09 3:49 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 2057 bytes --] == Series Details == Series: i915/uncore: constify the uncore vtables. (rev3) URL : https://patchwork.freedesktop.org/series/94465/ State : success == Summary == CI Bug Log - changes from CI_DRM_10565 -> Patchwork_20997 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/index.html Known issues ------------ Here are the changes found in Patchwork_20997 that come from known issues: ### IGT changes ### #### Possible fixes #### * igt@i915_selftest@live@gt_pm: - {fi-jsl-1}: [DMESG-FAIL][1] ([i915#1886]) -> [PASS][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/fi-jsl-1/igt@i915_selftest@live@gt_pm.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/fi-jsl-1/igt@i915_selftest@live@gt_pm.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886 Participating hosts (47 -> 32) ------------------------------ Missing (15): fi-ilk-m540 fi-hsw-gt1 fi-bdw-5557u bat-adls-5 bat-dg1-6 fi-bdw-gvtdvm fi-bsw-cyan fi-snb-2520m bat-adlp-4 fi-ctg-p8600 fi-hsw-4770 fi-ivb-3770 fi-bdw-samus bat-jsl-1 fi-snb-2600 Build changes ------------- * Linux: CI_DRM_10565 -> Patchwork_20997 CI-20190529: 20190529 CI_DRM_10565: 8c3cd60dcfa81a649b14f0705eb5e5c9336f1881 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_6201: be0d02ff0775235ead63ccb1e3a1e8c10f0209cf @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_20997: fcc6ecfc788bdec6e2452aaca1238334b05c3b5d @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == fcc6ecfc788b drm/i915/uncore: constify the register vtables. (v2) 2e090337048c drm/i915/uncore: split the fw get function into separate vfunc == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/index.html [-- Attachment #2: Type: text/html, Size: 2665 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for i915/uncore: constify the uncore vtables. (rev3) 2021-09-09 3:07 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie ` (2 preceding siblings ...) 2021-09-09 3:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for i915/uncore: constify the uncore vtables. (rev3) Patchwork @ 2021-09-09 5:00 ` Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2021-09-09 5:00 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 30271 bytes --] == Series Details == Series: i915/uncore: constify the uncore vtables. (rev3) URL : https://patchwork.freedesktop.org/series/94465/ State : success == Summary == CI Bug Log - changes from CI_DRM_10565_full -> Patchwork_20997_full ==================================================== Summary ------- **SUCCESS** No regressions found. Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_20997_full: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@gem_eio@hibernate: - {shard-rkl}: [TIMEOUT][1] ([i915#3811]) -> [FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-5/igt@gem_eio@hibernate.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-5/igt@gem_eio@hibernate.html Known issues ------------ Here are the changes found in Patchwork_20997_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_eio@in-flight-suspend: - shard-skl: [PASS][3] -> [INCOMPLETE][4] ([i915#198]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl9/igt@gem_eio@in-flight-suspend.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl2/igt@gem_eio@in-flight-suspend.html * igt@gem_exec_fair@basic-flow@rcs0: - shard-tglb: [PASS][5] -> [FAIL][6] ([i915#2842]) +3 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-tglb7/igt@gem_exec_fair@basic-flow@rcs0.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb5/igt@gem_exec_fair@basic-flow@rcs0.html * igt@gem_exec_fair@basic-pace@vcs1: - shard-iclb: NOTRUN -> [FAIL][7] ([i915#2842]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb2/igt@gem_exec_fair@basic-pace@vcs1.html * igt@gem_exec_fair@basic-pace@vecs0: - shard-kbl: [PASS][8] -> [FAIL][9] ([i915#2842]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl6/igt@gem_exec_fair@basic-pace@vecs0.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl6/igt@gem_exec_fair@basic-pace@vecs0.html * igt@gem_exec_suspend@basic-s0: - shard-tglb: [PASS][10] -> [INCOMPLETE][11] ([i915#456]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-tglb3/igt@gem_exec_suspend@basic-s0.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb7/igt@gem_exec_suspend@basic-s0.html * igt@gem_huc_copy@huc-copy: - shard-tglb: [PASS][12] -> [SKIP][13] ([i915#2190]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-tglb8/igt@gem_huc_copy@huc-copy.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb6/igt@gem_huc_copy@huc-copy.html * igt@gem_mmap_gtt@cpuset-big-copy: - shard-iclb: [PASS][14] -> [FAIL][15] ([i915#307]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb8/igt@gem_mmap_gtt@cpuset-big-copy.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb4/igt@gem_mmap_gtt@cpuset-big-copy.html * igt@gem_render_copy@linear-to-vebox-y-tiled: - shard-glk: NOTRUN -> [SKIP][16] ([fdo#109271]) +3 similar issues [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-glk2/igt@gem_render_copy@linear-to-vebox-y-tiled.html - shard-iclb: NOTRUN -> [SKIP][17] ([i915#768]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@gem_render_copy@linear-to-vebox-y-tiled.html * igt@gem_userptr_blits@dmabuf-unsync: - shard-tglb: NOTRUN -> [SKIP][18] ([i915#3297]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@gem_userptr_blits@dmabuf-unsync.html - shard-iclb: NOTRUN -> [SKIP][19] ([i915#3297]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@gem_userptr_blits@dmabuf-unsync.html * igt@kms_async_flips@alternate-sync-async-flip: - shard-skl: [PASS][20] -> [FAIL][21] ([i915#2521]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl5/igt@kms_async_flips@alternate-sync-async-flip.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl6/igt@kms_async_flips@alternate-sync-async-flip.html * igt@kms_atomic_interruptible@atomic-setmode: - shard-skl: NOTRUN -> [SKIP][22] ([fdo#109271]) +9 similar issues [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl9/igt@kms_atomic_interruptible@atomic-setmode.html * igt@kms_big_fb@y-tiled-8bpp-rotate-270: - shard-iclb: NOTRUN -> [SKIP][23] ([fdo#110725] / [fdo#111614]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_big_fb@y-tiled-8bpp-rotate-270.html * igt@kms_big_fb@yf-tiled-64bpp-rotate-90: - shard-iclb: NOTRUN -> [SKIP][24] ([fdo#110723]) [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_big_fb@yf-tiled-64bpp-rotate-90.html * igt@kms_big_fb@yf-tiled-addfb-size-overflow: - shard-tglb: NOTRUN -> [SKIP][25] ([fdo#111615]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip: - shard-apl: NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#3777]) +3 similar issues [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl7/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs: - shard-apl: NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#3886]) +11 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl6/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html * igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc: - shard-glk: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#3886]) [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-glk2/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html - shard-iclb: NOTRUN -> [SKIP][29] ([fdo#109278] / [i915#3886]) [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html * igt@kms_chamelium@vga-hpd: - shard-apl: NOTRUN -> [SKIP][30] ([fdo#109271] / [fdo#111827]) +23 similar issues [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl7/igt@kms_chamelium@vga-hpd.html * igt@kms_color_chamelium@pipe-a-ctm-negative: - shard-kbl: NOTRUN -> [SKIP][31] ([fdo#109271] / [fdo#111827]) [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_color_chamelium@pipe-a-ctm-negative.html * igt@kms_color_chamelium@pipe-b-gamma: - shard-iclb: NOTRUN -> [SKIP][32] ([fdo#109284] / [fdo#111827]) +1 similar issue [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_color_chamelium@pipe-b-gamma.html - shard-glk: NOTRUN -> [SKIP][33] ([fdo#109271] / [fdo#111827]) [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-glk2/igt@kms_color_chamelium@pipe-b-gamma.html * igt@kms_color_chamelium@pipe-c-ctm-max: - shard-tglb: NOTRUN -> [SKIP][34] ([fdo#109284] / [fdo#111827]) [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@kms_color_chamelium@pipe-c-ctm-max.html * igt@kms_color_chamelium@pipe-d-ctm-0-25: - shard-skl: NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl4/igt@kms_color_chamelium@pipe-d-ctm-0-25.html * igt@kms_content_protection@srm: - shard-apl: NOTRUN -> [TIMEOUT][36] ([i915#1319]) [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl6/igt@kms_content_protection@srm.html * igt@kms_cursor_crc@pipe-a-cursor-32x10-random: - shard-tglb: NOTRUN -> [SKIP][37] ([i915#3359]) [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb2/igt@kms_cursor_crc@pipe-a-cursor-32x10-random.html * igt@kms_cursor_crc@pipe-c-cursor-32x32-rapid-movement: - shard-tglb: NOTRUN -> [SKIP][38] ([i915#3319]) [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@kms_cursor_crc@pipe-c-cursor-32x32-rapid-movement.html * igt@kms_cursor_crc@pipe-d-cursor-dpms: - shard-iclb: NOTRUN -> [SKIP][39] ([fdo#109278]) +4 similar issues [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_cursor_crc@pipe-d-cursor-dpms.html * igt@kms_cursor_legacy@cursorb-vs-flipb-atomic: - shard-tglb: NOTRUN -> [SKIP][40] ([fdo#111825]) +5 similar issues [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@kms_cursor_legacy@cursorb-vs-flipb-atomic.html - shard-iclb: NOTRUN -> [SKIP][41] ([fdo#109274] / [fdo#109278]) [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_cursor_legacy@cursorb-vs-flipb-atomic.html * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1: - shard-kbl: [PASS][42] -> [DMESG-WARN][43] ([i915#180]) [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl7/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html * igt@kms_flip@flip-vs-suspend@b-dp1: - shard-apl: [PASS][44] -> [DMESG-WARN][45] ([i915#180]) [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-apl6/igt@kms_flip@flip-vs-suspend@b-dp1.html [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl7/igt@kms_flip@flip-vs-suspend@b-dp1.html * igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1: - shard-skl: [PASS][46] -> [FAIL][47] ([i915#2122]) [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl8/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl9/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile: - shard-iclb: [PASS][48] -> [SKIP][49] ([i915#3701]) [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs: - shard-apl: NOTRUN -> [SKIP][50] ([fdo#109271] / [i915#2672]) [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl3/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs.html * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move: - shard-iclb: NOTRUN -> [SKIP][51] ([fdo#109280]) +5 similar issues [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move.html * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render: - shard-kbl: NOTRUN -> [SKIP][52] ([fdo#109271]) +10 similar issues [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render.html * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d: - shard-apl: NOTRUN -> [SKIP][53] ([fdo#109271] / [i915#533]) [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl6/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d: - shard-skl: NOTRUN -> [SKIP][54] ([fdo#109271] / [i915#533]) [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl10/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb: - shard-apl: NOTRUN -> [FAIL][55] ([fdo#108145] / [i915#265]) +2 similar issues [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl8/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max: - shard-kbl: NOTRUN -> [FAIL][56] ([fdo#108145] / [i915#265]) [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl2/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][57] -> [FAIL][58] ([fdo#108145] / [i915#265]) [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html * igt@kms_plane_lowres@pipe-b-tiling-x: - shard-iclb: NOTRUN -> [SKIP][59] ([i915#3536]) [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_plane_lowres@pipe-b-tiling-x.html * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4: - shard-kbl: NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#658]) [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3: - shard-apl: NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#658]) +4 similar issues [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl6/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-3.html * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4: - shard-tglb: NOTRUN -> [SKIP][62] ([i915#2920]) [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb3/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4.html - shard-iclb: NOTRUN -> [SKIP][63] ([i915#658]) [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb5/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4.html * igt@kms_psr@psr2_primary_page_flip: - shard-iclb: [PASS][64] -> [SKIP][65] ([fdo#109441]) +1 similar issue [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb6/igt@kms_psr@psr2_primary_page_flip.html * igt@kms_writeback@writeback-fb-id: - shard-apl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#2437]) [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl8/igt@kms_writeback@writeback-fb-id.html * igt@kms_writeback@writeback-invalid-parameters: - shard-kbl: NOTRUN -> [SKIP][67] ([fdo#109271] / [i915#2437]) [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_writeback@writeback-invalid-parameters.html * igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame: - shard-apl: NOTRUN -> [SKIP][68] ([fdo#109271]) +299 similar issues [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl8/igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame.html * igt@sysfs_clients@pidname: - shard-apl: NOTRUN -> [SKIP][69] ([fdo#109271] / [i915#2994]) +2 similar issues [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl6/igt@sysfs_clients@pidname.html #### Possible fixes #### * igt@fbdev@nullptr: - {shard-rkl}: [SKIP][70] ([i915#2582]) -> [PASS][71] [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@fbdev@nullptr.html [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@fbdev@nullptr.html * igt@feature_discovery@psr2: - shard-iclb: [SKIP][72] ([i915#658]) -> [PASS][73] [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb8/igt@feature_discovery@psr2.html [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb2/igt@feature_discovery@psr2.html * igt@gem_eio@reset-stress: - {shard-rkl}: [FAIL][74] ([i915#3115]) -> [PASS][75] [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@gem_eio@reset-stress.html [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@gem_eio@reset-stress.html * igt@gem_exec_fair@basic-none@vecs0: - shard-kbl: [FAIL][76] ([i915#2842]) -> [PASS][77] +1 similar issue [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl2/igt@gem_exec_fair@basic-none@vecs0.html [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl2/igt@gem_exec_fair@basic-none@vecs0.html * igt@gem_exec_fair@basic-pace@bcs0: - shard-tglb: [FAIL][78] ([i915#2842]) -> [PASS][79] [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-tglb3/igt@gem_exec_fair@basic-pace@bcs0.html [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-tglb6/igt@gem_exec_fair@basic-pace@bcs0.html * igt@gem_exec_fair@basic-pace@rcs0: - shard-kbl: [SKIP][80] ([fdo#109271]) -> [PASS][81] [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl6/igt@gem_exec_fair@basic-pace@rcs0.html [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl6/igt@gem_exec_fair@basic-pace@rcs0.html - {shard-rkl}: [FAIL][82] ([i915#2842]) -> [PASS][83] +1 similar issue [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@gem_exec_fair@basic-pace@rcs0.html [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-2/igt@gem_exec_fair@basic-pace@rcs0.html * igt@gem_exec_fair@basic-throttle@rcs0: - shard-glk: [FAIL][84] ([i915#2842]) -> [PASS][85] [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-glk8/igt@gem_exec_fair@basic-throttle@rcs0.html [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html * igt@i915_pm_backlight@fade_with_suspend: - {shard-rkl}: [SKIP][86] ([i915#3012]) -> [PASS][87] [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@i915_pm_backlight@fade_with_suspend.html [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@i915_pm_backlight@fade_with_suspend.html * igt@kms_atomic@test-only: - {shard-rkl}: [SKIP][88] ([i915#1845]) -> [PASS][89] +26 similar issues [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_atomic@test-only.html [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_atomic@test-only.html * igt@kms_big_fb@linear-32bpp-rotate-0: - {shard-rkl}: [SKIP][90] ([i915#3638]) -> [PASS][91] +1 similar issue [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_big_fb@linear-32bpp-rotate-0.html [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_big_fb@linear-32bpp-rotate-0.html * igt@kms_big_fb@y-tiled-32bpp-rotate-180: - shard-iclb: [DMESG-WARN][92] ([i915#1226]) -> [PASS][93] [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb6/igt@kms_big_fb@y-tiled-32bpp-rotate-180.html [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb3/igt@kms_big_fb@y-tiled-32bpp-rotate-180.html * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180: - {shard-rkl}: [SKIP][94] ([i915#3721]) -> [PASS][95] +5 similar issues [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180.html [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180.html * igt@kms_color@pipe-a-ctm-0-25: - shard-skl: [DMESG-WARN][96] ([i915#1982]) -> [PASS][97] [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl2/igt@kms_color@pipe-a-ctm-0-25.html [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl1/igt@kms_color@pipe-a-ctm-0-25.html * igt@kms_color@pipe-b-ctm-0-25: - {shard-rkl}: [SKIP][98] ([i915#1149] / [i915#1849] / [i915#4070]) -> [PASS][99] +1 similar issue [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_color@pipe-b-ctm-0-25.html [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_color@pipe-b-ctm-0-25.html * igt@kms_cursor_crc@pipe-b-cursor-256x85-random: - {shard-rkl}: [SKIP][100] ([fdo#112022] / [i915#4070]) -> [PASS][101] +8 similar issues [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_cursor_crc@pipe-b-cursor-256x85-random.html [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_cursor_crc@pipe-b-cursor-256x85-random.html * igt@kms_cursor_crc@pipe-b-cursor-suspend: - shard-kbl: [DMESG-WARN][102] ([i915#180]) -> [PASS][103] [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl4/igt@kms_cursor_crc@pipe-b-cursor-suspend.html [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl2/igt@kms_cursor_crc@pipe-b-cursor-suspend.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-skl: [FAIL][104] ([i915#2346]) -> [PASS][105] [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html * igt@kms_cursor_legacy@flip-vs-cursor-legacy: - {shard-rkl}: [SKIP][106] ([fdo#111825] / [i915#4070]) -> [PASS][107] [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html * igt@kms_dp_aux_dev: - {shard-rkl}: [SKIP][108] ([i915#1257]) -> [PASS][109] [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@kms_dp_aux_dev.html [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_dp_aux_dev.html * igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled: - {shard-rkl}: [SKIP][110] ([fdo#111314]) -> [PASS][111] +4 similar issues [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled.html [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_draw_crc@draw-method-rgb565-mmap-wc-ytiled.html * igt@kms_fbcon_fbt@fbc-suspend: - {shard-rkl}: [SKIP][112] ([i915#1849]) -> [PASS][113] +29 similar issues [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_fbcon_fbt@fbc-suspend.html [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_fbcon_fbt@fbc-suspend.html * igt@kms_fbcon_fbt@psr-suspend: - {shard-rkl}: [SKIP][114] ([fdo#110189] / [i915#3955]) -> [PASS][115] [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@kms_fbcon_fbt@psr-suspend.html [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_fbcon_fbt@psr-suspend.html * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1: - shard-skl: [FAIL][116] ([i915#79]) -> [PASS][117] +1 similar issue [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl6/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl8/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1: - shard-kbl: [FAIL][118] ([i915#79]) -> [PASS][119] [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl4/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1.html [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-dp1.html * igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1: - shard-glk: [FAIL][120] ([i915#79]) -> [PASS][121] +1 similar issue [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-glk8/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1.html [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-glk2/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1.html * igt@kms_flip@flip-vs-suspend@a-dp1: - shard-apl: [DMESG-WARN][122] ([i915#180]) -> [PASS][123] +1 similar issue [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-apl6/igt@kms_flip@flip-vs-suspend@a-dp1.html [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-apl7/igt@kms_flip@flip-vs-suspend@a-dp1.html * igt@kms_hdr@bpc-switch-suspend: - shard-skl: [FAIL][124] ([i915#1188]) -> [PASS][125] [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl8/igt@kms_hdr@bpc-switch-suspend.html [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html * igt@kms_mmap_write_crc@main: - {shard-rkl}: [FAIL][126] -> [PASS][127] [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-6/igt@kms_mmap_write_crc@main.html [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_mmap_write_crc@main.html * igt@kms_plane@plane-panning-top-left@pipe-b-planes: - {shard-rkl}: [SKIP][128] ([i915#3558]) -> [PASS][129] +1 similar issue [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_plane@plane-panning-top-left@pipe-b-planes.html [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_plane@plane-panning-top-left@pipe-b-planes.html * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: - shard-skl: [FAIL][130] ([fdo#108145] / [i915#265]) -> [PASS][131] [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-skl5/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-skl7/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max: - {shard-rkl}: [SKIP][132] ([i915#1849] / [i915#4070]) -> [PASS][133] +4 similar issues [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html * igt@kms_plane_multiple@atomic-pipe-b-tiling-none: - {shard-rkl}: [SKIP][134] ([i915#3558] / [i915#4070]) -> [PASS][135] [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-1/igt@kms_plane_multiple@atomic-pipe-b-tiling-none.html [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_plane_multiple@atomic-pipe-b-tiling-none.html * igt@kms_psr2_su@frontbuffer: - shard-iclb: [SKIP][136] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [PASS][137] [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb6/igt@kms_psr2_su@frontbuffer.html [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb2/igt@kms_psr2_su@frontbuffer.html * igt@kms_psr@sprite_mmap_cpu: - {shard-rkl}: [SKIP][138] ([i915#1072]) -> [PASS][139] +2 similar issues [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-rkl-2/igt@kms_psr@sprite_mmap_cpu.html [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-rkl-6/igt@kms_psr@sprite_mmap_cpu.html * igt@kms_vblank@pipe-a-ts-continuation-suspend: - shard-kbl: [DMESG-WARN][140] ([i915#180] / [i915#295]) -> [PASS][141] [140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-kbl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-kbl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html #### Warnings #### * igt@gem_exec_fair@basic-throttle@rcs0: - shard-iclb: [FAIL][142] ([i915#2849]) -> [FAIL][143] ([i915#2842]) [142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb2/igt@gem_exec_fair@basic-throttle@rcs0.html [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb6/igt@gem_exec_fair@basic-throttle@rcs0.html * igt@i915_pm_dc@dc3co-vpb-simulation: - shard-iclb: [SKIP][144] ([i915#588]) -> [SKIP][145] ([i915#658]) [144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb6/igt@i915_pm_dc@dc3co-vpb-simulation.html * igt@i915_pm_dc@dc9-dpms: - shard-iclb: [FAIL][146] ([i915#3343]) -> [SKIP][147] ([i915#3288]) [146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10565/shard-iclb7/igt@i915_pm_dc@dc9-dpms.html [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/shard-iclb3/igt@i915_pm_dc@dc9-dpms.html * igt@i915_pm_rc6_residency@rc6-idle: - shard-iclb: [WARN][148] ([i915#1804] / [i915#2684]) -> [FAIL][149] ([i915#2680]) [148]: https://in == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20997/index.html [-- Attachment #2: Type: text/html, Size: 33403 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Intel-gfx] i915/uncore: constify the uncore vtables. (v2) @ 2021-09-09 2:34 Dave Airlie 2021-09-09 2:34 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 0 siblings, 1 reply; 8+ messages in thread From: Dave Airlie @ 2021-09-09 2:34 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula static const vtables are more secure than writeable function pointers. These two patches cleanup the uncore vtable to use static const tables. These are based on drm-tip, and should apply to the gt tree cleanly. Dave. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc 2021-09-09 2:34 [Intel-gfx] i915/uncore: constify the uncore vtables. (v2) Dave Airlie @ 2021-09-09 2:34 ` Dave Airlie 0 siblings, 0 replies; 8+ messages in thread From: Dave Airlie @ 2021-09-09 2:34 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula, Dave Airlie, Jani Nikula From: Dave Airlie <airlied@redhat.com> constify it while here. drop the put function since it was never overloaded and always has done the same thing, no point in indirecting it for show. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> --- drivers/gpu/drm/i915/intel_uncore.c | 70 ++++++++++++++++------------- drivers/gpu/drm/i915/intel_uncore.h | 7 +-- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index f9767054dbdf..8652e4221404 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -36,6 +36,12 @@ #define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__)) +static void +fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +{ + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); +} + void intel_uncore_mmio_debug_init_early(struct intel_uncore_mmio_debug *mmio_debug) { @@ -248,7 +254,7 @@ fw_domain_put(const struct intel_uncore_forcewake_domain *d) } static void -fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +fw_domains_get_normal(struct intel_uncore *uncore, enum forcewake_domains fw_domains) { struct intel_uncore_forcewake_domain *d; unsigned int tmp; @@ -396,7 +402,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) GEM_BUG_ON(!domain->wake_count); if (--domain->wake_count == 0) - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); spin_unlock_irqrestore(&uncore->lock, irqflags); @@ -454,7 +460,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) fw = uncore->fw_domains_active; if (fw) - uncore->funcs.force_wake_put(uncore, fw); + fw_domains_put(uncore, fw); fw_domains_reset(uncore, uncore->fw_domains); assert_forcewakes_inactive(uncore); @@ -562,7 +568,7 @@ static void forcewake_early_sanitize(struct intel_uncore *uncore, intel_uncore_forcewake_reset(uncore); if (restore_forcewake) { spin_lock_irq(&uncore->lock); - uncore->funcs.force_wake_get(uncore, restore_forcewake); + fw_domains_get(uncore, restore_forcewake); if (intel_uncore_has_fifo(uncore)) uncore->fifo_count = fifo_free_entries(uncore); @@ -623,7 +629,7 @@ static void __intel_uncore_forcewake_get(struct intel_uncore *uncore, } if (fw_domains) - uncore->funcs.force_wake_get(uncore, fw_domains); + fw_domains_get(uncore, fw_domains); } /** @@ -644,7 +650,7 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; assert_rpm_wakelock_held(uncore->rpm); @@ -711,7 +717,7 @@ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_get(uncore, fw_domains); @@ -733,7 +739,7 @@ static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, continue; } - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); } } @@ -750,7 +756,7 @@ void intel_uncore_forcewake_put(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; spin_lock_irqsave(&uncore->lock, irqflags); @@ -769,7 +775,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore *uncore, struct intel_uncore_forcewake_domain *domain; unsigned int tmp; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; fw_domains &= uncore->fw_domains; @@ -793,7 +799,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_put(uncore, fw_domains); @@ -801,7 +807,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, void assert_forcewakes_inactive(struct intel_uncore *uncore) { - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; drm_WARN(&uncore->i915->drm, uncore->fw_domains_active, @@ -818,7 +824,7 @@ void assert_forcewakes_active(struct intel_uncore *uncore, if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)) return; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; spin_lock_irq(&uncore->lock); @@ -1582,7 +1588,7 @@ static noinline void ___force_wake_auto(struct intel_uncore *uncore, for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) fw_domain_arm_timer(domain); - uncore->funcs.force_wake_get(uncore, fw_domains); + fw_domains_get(uncore, fw_domains); } static inline void __force_wake_auto(struct intel_uncore *uncore, @@ -1841,6 +1847,18 @@ static void intel_uncore_fw_domains_fini(struct intel_uncore *uncore) fw_domain_fini(uncore, d->id); } +static const struct intel_uncore_fw_get uncore_get_fallback = { + .force_wake_get = fw_domains_get_with_fallback +}; + +static const struct intel_uncore_fw_get uncore_get_normal = { + .force_wake_get = fw_domains_get_normal, +}; + +static const struct intel_uncore_fw_get uncore_get_thread_status = { + .force_wake_get = fw_domains_get_with_thread_status +}; + static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) { struct drm_i915_private *i915 = uncore->i915; @@ -1856,8 +1874,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) intel_engine_mask_t emask = INTEL_INFO(i915)->platform_engine_mask; int i; - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1882,8 +1899,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE_ACK_MEDIA_VEBOX_GEN11(i)); } } else if (IS_GRAPHICS_VER(i915, 9, 10)) { - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1893,16 +1909,13 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9); } else if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) { - uncore->funcs.force_wake_get = fw_domains_get; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_normal; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_VLV, FORCEWAKE_ACK_VLV); fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_VLV, FORCEWAKE_ACK_MEDIA_VLV); } else if (IS_HASWELL(i915) || IS_BROADWELL(i915)) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_MT, FORCEWAKE_ACK_HSW); } else if (IS_IVYBRIDGE(i915)) { @@ -1917,9 +1930,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) * (correctly) interpreted by the test below as MT * forcewake being disabled. */ - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; /* We need to init first for ECOBUS access and then * determine later if we want to reinit, in case of MT access is @@ -1950,9 +1961,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE, FORCEWAKE_ACK); } } else if (GRAPHICS_VER(i915) == 6) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE, FORCEWAKE_ACK); } @@ -2161,8 +2170,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore) } /* make sure fw funcs are set if and only if we have fw*/ - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_get); - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_put); + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->fw_get_funcs); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.read_fw_domains); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.write_fw_domains); diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index 531665b08039..1950380c0d79 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -84,12 +84,12 @@ enum forcewake_domains { FORCEWAKE_ALL = BIT(FW_DOMAIN_ID_COUNT) - 1, }; -struct intel_uncore_funcs { +struct intel_uncore_fw_get { void (*force_wake_get)(struct intel_uncore *uncore, enum forcewake_domains domains); - void (*force_wake_put)(struct intel_uncore *uncore, - enum forcewake_domains domains); +}; +struct intel_uncore_funcs { enum forcewake_domains (*read_fw_domains)(struct intel_uncore *uncore, i915_reg_t r); enum forcewake_domains (*write_fw_domains)(struct intel_uncore *uncore, @@ -143,6 +143,7 @@ struct intel_uncore { unsigned int fw_domains_table_entries; struct notifier_block pmic_bus_access_nb; + const struct intel_uncore_fw_get *fw_get_funcs; struct intel_uncore_funcs funcs; unsigned int fifo_count; -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables. @ 2021-09-08 4:45 Dave Airlie 2021-09-08 4:45 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 0 siblings, 1 reply; 8+ messages in thread From: Dave Airlie @ 2021-09-08 4:45 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula static const vtables are more secure than writeable function pointers. These two patches cleanup the uncore vtable to use static const tables. Dave. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc 2021-09-08 4:45 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie @ 2021-09-08 4:45 ` Dave Airlie 2021-09-08 9:26 ` Jani Nikula 0 siblings, 1 reply; 8+ messages in thread From: Dave Airlie @ 2021-09-08 4:45 UTC (permalink / raw) To: intel-gfx; +Cc: jani.nikula, Dave Airlie From: Dave Airlie <airlied@redhat.com> constify it while here. drop the put function since it was never overloaded and always has done the same thing, no point in indirecting it for show. Signed-off-by: Dave Airlie <airlied@redhat.com> --- drivers/gpu/drm/i915/intel_uncore.c | 62 +++++++++++++++-------------- drivers/gpu/drm/i915/intel_uncore.h | 7 ++-- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 6b38bc2811c1..d0bbfc320604 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -396,7 +396,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) GEM_BUG_ON(!domain->wake_count); if (--domain->wake_count == 0) - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); spin_unlock_irqrestore(&uncore->lock, irqflags); @@ -454,7 +454,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) fw = uncore->fw_domains_active; if (fw) - uncore->funcs.force_wake_put(uncore, fw); + fw_domains_put(uncore, fw); fw_domains_reset(uncore, uncore->fw_domains); assert_forcewakes_inactive(uncore); @@ -562,7 +562,7 @@ static void forcewake_early_sanitize(struct intel_uncore *uncore, intel_uncore_forcewake_reset(uncore); if (restore_forcewake) { spin_lock_irq(&uncore->lock); - uncore->funcs.force_wake_get(uncore, restore_forcewake); + uncore->fw_get_funcs->force_wake_get(uncore, restore_forcewake); if (intel_uncore_has_fifo(uncore)) uncore->fifo_count = fifo_free_entries(uncore); @@ -623,7 +623,7 @@ static void __intel_uncore_forcewake_get(struct intel_uncore *uncore, } if (fw_domains) - uncore->funcs.force_wake_get(uncore, fw_domains); + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); } /** @@ -644,7 +644,7 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; assert_rpm_wakelock_held(uncore->rpm); @@ -711,7 +711,7 @@ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_get(uncore, fw_domains); @@ -733,7 +733,7 @@ static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, continue; } - uncore->funcs.force_wake_put(uncore, domain->mask); + fw_domains_put(uncore, domain->mask); } } @@ -750,7 +750,7 @@ void intel_uncore_forcewake_put(struct intel_uncore *uncore, { unsigned long irqflags; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; spin_lock_irqsave(&uncore->lock, irqflags); @@ -769,7 +769,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore *uncore, struct intel_uncore_forcewake_domain *domain; unsigned int tmp; - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; fw_domains &= uncore->fw_domains; @@ -793,7 +793,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, { lockdep_assert_held(&uncore->lock); - if (!uncore->funcs.force_wake_put) + if (!uncore->fw_get_funcs) return; __intel_uncore_forcewake_put(uncore, fw_domains); @@ -801,7 +801,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, void assert_forcewakes_inactive(struct intel_uncore *uncore) { - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; drm_WARN(&uncore->i915->drm, uncore->fw_domains_active, @@ -818,7 +818,7 @@ void assert_forcewakes_active(struct intel_uncore *uncore, if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)) return; - if (!uncore->funcs.force_wake_get) + if (!uncore->fw_get_funcs) return; spin_lock_irq(&uncore->lock); @@ -1605,7 +1605,7 @@ static noinline void ___force_wake_auto(struct intel_uncore *uncore, for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) fw_domain_arm_timer(domain); - uncore->funcs.force_wake_get(uncore, fw_domains); + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); } static inline void __force_wake_auto(struct intel_uncore *uncore, @@ -1866,6 +1866,18 @@ static void intel_uncore_fw_domains_fini(struct intel_uncore *uncore) fw_domain_fini(uncore, d->id); } +static const struct intel_uncore_fw_get uncore_get_fallback = { + .force_wake_get = fw_domains_get_with_fallback +}; + +static const struct intel_uncore_fw_get uncore_get_normal = { + .force_wake_get = fw_domains_get +}; + +static const struct intel_uncore_fw_get uncore_get_thread_status = { + .force_wake_get = fw_domains_get_with_thread_status +}; + static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) { struct drm_i915_private *i915 = uncore->i915; @@ -1881,8 +1893,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) intel_engine_mask_t emask = INTEL_INFO(i915)->platform_engine_mask; int i; - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1907,8 +1918,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE_ACK_MEDIA_VEBOX_GEN11(i)); } } else if (IS_GRAPHICS_VER(i915, 9, 10)) { - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_fallback; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_RENDER_GEN9, FORCEWAKE_ACK_RENDER_GEN9); @@ -1918,16 +1928,13 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9); } else if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) { - uncore->funcs.force_wake_get = fw_domains_get; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_normal; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_VLV, FORCEWAKE_ACK_VLV); fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_VLV, FORCEWAKE_ACK_MEDIA_VLV); } else if (IS_HASWELL(i915) || IS_BROADWELL(i915)) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_MT, FORCEWAKE_ACK_HSW); } else if (IS_IVYBRIDGE(i915)) { @@ -1942,9 +1949,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) * (correctly) interpreted by the test below as MT * forcewake being disabled. */ - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; /* We need to init first for ECOBUS access and then * determine later if we want to reinit, in case of MT access is @@ -1975,9 +1980,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) FORCEWAKE, FORCEWAKE_ACK); } } else if (GRAPHICS_VER(i915) == 6) { - uncore->funcs.force_wake_get = - fw_domains_get_with_thread_status; - uncore->funcs.force_wake_put = fw_domains_put; + uncore->fw_get_funcs = &uncore_get_thread_status; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE, FORCEWAKE_ACK); } @@ -2186,8 +2189,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore) } /* make sure fw funcs are set if and only if we have fw*/ - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_get); - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_put); + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->fw_get_funcs); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.read_fw_domains); GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.write_fw_domains); diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index 3c0b0a8b5250..1a7448f5f16f 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -84,12 +84,12 @@ enum forcewake_domains { FORCEWAKE_ALL = BIT(FW_DOMAIN_ID_COUNT) - 1, }; -struct intel_uncore_funcs { +struct intel_uncore_fw_get { void (*force_wake_get)(struct intel_uncore *uncore, enum forcewake_domains domains); - void (*force_wake_put)(struct intel_uncore *uncore, - enum forcewake_domains domains); +}; +struct intel_uncore_funcs { enum forcewake_domains (*read_fw_domains)(struct intel_uncore *uncore, i915_reg_t r); enum forcewake_domains (*write_fw_domains)(struct intel_uncore *uncore, @@ -137,6 +137,7 @@ struct intel_uncore { unsigned int fw_domains_table_entries; struct notifier_block pmic_bus_access_nb; + const struct intel_uncore_fw_get *fw_get_funcs; struct intel_uncore_funcs funcs; unsigned int fifo_count; -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc 2021-09-08 4:45 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie @ 2021-09-08 9:26 ` Jani Nikula 0 siblings, 0 replies; 8+ messages in thread From: Jani Nikula @ 2021-09-08 9:26 UTC (permalink / raw) To: Dave Airlie, intel-gfx; +Cc: Dave Airlie On Wed, 08 Sep 2021, Dave Airlie <airlied@gmail.com> wrote: > From: Dave Airlie <airlied@redhat.com> > > constify it while here. drop the put function since it was never > overloaded and always has done the same thing, no point in > indirecting it for show. > > Signed-off-by: Dave Airlie <airlied@redhat.com> > --- > drivers/gpu/drm/i915/intel_uncore.c | 62 +++++++++++++++-------------- > drivers/gpu/drm/i915/intel_uncore.h | 7 ++-- > 2 files changed, 36 insertions(+), 33 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c > index 6b38bc2811c1..d0bbfc320604 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.c > +++ b/drivers/gpu/drm/i915/intel_uncore.c > @@ -396,7 +396,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) > > GEM_BUG_ON(!domain->wake_count); > if (--domain->wake_count == 0) > - uncore->funcs.force_wake_put(uncore, domain->mask); > + fw_domains_put(uncore, domain->mask); > > spin_unlock_irqrestore(&uncore->lock, irqflags); > > @@ -454,7 +454,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) > > fw = uncore->fw_domains_active; > if (fw) > - uncore->funcs.force_wake_put(uncore, fw); > + fw_domains_put(uncore, fw); I kind of dislike the asymmetry of get remaining a vfunc and put being called directly in code. How about making fw_domains_get() a thin wrapper that calls the appropriate vfunc? Something like this, incorporated into your series: --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -248,7 +248,7 @@ fw_domain_put(const struct intel_uncore_forcewake_domain *d) } static void -fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +fw_domains_get_normal(struct intel_uncore *uncore, enum forcewake_domains fw_domains) { struct intel_uncore_forcewake_domain *d; unsigned int tmp; @@ -266,6 +266,12 @@ fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) uncore->fw_domains_active |= fw_domains; } +static void +fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains fw_domains) +{ + uncore->funcs.force_wake_get(uncore, fw_domains); +} + static void fw_domains_get_with_fallback(struct intel_uncore *uncore, enum forcewake_domains fw_domains) @@ -340,7 +346,7 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore) static void fw_domains_get_with_thread_status(struct intel_uncore *uncore, enum forcewake_domains fw_domains) { - fw_domains_get(uncore, fw_domains); + fw_domains_get_normal(uncore, fw_domains); /* WaRsForcewakeWaitTC0:snb,ivb,hsw,bdw,vlv */ __gen6_gt_wait_for_thread_c0(uncore); @@ -1893,7 +1899,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9); } else if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) { - uncore->funcs.force_wake_get = fw_domains_get; + uncore->funcs.force_wake_get = fw_domains_get_normal; uncore->funcs.force_wake_put = fw_domains_put; fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, FORCEWAKE_VLV, FORCEWAKE_ACK_VLV); The call sites will look nice and symmetrical, and the compiler will inline the call away. Other than that, and the fact that this fails to apply and thus doesn't give us CI results, Reviewed-by: Jani Nikula <jani.nikula@intel.com> > > fw_domains_reset(uncore, uncore->fw_domains); > assert_forcewakes_inactive(uncore); > @@ -562,7 +562,7 @@ static void forcewake_early_sanitize(struct intel_uncore *uncore, > intel_uncore_forcewake_reset(uncore); > if (restore_forcewake) { > spin_lock_irq(&uncore->lock); > - uncore->funcs.force_wake_get(uncore, restore_forcewake); > + uncore->fw_get_funcs->force_wake_get(uncore, restore_forcewake); > > if (intel_uncore_has_fifo(uncore)) > uncore->fifo_count = fifo_free_entries(uncore); > @@ -623,7 +623,7 @@ static void __intel_uncore_forcewake_get(struct intel_uncore *uncore, > } > > if (fw_domains) > - uncore->funcs.force_wake_get(uncore, fw_domains); > + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); > } > > /** > @@ -644,7 +644,7 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, > { > unsigned long irqflags; > > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > assert_rpm_wakelock_held(uncore->rpm); > @@ -711,7 +711,7 @@ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, > { > lockdep_assert_held(&uncore->lock); > > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > __intel_uncore_forcewake_get(uncore, fw_domains); > @@ -733,7 +733,7 @@ static void __intel_uncore_forcewake_put(struct intel_uncore *uncore, > continue; > } > > - uncore->funcs.force_wake_put(uncore, domain->mask); > + fw_domains_put(uncore, domain->mask); > } > } > > @@ -750,7 +750,7 @@ void intel_uncore_forcewake_put(struct intel_uncore *uncore, > { > unsigned long irqflags; > > - if (!uncore->funcs.force_wake_put) > + if (!uncore->fw_get_funcs) > return; > > spin_lock_irqsave(&uncore->lock, irqflags); > @@ -769,7 +769,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore *uncore, > struct intel_uncore_forcewake_domain *domain; > unsigned int tmp; > > - if (!uncore->funcs.force_wake_put) > + if (!uncore->fw_get_funcs) > return; > > fw_domains &= uncore->fw_domains; > @@ -793,7 +793,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, > { > lockdep_assert_held(&uncore->lock); > > - if (!uncore->funcs.force_wake_put) > + if (!uncore->fw_get_funcs) > return; > > __intel_uncore_forcewake_put(uncore, fw_domains); > @@ -801,7 +801,7 @@ void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, > > void assert_forcewakes_inactive(struct intel_uncore *uncore) > { > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > drm_WARN(&uncore->i915->drm, uncore->fw_domains_active, > @@ -818,7 +818,7 @@ void assert_forcewakes_active(struct intel_uncore *uncore, > if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)) > return; > > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > spin_lock_irq(&uncore->lock); > @@ -1605,7 +1605,7 @@ static noinline void ___force_wake_auto(struct intel_uncore *uncore, > for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) > fw_domain_arm_timer(domain); > > - uncore->funcs.force_wake_get(uncore, fw_domains); > + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); > } > > static inline void __force_wake_auto(struct intel_uncore *uncore, > @@ -1866,6 +1866,18 @@ static void intel_uncore_fw_domains_fini(struct intel_uncore *uncore) > fw_domain_fini(uncore, d->id); > } > > +static const struct intel_uncore_fw_get uncore_get_fallback = { > + .force_wake_get = fw_domains_get_with_fallback > +}; > + > +static const struct intel_uncore_fw_get uncore_get_normal = { > + .force_wake_get = fw_domains_get > +}; > + > +static const struct intel_uncore_fw_get uncore_get_thread_status = { > + .force_wake_get = fw_domains_get_with_thread_status > +}; > + > static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > { > struct drm_i915_private *i915 = uncore->i915; > @@ -1881,8 +1893,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > intel_engine_mask_t emask = INTEL_INFO(i915)->platform_engine_mask; > int i; > > - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_fallback; > fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, > FORCEWAKE_RENDER_GEN9, > FORCEWAKE_ACK_RENDER_GEN9); > @@ -1907,8 +1918,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > FORCEWAKE_ACK_MEDIA_VEBOX_GEN11(i)); > } > } else if (IS_GRAPHICS_VER(i915, 9, 10)) { > - uncore->funcs.force_wake_get = fw_domains_get_with_fallback; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_fallback; > fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, > FORCEWAKE_RENDER_GEN9, > FORCEWAKE_ACK_RENDER_GEN9); > @@ -1918,16 +1928,13 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, > FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9); > } else if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) { > - uncore->funcs.force_wake_get = fw_domains_get; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_normal; > fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, > FORCEWAKE_VLV, FORCEWAKE_ACK_VLV); > fw_domain_init(uncore, FW_DOMAIN_ID_MEDIA, > FORCEWAKE_MEDIA_VLV, FORCEWAKE_ACK_MEDIA_VLV); > } else if (IS_HASWELL(i915) || IS_BROADWELL(i915)) { > - uncore->funcs.force_wake_get = > - fw_domains_get_with_thread_status; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_thread_status; > fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, > FORCEWAKE_MT, FORCEWAKE_ACK_HSW); > } else if (IS_IVYBRIDGE(i915)) { > @@ -1942,9 +1949,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > * (correctly) interpreted by the test below as MT > * forcewake being disabled. > */ > - uncore->funcs.force_wake_get = > - fw_domains_get_with_thread_status; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_thread_status; > > /* We need to init first for ECOBUS access and then > * determine later if we want to reinit, in case of MT access is > @@ -1975,9 +1980,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) > FORCEWAKE, FORCEWAKE_ACK); > } > } else if (GRAPHICS_VER(i915) == 6) { > - uncore->funcs.force_wake_get = > - fw_domains_get_with_thread_status; > - uncore->funcs.force_wake_put = fw_domains_put; > + uncore->fw_get_funcs = &uncore_get_thread_status; > fw_domain_init(uncore, FW_DOMAIN_ID_RENDER, > FORCEWAKE, FORCEWAKE_ACK); > } > @@ -2186,8 +2189,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore) > } > > /* make sure fw funcs are set if and only if we have fw*/ > - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_get); > - GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.force_wake_put); > + GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->fw_get_funcs); > GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.read_fw_domains); > GEM_BUG_ON(intel_uncore_has_forcewake(uncore) != !!uncore->funcs.write_fw_domains); > > diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h > index 3c0b0a8b5250..1a7448f5f16f 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.h > +++ b/drivers/gpu/drm/i915/intel_uncore.h > @@ -84,12 +84,12 @@ enum forcewake_domains { > FORCEWAKE_ALL = BIT(FW_DOMAIN_ID_COUNT) - 1, > }; > > -struct intel_uncore_funcs { > +struct intel_uncore_fw_get { > void (*force_wake_get)(struct intel_uncore *uncore, > enum forcewake_domains domains); > - void (*force_wake_put)(struct intel_uncore *uncore, > - enum forcewake_domains domains); > +}; > > +struct intel_uncore_funcs { > enum forcewake_domains (*read_fw_domains)(struct intel_uncore *uncore, > i915_reg_t r); > enum forcewake_domains (*write_fw_domains)(struct intel_uncore *uncore, > @@ -137,6 +137,7 @@ struct intel_uncore { > unsigned int fw_domains_table_entries; > > struct notifier_block pmic_bus_access_nb; > + const struct intel_uncore_fw_get *fw_get_funcs; > struct intel_uncore_funcs funcs; > > unsigned int fifo_count; -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-09-09 5:00 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-09-09 3:07 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 2021-09-09 3:07 ` [Intel-gfx] [PATCH 2/2] drm/i915/uncore: constify the register vtables. (v2) Dave Airlie 2021-09-09 3:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for i915/uncore: constify the uncore vtables. (rev3) Patchwork 2021-09-09 5:00 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2021-09-09 2:34 [Intel-gfx] i915/uncore: constify the uncore vtables. (v2) Dave Airlie 2021-09-09 2:34 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 2021-09-08 4:45 [Intel-gfx] [PATCH 0/2] i915/uncore: constify the uncore vtables Dave Airlie 2021-09-08 4:45 ` [Intel-gfx] [PATCH 1/2] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie 2021-09-08 9:26 ` Jani Nikula
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox