From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com,
gustavo.sousa@intel.com, jani.nikula@intel.com
Subject: Re: [PATCH] drm/i915/display: Use PIPEDMC_FRMTMSTMP on display ver >= 30
Date: Mon, 18 May 2026 17:17:59 +0300 [thread overview]
Message-ID: <agsflxLSJ-nmCu7I@intel.com> (raw)
In-Reply-To: <20260515161056.1007030-1-suraj.kandpal@intel.com>
On Fri, May 15, 2026 at 09:40:56PM +0530, Suraj Kandpal wrote:
> Starting with display version 30, the per-pipe frame timestamp is read
> from the PIPEDMC register block (PIPEDMC_FRMTMSTMP) instead of the
> legacy PIPE_FRMTMSTMP MMIO. Extend PIPE_FRMTMSTMP() to take the display
> and select the appropriate register based on DISPLAY_VER(), and update
> all callers intel_vblank accordingly.
>
> Bspec: 79482
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> v1 -> v2:
> - Define registers in correct location (Jani)
> - Use the intel_display_wa() helper to select the correct register (Gustavo)
> - Fix early vblank timeout issue when DMC is not loaded
>
> .../gpu/drm/i915/display/intel_display_wa.c | 2 ++
> .../gpu/drm/i915/display/intel_display_wa.h | 1 +
> drivers/gpu/drm/i915/display/intel_dmc_regs.h | 6 ++++++
> drivers/gpu/drm/i915/display/intel_vblank.c | 18 ++++++++++++++----
> 4 files changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c
> index 7d3d63a59882..44c2a503c911 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c
> @@ -110,6 +110,8 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
> return DISPLAY_VERx100(display) == 3000 ||
> DISPLAY_VERx100(display) == 2000 ||
> DISPLAY_VERx100(display) == 1401;
> + case INTEL_DISPLAY_WA_14022946399:
> + return DISPLAY_VER(display) >= 30;
According to bspec PIPEDMC_FRMTMSTMP shouldn't even exist on PTL.
Did you actually check that the register works?
And I believe the hw register corruption issue being addressed by
w/a 14022946399 (also applies to LNL) should anyway be fixed on the
platforms that have PIPEDMC_FRMTMSTMP so this w/a stuff here makes
no sense.
> case INTEL_DISPLAY_WA_14025769978:
> return DISPLAY_VER(display) == 35;
> case INTEL_DISPLAY_WA_15013987218:
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h
> index 15fec843f15e..884463a894c8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h
> @@ -42,6 +42,7 @@ enum intel_display_wa {
> INTEL_DISPLAY_WA_14014143976,
> INTEL_DISPLAY_WA_14016740474,
> INTEL_DISPLAY_WA_14020863754,
> + INTEL_DISPLAY_WA_14022946399,
> INTEL_DISPLAY_WA_14025769978,
> INTEL_DISPLAY_WA_15013987218,
> INTEL_DISPLAY_WA_15018326506,
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc_regs.h b/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> index 38e342b45af0..985642a79a52 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_dmc_regs.h
> @@ -644,4 +644,10 @@ enum pipedmc_event_id {
> #define _PIPEDMC_DCB_BALANCE_RESET_B 0x986a8
> #define PIPEDMC_DCB_BALANCE_RESET(pipe) _MMIO_PIPE(pipe, _PIPEDMC_DCB_BALANCE_RESET_A,\
> _PIPEDMC_DCB_BALANCE_RESET_B)
> +
> +#define _PIPEDMC_FRMTMSTMP_A 0x5f0ac
> +#define _PIPEDMC_FRMTMSTMP_B 0x5f4ac
> +#define PIPEDMC_FRMTMSTMP(pipe) \
> + _MMIO_PIPE(pipe, _PIPEDMC_FRMTMSTMP_A, _PIPEDMC_FRMTMSTMP_B)
> +
> #endif /* __INTEL_DMC_REGS_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c
> index 28d81199792e..145c342f445f 100644
> --- a/drivers/gpu/drm/i915/display/intel_vblank.c
> +++ b/drivers/gpu/drm/i915/display/intel_vblank.c
> @@ -15,6 +15,8 @@
> #include "intel_display_regs.h"
> #include "intel_display_types.h"
> #include "intel_display_utils.h"
> +#include "intel_display_wa.h"
> +#include "intel_dmc_regs.h"
> #include "intel_vblank.h"
> #include "intel_vrr.h"
>
> @@ -156,8 +158,12 @@ static u32 intel_crtc_scanlines_since_frame_timestamp(struct intel_crtc *crtc)
> * pipe frame time stamp. The time stamp value
> * is sampled at every start of vertical blank.
> */
> - scan_prev_time = intel_de_read_fw(display,
> - PIPE_FRMTMSTMP(crtc->pipe));
> + if (intel_display_wa(display, INTEL_DISPLAY_WA_14022946399))
> + scan_prev_time = intel_de_read_fw(display,
> + PIPEDMC_FRMTMSTMP(crtc->pipe));
> + else
> + scan_prev_time = intel_de_read_fw(display,
> + PIPE_FRMTMSTMP(crtc->pipe));
>
> /*
> * The TIMESTAMP_CTR register has the current
> @@ -165,8 +171,12 @@ static u32 intel_crtc_scanlines_since_frame_timestamp(struct intel_crtc *crtc)
> */
> scan_curr_time = intel_de_read_fw(display, IVB_TIMESTAMP_CTR);
>
> - scan_post_time = intel_de_read_fw(display,
> - PIPE_FRMTMSTMP(crtc->pipe));
> + if (intel_display_wa(display, INTEL_DISPLAY_WA_14022946399))
> + scan_post_time = intel_de_read_fw(display,
> + PIPEDMC_FRMTMSTMP(crtc->pipe));
> + else
> + scan_post_time = intel_de_read_fw(display,
> + PIPE_FRMTMSTMP(crtc->pipe));
> } while (scan_post_time != scan_prev_time);
>
> return div_u64(mul_u32_u32(scan_curr_time - scan_prev_time,
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-05-18 14:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 15:53 [PATCH] Revert "drm/i915/backlight: Remove try_vesa_interface" Suraj Kandpal
2026-05-15 16:00 ` ✓ CI.KUnit: success for " Patchwork
2026-05-15 16:10 ` [PATCH] drm/i915/display: Use PIPEDMC_FRMTMSTMP on display ver >= 30 Suraj Kandpal
2026-05-18 14:17 ` Ville Syrjälä [this message]
2026-05-19 2:33 ` Kandpal, Suraj
2026-05-19 12:02 ` Ville Syrjälä
2026-05-15 16:52 ` ✓ Xe.CI.BAT: success for Revert "drm/i915/backlight: Remove try_vesa_interface" Patchwork
2026-05-15 17:19 ` ✓ CI.KUnit: success for Revert "drm/i915/backlight: Remove try_vesa_interface" (rev2) Patchwork
2026-05-15 17:57 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-16 8:16 ` ✓ Xe.CI.FULL: " Patchwork
2026-05-17 2:47 ` [PATCH] Revert "drm/i915/backlight: Remove try_vesa_interface" Suraj Kandpal
2026-05-20 8:08 ` Nautiyal, Ankit K
2026-05-20 8:26 ` Jani Nikula
2026-05-17 3:50 ` ✓ CI.KUnit: success for Revert "drm/i915/backlight: Remove try_vesa_interface" (rev3) Patchwork
2026-05-17 4:30 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-17 5:49 ` ✗ Xe.CI.FULL: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-05-15 8:24 [PATCH] drm/i915/display: Use PIPEDMC_FRMTMSTMP on display ver >= 30 Suraj Kandpal
2026-05-15 10:21 ` Jani Nikula
2026-05-15 15:04 ` Kandpal, Suraj
2026-05-15 14:55 ` Gustavo Sousa
2026-05-15 15:07 ` Kandpal, Suraj
2026-05-17 2:45 ` Suraj Kandpal
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=agsflxLSJ-nmCu7I@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=suraj.kandpal@intel.com \
/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