Skip to content

drm/i915: Bug fixes to ring 'head' updating

Dave Gordon intel-gfx 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesIn review
  2. v11 patch 8 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/i915: Check for matching ringbuffer in logical_ring_wait_request()drivers/gpu/drm/i915/intel_lrc.c+10 -01 reply
2/3drm/i915: Don't read 'HEAD' MMIO register in LRC modedrivers/gpu/drm/i915/intel_lrc.c+0 -11 reply
3/3drm/i915: Consolidate ring freespace calculationsdrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_lrc.c drivers/gpu/drm/i915/intel_ringbuffer.c +1 more+37 -455 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDeepak S
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] drm/i915: Bug fixes to ring 'head' updating

Fixes to both the LRC and the legacy ringbuffer code to correctly calculate and update the available space in a ring.

The logical ring code was updating the software ring 'head' value by reading the hardware 'HEAD' register. In LRC mode, this is not valid as the hardware is not necessarily executing the same context that is being processed by the software. Thus reading the h/w HEAD could put an unrelated (undefined, effectively random) value into the s/w 'head' -- A Bad Thing for the free space calculations.

In addition, the old code could update a ringbuffer's 'head' value from the 'last_retired_head' even when the latter hadn't been recently updated and therefore had a value of -1; this would also confuse the freespace calculations. Now, we consume 'last_retired_head' in just one place, ensuring that this confusion does not arise.

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx