From: "Souza, Jose" <jose.souza@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 4/9] drm/i195: Determine DRRS frontbuffer_bits ahead of time
Date: Tue, 15 Mar 2022 18:36:44 +0000 [thread overview]
Message-ID: <70ad17b40230ecaf0d803dcdffdf753f2b56fae5.camel@intel.com> (raw)
In-Reply-To: <20220315132752.11849-5-ville.syrjala@linux.intel.com>
On Tue, 2022-03-15 at 15:27 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Pre-determine the frontbuffer_bits for the each pipe during
> intel_drrs_enable(). Will become useful for bigjoiner use cases
> soon.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
> drivers/gpu/drm/i915/display/intel_drrs.c | 11 ++++++++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index d84e82f3eab9..c94eb7d5191d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1302,6 +1302,7 @@ struct intel_crtc {
> struct mutex mutex;
> struct delayed_work work;
> enum drrs_refresh_rate refresh_rate;
> + unsigned int frontbuffer_bits;
> unsigned int busy_frontbuffer_bits;
> enum transcoder cpu_transcoder;
> struct intel_link_m_n m_n, m2_n2;
> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c
> index e9d622fe66b3..91aab77c495c 100644
> --- a/drivers/gpu/drm/i915/display/intel_drrs.c
> +++ b/drivers/gpu/drm/i915/display/intel_drrs.c
> @@ -168,6 +168,13 @@ static void intel_drrs_set_state(struct intel_crtc *crtc,
> crtc->drrs.refresh_rate = refresh_rate;
> }
>
> +static unsigned int intel_drrs_frontbuffer_bits(const struct intel_crtc_state *crtc_state)
> +{
> + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +
> + return INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
> +}
> +
> /**
> * intel_drrs_enable - init drrs struct if supported
> * @crtc_state: A pointer to the active crtc state.
> @@ -190,6 +197,7 @@ void intel_drrs_enable(const struct intel_crtc_state *crtc_state)
> crtc->drrs.cpu_transcoder = crtc_state->cpu_transcoder;
> crtc->drrs.m_n = crtc_state->dp_m_n;
> crtc->drrs.m2_n2 = crtc_state->dp_m2_n2;
> + crtc->drrs.frontbuffer_bits = intel_drrs_frontbuffer_bits(crtc_state);
> crtc->drrs.busy_frontbuffer_bits = 0;
>
> mutex_unlock(&crtc->drrs.mutex);
> @@ -216,6 +224,7 @@ void intel_drrs_disable(const struct intel_crtc_state *old_crtc_state)
> intel_drrs_set_state(crtc, DRRS_REFRESH_RATE_HIGH);
>
> crtc->drrs.cpu_transcoder = INVALID_TRANSCODER;
> + crtc->drrs.frontbuffer_bits = 0;
> crtc->drrs.busy_frontbuffer_bits = 0;
>
> mutex_unlock(&crtc->drrs.mutex);
> @@ -278,7 +287,7 @@ static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
> continue;
> }
>
> - frontbuffer_bits = all_frontbuffer_bits & INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
> + frontbuffer_bits = all_frontbuffer_bits & crtc->drrs.frontbuffer_bits;
> if (invalidate)
> crtc->drrs.busy_frontbuffer_bits |= frontbuffer_bits;
> else
next prev parent reply other threads:[~2022-03-15 18:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 13:27 [Intel-gfx] [PATCH 0/9] drm/i915: More DRRS work Ville Syrjala
2022-03-15 13:27 ` [Intel-gfx] [PATCH 1/9] drm/i915: Put the downclock_mode check back into can_enable_drrs() Ville Syrjala
2022-03-15 18:40 ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 2/9] drm/i915: Add missing tab to DRRS debugfs Ville Syrjala
2022-03-15 18:34 ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 3/9] drm/i915: Fix DRRS frontbuffer_bits handling Ville Syrjala
2022-03-15 18:35 ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 4/9] drm/i195: Determine DRRS frontbuffer_bits ahead of time Ville Syrjala
2022-03-15 18:36 ` Souza, Jose [this message]
2022-03-15 13:27 ` [Intel-gfx] [PATCH 5/9] drm/i915: Don't cancel/schedule drrs work if the pipe wasn't affected Ville Syrjala
2022-03-15 18:39 ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 6/9] drm/i915: Schedule DRRS work from intel_drrs_enable() Ville Syrjala
2022-03-15 18:39 ` Souza, Jose
2022-03-15 13:27 ` [Intel-gfx] [PATCH 7/9] drm/i915: Do DRRS disable/enable during pre/post_plane_update() Ville Syrjala
2022-03-15 18:48 ` Souza, Jose
2022-03-15 20:18 ` Ville Syrjälä
2022-03-15 21:39 ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-03-15 13:27 ` [Intel-gfx] [PATCH 8/9] drm/i915: Deal with bigjoiner vs. DRRS Ville Syrjala
2022-03-15 18:24 ` Navare, Manasi
2022-03-15 13:27 ` [Intel-gfx] [PATCH 9/9] drm/i915: s/enable/active/ for DRRS Ville Syrjala
2022-03-15 18:54 ` Souza, Jose
2022-03-15 20:23 ` Ville Syrjälä
2022-03-21 20:57 ` Souza, Jose
2022-03-15 14:15 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: More DRRS work Patchwork
2022-03-15 14:50 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-15 16:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-15 21:52 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: More DRRS work (rev2) Patchwork
2022-03-15 22:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-16 2:28 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=70ad17b40230ecaf0d803dcdffdf753f2b56fae5.camel@intel.com \
--to=jose.souza@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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