Skip to content

Stop accessing display TIMESTAMP_OVERRIDE in GT code

Matt Roper intel-gfx intel-xe oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/i915/display: Make refclk fetching logic reusabledrivers/gpu/drm/i915/display/intel_cdclk.c drivers/gpu/drm/i915/display/intel_cdclk.h+28 -172 replies
2/4drm/i915/gt: Replace TIMESTAMP_OVERRIDE readoutdrivers/gpu/drm/i915/gt/intel_gt_clock_utils.c+9 -221 reply
3/4drm/xe: Drop usage of TIMESTAMP_OVERRIDEdrivers/gpu/drm/xe/display/xe_display.c drivers/gpu/drm/xe/display/xe_display.h drivers/gpu/drm/xe/xe_gt_clock.c+19 -192 replies
4/4drm/xe/sriov: Drop TIMESTAMP_OVERRIDE from Xe2 runtime regsdrivers/gpu/drm/xe/xe_gt_sriov_pf_service.c+0 -10 replies

Reviews trailers per patch

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

PatchMichal WajdeczkoLucas De MarchiBalasubramani Vivekanandan
1/4R-b
2/4R-b
3/4R-b
4/4A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] Stop accessing display TIMESTAMP_OVERRIDE in GT code

When determining the GT command streamer frequency, there are two approaches used by i915 and Xe:

- Derive the CS frequency from the crystal clock frequency register (or a per-platform hardcoded value). This is supposed to be the method usually used (and the only method supported at all for Xe2 and later hardware).

- Set the CS frequency to exactly the display refclk frequency. This is supposedly a rare case, and is used only when a setting in CTC_MODE[0] indicates we should use this approach.

There's little/no documentation in the hardware specs about these approaches (i.e., the display refclk approach is simply referred to as "Broadwell Divide Logic" with no further explanation). It seems most of the logic here was originally inherited from the Windows driver a long time ago and we've just been carrying it forward ever since.

Currently the second approach (use of display reference clock) is accomplished by reading a display debug register (TIMESTAMP_OVERRIDE). Given that the display code already has more straightforward logic for determining display reference clock (either from strap registers, or from a per-platform constant in cases where there's only one possible value), it makes sense to just call the display code to get the frequency rather than doing direct access to the display hardware inside the GT driver.

Matt Roper (4):
drm/i915/display: Make refclk fetching logic reusable drm/i915/gt: Replace TIMESTAMP_OVERRIDE readout drm/xe: Drop usage of TIMESTAMP_OVERRIDE drm/xe/sriov: Drop TIMESTAMP_OVERRIDE from Xe2 runtime regs

 drivers/gpu/drm/i915/display/intel_cdclk.c    | 44 ++++++++++++-------
 drivers/gpu/drm/i915/display/intel_cdclk.h    |  1 +
 .../gpu/drm/i915/gt/intel_gt_clock_utils.c    | 31 ++++---------
 drivers/gpu/drm/xe/display/xe_display.c       |  6 +++
 drivers/gpu/drm/xe/display/xe_display.h       |  4 ++
 drivers/gpu/drm/xe/xe_gt_clock.c              | 28 ++++--------
 drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c   |  1 -
 7 files changed, 56 insertions(+), 59 deletions(-)
Signature · 1 line
2.48.1