Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: matthew.d.roper@intel.com
Subject: [PATCH 0/4] Stop accessing display TIMESTAMP_OVERRIDE in GT code
Date: Thu, 20 Feb 2025 16:38:44 -0800	[thread overview]
Message-ID: <20250221003843.443559-6-matthew.d.roper@intel.com> (raw)

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(-)

-- 
2.48.1


             reply	other threads:[~2025-02-21  0:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21  0:38 Matt Roper [this message]
2025-02-21  0:38 ` [PATCH 1/4] drm/i915/display: Make refclk fetching logic reusable Matt Roper
2025-02-24  9:13   ` Jani Nikula
2025-02-24 13:31   ` Vivekanandan, Balasubramani
2025-02-21  0:38 ` [PATCH 2/4] drm/i915/gt: Replace TIMESTAMP_OVERRIDE readout Matt Roper
2025-02-24 13:55   ` Vivekanandan, Balasubramani
2025-02-21  0:38 ` [PATCH 3/4] drm/xe: Drop usage of TIMESTAMP_OVERRIDE Matt Roper
2025-02-21  3:35   ` Lucas De Marchi
2025-02-21  4:25   ` kernel test robot
2025-02-24 14:13   ` Vivekanandan, Balasubramani
2025-02-21  0:38 ` [PATCH 4/4] drm/xe/sriov: Drop TIMESTAMP_OVERRIDE from Xe2 runtime regs Matt Roper
2025-02-21  2:00 ` ✗ Fi.CI.SPARSE: warning for Stop accessing display TIMESTAMP_OVERRIDE in GT code Patchwork
2025-02-21  2:20 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-21  4:17 ` ✗ i915.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250221003843.443559-6-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox