From: Jani Nikula <jani.nikula@linux.intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Maarten Lankhorst <dev@lankhorst.se>
Subject: Re: [PATCH] drm/i915/display: Use drm_crtc_vblank_count in intel_crtc_get_vblank_counter()
Date: Mon, 04 Aug 2025 17:46:47 +0300 [thread overview]
Message-ID: <b4ee66fec61e424ae94024ba297b49e7586639d9@intel.com> (raw)
In-Reply-To: <20250724122616.1111673-1-dev@lankhorst.se>
On Thu, 24 Jul 2025, Maarten Lankhorst <dev@lankhorst.se> wrote:
> drm_crtc_accurate_vblank_count takes a spinlock, which we should avoid
> in tracepoints and debug functions.
>
> This also prevents taking the spinlock 2x during the critical
> section of pipe updates.
Don't we have vblank->max_vblank_count != 0 in most cases, and don't we
want accuracy in the rest of the cases?
The commit message should explain why it's okay to make this change.
BR,
Jani.
>
> Link: https://lore.kernel.org/r/20250715101636.906092-9-dev@lankhorst.se
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
> ---
> drivers/gpu/drm/i915/display/intel_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
> index dbdc4d9b2a33c..65a57cadfa3bf 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -85,7 +85,7 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)
> return 0;
>
> if (!vblank->max_vblank_count)
> - return (u32)drm_crtc_accurate_vblank_count(&crtc->base);
> + return (u32)drm_crtc_vblank_count(&crtc->base);
>
> return crtc->base.funcs->get_vblank_counter(&crtc->base);
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-08-04 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 12:26 [PATCH] drm/i915/display: Use drm_crtc_vblank_count in intel_crtc_get_vblank_counter() Maarten Lankhorst
2025-07-24 12:57 ` ✓ CI.KUnit: success for " Patchwork
2025-07-24 13:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-24 14:50 ` ✓ i915.CI.BAT: " Patchwork
2025-07-24 14:55 ` ✓ Xe.CI.Full: " Patchwork
2025-07-24 17:22 ` ✗ i915.CI.Full: failure " Patchwork
2025-08-04 14:46 ` Jani Nikula [this message]
2025-08-04 15:34 ` [PATCH] " Maarten Lankhorst
2025-08-04 15:58 ` Jani Nikula
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=b4ee66fec61e424ae94024ba297b49e7586639d9@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dev@lankhorst.se \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.