@@ -5535,12 +5535,20 @@ static inline void guc_log_context(struct drm_printer *p,
5535
5535
{
5536
5536
drm_printf (p , "GuC lrc descriptor %u:\n" , ce -> guc_id .id );
5537
5537
drm_printf (p , "\tHW Context Desc: 0x%08x\n" , ce -> lrc .lrca );
5538
- drm_printf (p , "\t\tLRC Head: Internal %u, Memory %u\n" ,
5539
- ce -> ring -> head ,
5540
- ce -> lrc_reg_state [CTX_RING_HEAD ]);
5541
- drm_printf (p , "\t\tLRC Tail: Internal %u, Memory %u\n" ,
5542
- ce -> ring -> tail ,
5543
- ce -> lrc_reg_state [CTX_RING_TAIL ]);
5538
+ if (intel_context_pin_if_active (ce )) {
5539
+ drm_printf (p , "\t\tLRC Head: Internal %u, Memory %u\n" ,
5540
+ ce -> ring -> head ,
5541
+ ce -> lrc_reg_state [CTX_RING_HEAD ]);
5542
+ drm_printf (p , "\t\tLRC Tail: Internal %u, Memory %u\n" ,
5543
+ ce -> ring -> tail ,
5544
+ ce -> lrc_reg_state [CTX_RING_TAIL ]);
5545
+ intel_context_unpin (ce );
5546
+ } else {
5547
+ drm_printf (p , "\t\tLRC Head: Internal %u, Memory not pinned\n" ,
5548
+ ce -> ring -> head );
5549
+ drm_printf (p , "\t\tLRC Tail: Internal %u, Memory not pinned\n" ,
5550
+ ce -> ring -> tail );
5551
+ }
5544
5552
drm_printf (p , "\t\tContext Pin Count: %u\n" ,
5545
5553
atomic_read (& ce -> pin_count ));
5546
5554
drm_printf (p , "\t\tGuC ID Ref Count: %u\n" ,
0 commit comments