From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/i915/vrr: Do not overwrite TRANS_PUSH PSR Frame Change Enable
Date: Thu, 10 Oct 2024 15:06:15 +0300 [thread overview]
Message-ID: <ZwfDN4aqrTjBIk86@intel.com> (raw)
In-Reply-To: <20241010053316.1580527-3-jouni.hogander@intel.com>
On Thu, Oct 10, 2024 at 08:33:11AM +0300, Jouni Högander wrote:
> Currently vrr code is overwriting possibly set PSR PR Frame Change Enable
> bit in TRANS_PUSH register. Avoid this by using rmw instead of write.
RMWs are not good if we ever want to do this from DSB/etc. We should
know what the state should be and just program that in.
Does the PSR bit here have to match the PSR_CTL enable bit or
could we just always set the bit here based on has_psr whether
PSR is currently active or not?
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_vrr.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 9a51f5bac3071..8b4e3f938efea 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -339,8 +339,8 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
> if (!crtc_state->vrr.enable)
> return;
>
> - intel_de_write(display, TRANS_PUSH(display, cpu_transcoder),
> - TRANS_PUSH_EN);
> + intel_de_rmw(display, TRANS_PUSH(display, cpu_transcoder), 0,
> + TRANS_PUSH_EN);
>
> if (HAS_AS_SDP(display))
> intel_de_write(display,
> @@ -371,7 +371,9 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state)
> intel_de_wait_for_clear(display,
> TRANS_VRR_STATUS(display, cpu_transcoder),
> VRR_STATUS_VRR_EN_LIVE, 1000);
> - intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), 0);
> +
> + intel_de_rmw(display, TRANS_PUSH(display, cpu_transcoder), TRANS_PUSH_EN,
> + 0);
>
> if (HAS_AS_SDP(display))
> intel_de_write(display,
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-10-10 12:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 5:33 [PATCH 0/7] Use trans push mechanism to generate frame change event Jouni Högander
2024-10-10 5:33 ` [PATCH 1/7] drm/i915/psr: Add TRANS_PUSH register bit definition for PSR Jouni Högander
2024-10-10 5:33 ` [PATCH 2/7] drm/i915/vrr: Do not overwrite TRANS_PUSH PSR Frame Change Enable Jouni Högander
2024-10-10 12:06 ` Ville Syrjälä [this message]
2024-10-11 10:14 ` Hogander, Jouni
2024-10-10 5:33 ` [PATCH 3/7] drm/i915/vrr: Use TRANS_PUSH mechanism for PSR frame change Jouni Högander
2024-10-10 5:33 ` [PATCH 4/7] drm/i915/psr: Rename psr_force_hw_tracking_exit as psr_force_exit Jouni Högander
2024-10-10 5:33 ` [PATCH 5/7] drm/i915/psr: Simplify frontbuffer invalidate/flush callbacks Jouni Högander
2024-10-10 5:33 ` [PATCH 6/7] drm/i915/psr: Add VRR send push interface for PSR usage Jouni Högander
2024-10-10 8:03 ` Jani Nikula
2024-10-10 9:25 ` Hogander, Jouni
2024-10-10 9:53 ` Jani Nikula
2024-10-10 5:33 ` [PATCH 7/7] drm/i915/display: Generate PSR frame change event on cursor update Jouni Högander
2024-10-10 6:53 ` ✗ CI.Patch_applied: failure for Use trans push mechanism to generate frame change event 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=ZwfDN4aqrTjBIk86@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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;
as well as URLs for NNTP newsgroup(s).