drm/i915/uncore: Use GT message helpers in uncore
Subsystems (2)
PATCH v4 1/1 drm/i915/uncore: Use GT message helpers in uncore
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error message helpers so as to get the GT index in the prints.
--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +63 -70
@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h"
@@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }
@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }
@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }
@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }
@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,
@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }
@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }
@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)
@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );
@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }
@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;
@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,
@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake
@@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }
@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }
@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))
@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }
@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void
@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;
@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }
@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );
@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)
@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }
@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }
@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }
@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the
@@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );
@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }
@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);
@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;
@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;
@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Signature · 1 line
2.39.1
This is actually v1 not v4. Not sure how that crept in!
John.
Quoted 381 lines · On 1/24/2023 12:54, [email protected] wrote:
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error message helpers so as to get the GT index in the prints.
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)drivers/gpu/drm/i915/intel_uncore.c +63
-70@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h" @@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake @@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the @@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/uncore: Use GT message helpers in uncore
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915/uncore: Use GT message helpers in uncore
URL : https://patchwork.freedesktop.org/series/113288/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12630 -> Patchwork_113288v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/index.html
Participating hosts (36 -> 39)
------------------------------
Additional (4): fi-bsw-kefka fi-hsw-4770 bat-atsm-1 fi-tgl-dsi
Missing (1): bat-rpls-2
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_113288v1:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_pm_rpm@module-reload:
- {bat-adlp-6}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/bat-adlp-6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/bat-adlp-6/igt@[email protected]
* igt@i915_selftest@live@gt_lrc:
- {fi-tgl-dsi}: NOTRUN -> [INCOMPLETE][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-tgl-dsi/igt@i915_selftest@live@gt_lrc.html
* igt@i915_selftest@live@reset:
- {bat-rpls-1}: NOTRUN -> [DMESG-FAIL][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/bat-rpls-1/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_113288v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [PASS][5] -> [FAIL][6] ([i915#7229])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/fi-pnv-d510/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-pnv-d510/igt@[email protected]
* igt@i915_module_load@reload:
- fi-kbl-soraka: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/fi-kbl-soraka/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-kbl-soraka/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: [PASS][9] -> [INCOMPLETE][10] ([i915#7156])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/fi-kbl-soraka/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-kbl-soraka/igt@i915_selftest@[email protected]
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-hsw-4770: NOTRUN -> [SKIP][11] ([fdo#109271]) +20 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-hsw-4770/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-n3050: [PASS][12] -> [FAIL][13] ([i915#6298])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
* igt@kms_psr@sprite_plane_onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#1072]) +3 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html
* igt@prime_vgem@basic-fence-flip:
- fi-bsw-kefka: NOTRUN -> [SKIP][15] ([fdo#109271]) +26 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/fi-bsw-kefka/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [INCOMPLETE][16] ([i915#4983] / [i915#6257]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/bat-rpls-1/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/bat-rpls-1/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
[i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
[i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
[i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
[i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7156]: https://gitlab.freedesktop.org/drm/intel/issues/7156
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
Build changes
-------------
* Linux: CI_DRM_12630 -> Patchwork_113288v1
CI-20190529: 20190529
CI_DRM_12630: 49bd4c650125827fdfc0bc1d319d10da87aedf95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7136: 31b6af91747ad8c705399c9006cdb81cb1864146 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113288v1: 49bd4c650125827fdfc0bc1d319d10da87aedf95 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
b9ec6b9530a7 drm/i915/uncore: Use GT message helpers in uncore
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/index.html
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/uncore: Use GT message helpers in uncore
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915/uncore: Use GT message helpers in uncore
URL : https://patchwork.freedesktop.org/series/113288/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12630_full -> Patchwork_113288v1_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/index.html
Participating hosts (13 -> 10)
------------------------------
Missing (3): shard-rkl0 pig-kbl-iris pig-skl-6260u
Known issues
------------
Here are the changes found in Patchwork_113288v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gen9_exec_parse@allowed-single:
- shard-glk: [PASS][1] -> [DMESG-WARN][2] ([i915#5566] / [i915#716])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-glk9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-glk7/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a1:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#79])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-glk8/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-glk5/igt@kms_flip@[email protected]
* igt@runner@aborted:
- shard-glk: NOTRUN -> [FAIL][5] ([i915#4312])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-glk7/igt@[email protected]
#### Possible fixes ####
* igt@gem_eio@suspend:
- {shard-rkl}: [FAIL][6] ([i915#7052]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-3/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-1/igt@[email protected]
* igt@gem_exec_fair@basic-pace@vecs0:
- shard-glk: [FAIL][8] ([i915#2842]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-glk7/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-glk4/igt@gem_exec_fair@[email protected]
* igt@i915_pm_rpm@dpms-lpsp:
- {shard-rkl}: [SKIP][10] ([i915#1397]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-2/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@[email protected]
* igt@i915_suspend@fence-restore-tiled2untiled:
- {shard-rkl}: [FAIL][12] ([fdo#103375]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-3/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-2/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-blt:
- {shard-rkl}: [SKIP][14] ([i915#1849] / [i915#4098]) -> [PASS][15] +11 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-3/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@[email protected]
* igt@kms_plane@plane-position-covered@pipe-a-planes:
- {shard-rkl}: [SKIP][16] ([i915#1849]) -> [PASS][17] +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-2/igt@kms_plane@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@kms_plane@[email protected]
* igt@kms_psr@sprite_mmap_gtt:
- {shard-rkl}: [SKIP][18] ([i915#1072]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-2/igt@kms_psr@sprite_mmap_gtt.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@kms_psr@sprite_mmap_gtt.html
* igt@kms_rotation_crc@exhaust-fences:
- {shard-rkl}: [SKIP][20] ([i915#1845] / [i915#4098]) -> [PASS][21] +20 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@[email protected]
* igt@kms_universal_plane@universal-plane-pipe-a-sanity:
- {shard-rkl}: [SKIP][22] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-2/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- {shard-rkl}: [SKIP][24] ([fdo#109295] / [i915#3708] / [i915#4098]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-rkl-3/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-rkl-6/igt@[email protected]
#### Warnings ####
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][26] ([i915#2842]) -> [FAIL][27] ([i915#2876])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12630/shard-glk2/igt@gem_exec_fair@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/shard-glk4/igt@gem_exec_fair@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2232]: https://gitlab.freedesktop.org/drm/intel/issues/2232
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2876]: https://gitlab.freedesktop.org/drm/intel/issues/2876
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3810]: https://gitlab.freedesktop.org/drm/intel/issues/3810
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4275]: https://gitlab.freedesktop.org/drm/intel/issues/4275
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4877]: https://gitlab.freedesktop.org/drm/intel/issues/4877
[i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879
[i915#5030]: https://gitlab.freedesktop.org/drm/intel/issues/5030
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
[i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Build changes
-------------
* Linux: CI_DRM_12630 -> Patchwork_113288v1
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_12630: 49bd4c650125827fdfc0bc1d319d10da87aedf95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7136: 31b6af91747ad8c705399c9006cdb81cb1864146 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113288v1: 49bd4c650125827fdfc0bc1d319d10da87aedf95 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113288v1/index.html
Quoted 4 lines · On 24/01/2023 20:54, [email protected] wrote:
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error message helpers so as to get the GT index in the prints.
Conversion looks good to me and on balance it's better to include the origin in logs even for messages which strictly are not GT related, than not to have the origin at all (intel_de_... helpers, I *think*).
I'll just add Jani and Matt in case they have a different opinion.
Regards,
Tvrtko
Quoted 376 lines
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)drivers/gpu/drm/i915/intel_uncore.c +63
-70@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h" @@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake @@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the @@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Quoted 5 lines · Tvrtko Ursulin
Quoted 3 lines · On 24/01/2023 20:54, [email protected] wrote:
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error
That's not really true; uncore should be outside the GT since it's used for all kinds of non-GT stuff as well (sgunit, display, etc.). I believe "uncore" is just an old-fashioned name for what modern docs refer to as "system agent" these days.
Granted, our i915 design does stretch the truth quite a bit today by rolling some of the GT-specific concepts into the uncore code (GT forcewake/shadowing, GSI offset, etc.). Having two intel_uncore structures on a platform like MTL doesn't really match the hardware reality at the lowest levels, but allows us to update the software for these new platforms without major, intrusive changes for all platforms.
I feel like including 'gt' information in log messages unrelated to GT might be confusing. For display stuff it's probably obvious that the GT information is bogus, but when stuff is related to the sgunit it won't always be so obvious.
Matt
Quoted 340 lines
Quoted 1 line
message helpers so as to get the GT index in the prints.
Conversion looks good to me and on balance it's better to include the origin in logs even for messages which strictly are not GT related, than not to have the origin at all (
intel_de_... helpers, I *think*).Reviewed-by Tvrtko Ursulin <[email protected]>I'll just add Jani and Matt in case they have a different opinion.
Regards,
Tvrtko
Quoted 326 lines
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)drivers/gpu/drm/i915/intel_uncore.c +63
-70@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h" @@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake @@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the @@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
Quoted 19 lines · Matt Roper
Quoted 5 lines · Tvrtko Ursulin
Quoted 3 lines · On 24/01/2023 20:54, [email protected] wrote:
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error
That's not really true; uncore should be outside the GT since it's used for all kinds of non-GT stuff as well (sgunit, display, etc.). I believe "uncore" is just an old-fashioned name for what modern docs refer to as "system agent" these days.
Granted, our i915 design does stretch the truth quite a bit today by rolling some of the GT-specific concepts into the uncore code (GT forcewake/shadowing, GSI offset, etc.). Having two
intel_uncorestructures on a platform like MTL doesn't really match the hardware reality at the lowest levels, but allows us to update the software for these new platforms without major, intrusive changes for all platforms.
Quoted 4 lines
I feel like including 'gt' information in log messages unrelated to GT might be confusing. For display stuff it's probably obvious that the GT information is bogus, but when stuff is related to the sgunit it won't always be so obvious.
Level of confusing vs absence of debugability and a suggested way forward? Just do nothing and accept any forcewake related errors will not include the originating GT?
Regards,
Tvrtko
Quoted 345 lines
Matt
Quoted 340 lines
Quoted 1 line
message helpers so as to get the GT index in the prints.
Conversion looks good to me and on balance it's better to include the origin in logs even for messages which strictly are not GT related, than not to have the origin at all (
intel_de_... helpers, I *think*).Reviewed-by Tvrtko Ursulin <[email protected]>I'll just add Jani and Matt in case they have a different opinion.
Regards,
Tvrtko
Quoted 326 lines
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)drivers/gpu/drm/i915/intel_uncore.c +63
-70@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h" @@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake @@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the @@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Quoted 21 lines · Tvrtko Ursulin
Quoted 19 lines · Matt Roper
Quoted 5 lines · Tvrtko Ursulin
Quoted 3 lines · On 24/01/2023 20:54, [email protected] wrote:
From: John Harrison <[email protected]>
Uncore is really part of the GT. So use the GT specific debug/error
That's not really true; uncore should be outside the GT since it's used for all kinds of non-GT stuff as well (sgunit, display, etc.). I believe "uncore" is just an old-fashioned name for what modern docs refer to as "system agent" these days.
Granted, our i915 design does stretch the truth quite a bit today by rolling some of the GT-specific concepts into the uncore code (GT forcewake/shadowing, GSI offset, etc.). Having two
intel_uncorestructures on a platform like MTL doesn't really match the hardware reality at the lowest levels, but allows us to update the software for these new platforms without major, intrusive changes for all platforms.
Quoted 8 lines
Quoted 4 lines
I feel like including 'gt' information in log messages unrelated to GT might be confusing. For display stuff it's probably obvious that the GT information is bogus, but when stuff is related to the sgunit it won't always be so obvious.
Level of confusing vs absence of debugability and a suggested way forward? Just do nothing and accept any forcewake related errors will not include the originating GT?
I guess it's probably fine to keep it on all messages; people will just learn to ignore the bogus GT stuff on things that aren't actually related to the GT.
It would still be good to change the commit message though so that people doing git archaeology in the future don't get an incorrect understanding of the relationship.
Matt
Quoted 350 lines
Regards,
Tvrtko
Quoted 345 lines
Matt
Quoted 340 lines
Quoted 1 line
message helpers so as to get the GT index in the prints.
Conversion looks good to me and on balance it's better to include the origin in logs even for messages which strictly are not GT related, than not to have the origin at all (
intel_de_... helpers, I *think*).Reviewed-by Tvrtko Ursulin <[email protected]>I'll just add Jani and Matt in case they have a different opinion.
Regards,
Tvrtko
Quoted 326 lines
Signed-off-by John Harrison <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 133 +++++++++++++--------------- 1 file changed, 63 insertions(+), 70 deletions(-)drivers/gpu/drm/i915/intel_uncore.c +63
-70@@ -25,6 +25,7 @@#include <linux/pm_runtime.h> #include "gt/intel_engine_regs.h" +#include "gt/intel_gt_print.h" #include "gt/intel_gt_regs.h" #include "i915_drv.h" @@ -83,8 +84,7 @@ static void mmio_debug_resume(struct intel_uncore *uncore) uncore->debug->unclaimed_mmio_check = uncore->debug->saved_mmio_check;if (check_for_unclaimed_mmio (uncore)) -drm_info (&uncore->i915->drm, -"Invalid mmio detected during user access\n" ); +gt_info (uncore->gt,"Invalid mmio detected during user access\n" );spin_unlock (&uncore->debug->lock); }@@ -179,9 +179,9 @@ static inline void fw_domain_wait_ack_clear(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_clear (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack to clear.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt, +"%s: timed out waiting for forcewake ack to clear.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -228,12 +228,11 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,fw_clear (d,FORCEWAKE_KERNEL_FALLBACK ); }while (!ack_detected && pass++ <10 ); -drm_dbg (&d->uncore->i915->drm, -"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , -intel_uncore_forcewake_domain_to_str (d->id), - type ==ACK_SET ?"set" :"clear" , -fw_ack (d), - pass); +gt_dbg (d->uncore->gt,"%s had to use fallback to %s ack, 0x%x (passes %u)\n" , +intel_uncore_forcewake_domain_to_str (d->id), + type ==ACK_SET ?"set" :"clear" , +fw_ack (d), + pass);return ack_detected ?0 : -ETIMEDOUT ; }@@ -258,9 +257,8 @@ static inline void fw_domain_wait_ack_set(const struct intel_uncore_forcewake_domain *d) {if (wait_ack_set (d,FORCEWAKE_KERNEL )) { -drm_err (&d->uncore->i915->drm, -"%s: timed out waiting for forcewake ack request.\n" , -intel_uncore_forcewake_domain_to_str (d->id)); +gt_err (d->uncore->gt,"%s: timed out waiting for forcewake ack request.\n" , +intel_uncore_forcewake_domain_to_str (d->id));add_taint_for_CI (d->uncore->i915,TAINT_WARN );/* CI now unreliable */ } }@@ -366,9 +364,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore)* w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ -drm_WARN_ONCE (&uncore->i915->drm, -wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), -"GT thread status wait timed out\n" ); +gt_WARN_ONCE (uncore->gt, +wait_for_atomic_us (gt_thread_status (uncore) ==0 ,5000 ), +"GT thread status wait timed out\n" ); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore,@@ -402,8 +400,7 @@ static void __gen6_gt_wait_for_fifo(struct intel_uncore *uncore)if (wait_for_atomic ((n =fifo_free_entries (uncore)) >GT_FIFO_NUM_RESERVED_ENTRIES ,GT_FIFO_TIMEOUT_MS )) { -drm_dbg (&uncore->i915->drm, -"GT_FIFO timeout, entries: %u\n" , n); +gt_dbg (uncore->gt,"GT_FIFO timeout, entries: %u\n" , n);return ; } }@@ -476,7 +473,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)break ;if (--retry_count ==0 ) { -drm_err (&uncore->i915->drm,"Timed out waiting for forcewake timers to finish\n" ); +gt_err (uncore->gt,"Timed out waiting for forcewake timers to finish\n" );break ; }@@ -484,7 +481,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore)cond_resched (); } -drm_WARN_ON (&uncore->i915->drm, active_domains); +gt_WARN_ON (uncore->gt, active_domains); fw = uncore->fw_domains_active;if (fw)@@ -520,8 +517,7 @@ fpga_check_for_unclaimed_mmio(struct intel_uncore *uncore)* to recognize when MMIO accesses are just busted. */ if (unlikely (dbg == ~0 )) -drm_err (&uncore->i915->drm, -"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" ); +gt_err (uncore->gt,"Lost access to MMIO BAR; all registers now read back as 0xFFFFFFFF!\n" );__raw_uncore_write32 (uncore,FPGA_DBG ,FPGA_DBG_RM_NOCLAIM );@@ -550,7 +546,7 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) fifodbg =__raw_uncore_read32 (uncore,GTFIFODBG );if (unlikely (fifodbg)) { -drm_dbg (&uncore->i915->drm,"GTFIFODBG = 0x08%x\n" , fifodbg); +gt_dbg (uncore->gt,"GTFIFODBG = 0x08%x\n" , fifodbg);__raw_uncore_write32 (uncore,GTFIFODBG , fifodbg); }@@ -622,7 +618,7 @@ void intel_uncore_resume_early(struct intel_uncore *uncore)unsigned int restore_forcewake;if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm,"unclaimed mmio detected on resume, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on resume, clearing\n" );if (!intel_uncore_has_forcewake (uncore))return ;@@ -847,9 +843,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)if (!uncore->fw_get_funcs)return ; -drm_WARN (&uncore->i915->drm, uncore->fw_domains_active, -"Expected all fw_domains to be inactive, but %08x are still on\n" , - uncore->fw_domains_active); +gt_WARN (uncore->gt, uncore->fw_domains_active, +"Expected all fw_domains to be inactive, but %08x are still on\n" , + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore,@@ -869,9 +865,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,assert_rpm_wakelock_held (uncore->rpm); fw_domains &= uncore->fw_domains; -drm_WARN (&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, -"Expected %08x fw_domains to be active, but %08x are off\n" , - fw_domains, fw_domains & ~uncore->fw_domains_active); +gt_WARN (uncore->gt, fw_domains & ~uncore->fw_domains_active, +"Expected %08x fw_domains to be active, but %08x are off\n" , + fw_domains, fw_domains & ~uncore->fw_domains_active);/* * Check that the caller has an explicit wakeref and we don't mistake @@ -884,9 +880,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore,if (uncore->fw_domains_timer & domain->mask) expect++;/* pending automatic release */ -if (drm_WARN (&uncore->i915->drm, actual < expect, -"Expected domain %d to be held awake by caller, count=%d\n" , - domain->id, actual)) +if (gt_WARN (uncore->gt, actual < expect, +"Expected domain %d to be held awake by caller, count=%d\n" , + domain->id, actual))break ; }@@ -955,9 +951,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset)if (entry->domains ==FORCEWAKE_ALL )return uncore->fw_domains; -drm_WARN (&uncore->i915->drm, entry->domains & ~uncore->fw_domains, -"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , - entry->domains & ~uncore->fw_domains, offset); +gt_WARN (uncore->gt, entry->domains & ~uncore->fw_domains, +"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n" , + entry->domains & ~uncore->fw_domains, offset);return entry->domains; }@@ -1190,7 +1186,7 @@ static int mmio_range_cmp(u32 key, const struct i915_range *range)static bool is_shadowed (struct intel_uncore *uncore,u32 offset) { -if (drm_WARN_ON (&uncore->i915->drm, !uncore->shadowed_reg_table)) +if (gt_WARN_ON (uncore->gt, !uncore->shadowed_reg_table))return false;if (IS_GSI_REG (offset))@@ -1898,11 +1894,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (drm_WARN(&uncore->i915->drm, - check_for_unclaimed_mmio(uncore), - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (gt_WARN(uncore->gt, + check_for_unclaimed_mmio(uncore), + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg)))/* Only report the first N failures */ uncore->i915->params.mmio_debug--; }@@ -1913,10 +1909,10 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore, const bool read) {if (check_for_unclaimed_mmio (uncore)) -drm_dbg (&uncore->i915->drm, -"Unclaimed access detected before %s register 0x%x\n" , - read ?"read from" :"write to" , -i915_mmio_reg_offset (reg)); +gt_dbg (uncore->gt, +"Unclaimed access detected before %s register 0x%x\n" , + read ?"read from" :"write to" , +i915_mmio_reg_offset (reg)); } static inline void@@ -2201,8 +2197,8 @@ static int __fw_domain_init(struct intel_uncore *uncore,if (!d)return -ENOMEM ; -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_set)); -drm_WARN_ON (&uncore->i915->drm, !i915_mmio_reg_valid (reg_ack)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_set)); +gt_WARN_ON (uncore->gt, !i915_mmio_reg_valid (reg_ack)); d->uncore = uncore; d->wake_count =0 ;@@ -2254,8 +2250,8 @@ static void fw_domain_fini(struct intel_uncore *uncore,return ; uncore->fw_domains &= ~BIT (domain_id); -drm_WARN_ON (&uncore->i915->drm, d->wake_count); -drm_WARN_ON (&uncore->i915->drm,hrtimer_cancel (&d->timer)); +gt_WARN_ON (uncore->gt, d->wake_count); +gt_WARN_ON (uncore->gt,hrtimer_cancel (&d->timer));kfree (d); }@@ -2388,8 +2384,8 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)spin_unlock_irq (&uncore->lock);if (!(ecobus &FORCEWAKE_MT_ENABLE )) { -drm_info (&i915->drm,"No MT forcewake available on Ivybridge, this can result in issues\n" ); -drm_info (&i915->drm,"when using vblank-synced partial screen updates.\n" ); +gt_info (uncore->gt,"No MT forcewake available on Ivybridge, this can result in issues\n" ); +gt_info (uncore->gt,"when using vblank-synced partial screen updates.\n" );fw_domain_fini (uncore,FW_DOMAIN_ID_RENDER );fw_domain_init (uncore,FW_DOMAIN_ID_RENDER ,FORCEWAKE ,FORCEWAKE_ACK );@@ -2403,7 +2399,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore)#undef fw_domain_init/* All future platforms are expected to require complex power gating */ -drm_WARN_ON (&i915->drm, !ret && uncore->fw_domains ==0 ); +gt_WARN_ON (uncore->gt, !ret && uncore->fw_domains ==0 ); out:if (ret)@@ -2487,7 +2483,7 @@ int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) uncore->regs =ioremap (phys_addr, mmio_size);if (uncore->regs ==NULL ) { -drm_err (&i915->drm,"failed to map registers\n" ); +gt_err (uncore->gt,"failed to map registers\n" );return -EIO ; }@@ -2615,7 +2611,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)*/ if (IS_DGFX (i915) && !(__raw_uncore_read32 (uncore,GU_CNTL ) &LMEM_INIT )) { -drm_err (&i915->drm,"LMEM not initialized by firmware\n" ); +gt_err (uncore->gt,"LMEM not initialized by firmware\n" );return -ENODEV ; }@@ -2646,7 +2642,7 @@ int intel_uncore_init_mmio(struct intel_uncore *uncore)/* clear out unclaimed reg detection bit */ if (intel_uncore_unclaimed_mmio (uncore)) -drm_dbg (&i915->drm,"unclaimed mmio detected on uncore init, clearing\n" ); +gt_dbg (uncore->gt,"unclaimed mmio detected on uncore init, clearing\n" );return 0 ; }@@ -2721,11 +2717,10 @@ void intel_uncore_prune_engine_fw_domains(struct intel_uncore *uncore,*/ static void driver_initiated_flr (struct intel_uncore *uncore) { -struct drm_i915_private *i915 = uncore->i915;const unsigned int flr_timeout_ms =3000 ;/* specs recommend a 3s wait */ int ret; -drm_dbg (&i915->drm,"Triggering Driver-FLR\n" ); +gt_dbg (uncore->gt,"Triggering Driver-FLR\n" );/* * Make sure any pending FLR requests have cleared by waiting for the @@ -2738,9 +2733,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)*/ ret =intel_wait_for_register_fw (uncore,GU_CNTL ,DRIVERFLR ,0 , flr_timeout_ms);if (ret) { -drm_err (&i915->drm, -"Failed to wait for Driver-FLR bit to clear! %d\n" , - ret); +gt_err (uncore->gt,"Failed to wait for Driver-FLR bit to clear! %d\n" , ret);return ; }intel_uncore_write_fw (uncore,GU_DEBUG ,DRIVERFLR_STATUS );@@ -2752,7 +2745,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)DRIVERFLR_STATUS ,DRIVERFLR_STATUS , flr_timeout_ms);if (ret) { -drm_err (&i915->drm,"wait for Driver-FLR completion failed! %d\n" , ret); +gt_err (uncore->gt,"wait for Driver-FLR completion failed! %d\n" , ret);return ; }@@ -2911,7 +2904,7 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore) {bool ret = false; -if (drm_WARN_ON (&uncore->i915->drm, !uncore->debug)) +if (gt_WARN_ON (uncore->gt, !uncore->debug))return false;spin_lock_irq (&uncore->debug->lock);@@ -2921,10 +2914,10 @@ intel_uncore_arm_unclaimed_mmio_detection(struct intel_uncore *uncore)if (unlikely (check_for_unclaimed_mmio (uncore))) {if (!uncore->i915->params.mmio_debug) { -drm_dbg (&uncore->i915->drm, -"Unclaimed register detected, " -"enabling oneshot unclaimed register reporting. " -"Please use i915.mmio_debug=N for more information.\n" ); +gt_dbg (uncore->gt, +"Unclaimed register detected, " +"enabling oneshot unclaimed register reporting. " +"Please use i915.mmio_debug=N for more information.\n" ); uncore->i915->params.mmio_debug++; } uncore->debug->unclaimed_mmio_check--;@@ -2957,7 +2950,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, {enum forcewake_domains fw_domains =0 ; -drm_WARN_ON (&uncore->i915->drm, !op); +gt_WARN_ON (uncore->gt, !op);if (!intel_uncore_has_forcewake (uncore))return 0 ;@@ -2968,7 +2961,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,if (op &FW_REG_WRITE ) fw_domains |= uncore->funcs.write_fw_domains (uncore, reg); -drm_WARN_ON (&uncore->i915->drm, fw_domains & ~uncore->fw_domains); +gt_WARN_ON (uncore->gt, fw_domains & ~uncore->fw_domains);return fw_domains; }
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation