Skip to content
Permalink
Browse files
drm/i915/guc: Don't check CT descriptor status before CT write / read
Don't check CT descriptor status, unless CONFIG_DRM_I915_DEBUG_GUC is
set, before CT write / read as this could result in a read across the
PCIe bus thus adding latency to every CT write / read. On well behavied
systems this vaue should always read as zero. For some reason it doesn't
the CT channel is broken and will eventually recover from a GT reset,
albeit the GT reset will not be triggered immediately by seeing that
descriptor status is non-zero.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
  • Loading branch information
mbrost05 authored and intel-lab-lkp committed Jan 20, 2022
1 parent e26602b commit 0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
Showing 1 changed file with 4 additions and 0 deletions.
@@ -398,8 +398,10 @@ static int ct_write(struct intel_guc_ct *ct,
u32 *cmds = ctb->cmds;
unsigned int i;

#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
#endif

GEM_BUG_ON(tail > size);

@@ -820,8 +822,10 @@ static int ct_read(struct intel_guc_ct *ct, struct ct_incoming_msg **msg)
if (unlikely(ctb->broken))
return -EPIPE;

#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
#endif

GEM_BUG_ON(head > size);

0 comments on commit 0311a8b

Please sign in to comment.