From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, suraj.kandpal@intel.com,
jani.saarinen@intel.com
Subject: Re: [PATCH 11/19] drm/i915: Split current joiner hw state readout
Date: Wed, 11 Sep 2024 23:28:52 +0300 [thread overview]
Message-ID: <ZuH9hFdHFn2U3YsU@intel.com> (raw)
In-Reply-To: <20240911131349.933814-12-ankit.k.nautiyal@intel.com>
On Wed, Sep 11, 2024 at 06:43:41PM +0530, Ankit Nautiyal wrote:
> From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
>
> We need to add a new sanity checks and also do
> some preparations for adding ultrajoiner hw state readout.
> Lets first split reading of the uncompressed joiner and bigjoiner
> bit masks into separate functions.
>
> v2: Fixed checkpatch warnings (Ankit)
> v3: Use struct intel_display in the new functions. (Ankit)
>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 75 ++++++++++++++------
> 1 file changed, 55 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 248ad63b0ba8..e93af02aa859 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3582,27 +3582,54 @@ static bool intel_display_can_use_joiner(struct intel_display *display)
> return (DISPLAY_VER(display) >= 11);
> }
>
> -static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
> - u8 *primary_pipes, u8 *secondary_pipes)
> +static void enabled_uncompressed_joiner_pipes(struct intel_display *display,
> + u8 *primary_pipes, u8 *secondary_pipes)
> {
> - struct intel_display *display = to_intel_display(&dev_priv->drm);
> + struct drm_i915_private *i915 = to_i915(display->drm);
> struct intel_crtc *crtc;
>
> *primary_pipes = 0;
> *secondary_pipes = 0;
>
> - if (!intel_display_can_use_joiner(display))
> + if (DISPLAY_VER(display) < 13)
> return;
>
> - for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
> - joiner_pipes(dev_priv)) {
> + for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc,
> + joiner_pipes(i915)) {
> enum intel_display_power_domain power_domain;
> enum pipe pipe = crtc->pipe;
> intel_wakeref_t wakeref;
>
> - power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
> - with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
> - u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
> + power_domain = POWER_DOMAIN_PIPE(pipe);
> + with_intel_display_power_if_enabled(i915, power_domain, wakeref) {
> + u32 tmp = intel_de_read(display, ICL_PIPE_DSS_CTL1(pipe));
> +
> + if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
> + *primary_pipes |= BIT(pipe);
> + if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
> + *secondary_pipes |= BIT(pipe);
> + }
> + }
> +}
> +
> +static void enabled_bigjoiner_pipes(struct intel_display *display,
> + u8 *primary_pipes, u8 *secondary_pipes)
> +{
> + struct drm_i915_private *i915 = to_i915(display->drm);
> + struct intel_crtc *crtc;
> +
> + *primary_pipes = 0;
> + *secondary_pipes = 0;
> +
> + for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc,
> + joiner_pipes(i915)) {
> + enum intel_display_power_domain power_domain;
> + enum pipe pipe = crtc->pipe;
> + intel_wakeref_t wakeref;
> +
> + power_domain = intel_dsc_power_domain(crtc, (enum transcoder)pipe);
> + with_intel_display_power_if_enabled(i915, power_domain, wakeref) {
> + u32 tmp = intel_de_read(display, ICL_PIPE_DSS_CTL1(pipe));
>
> if (!(tmp & BIG_JOINER_ENABLE))
> continue;
> @@ -3612,20 +3639,28 @@ static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
> else
> *secondary_pipes |= BIT(pipe);
> }
> + }
> +}
>
> - if (DISPLAY_VER(dev_priv) < 13)
> - continue;
> +static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
> + u8 *primary_pipes, u8 *secondary_pipes)
> +{
> + struct intel_display *display = to_intel_display(&dev_priv->drm);
> + u8 primary_uncompressed_joiner_pipes, primary_bigjoiner_pipes;
> + u8 secondary_uncompressed_joiner_pipes, secondary_bigjoiner_pipes;
>
> - power_domain = POWER_DOMAIN_PIPE(pipe);
> - with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
> - u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
> + if (!intel_display_can_use_joiner(display))
> + return;
I think we should just have the check in enabled_bigjoiner_pipes()
and this function shouldn't really have to care whether joiners
are supported or not (or which types are supported).
>
> - if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
> - *primary_pipes |= BIT(pipe);
> - if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
> - *secondary_pipes |= BIT(pipe);
> - }
> - }
> + enabled_uncompressed_joiner_pipes(display, &primary_uncompressed_joiner_pipes,
> + &secondary_uncompressed_joiner_pipes);
> +
> + enabled_bigjoiner_pipes(display, &primary_bigjoiner_pipes,
> + &secondary_bigjoiner_pipes);
> +
> + *primary_pipes = primary_uncompressed_joiner_pipes | primary_bigjoiner_pipes;
> +
> + *secondary_pipes = secondary_uncompressed_joiner_pipes | secondary_bigjoiner_pipes;
>
> /* Joiner pipes should always be consecutive primary and secondary */
> drm_WARN(&dev_priv->drm, *secondary_pipes != *primary_pipes << 1,
> --
> 2.45.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-09-11 20:28 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 13:13 [PATCH 00/19] Ultrajoiner basic functionality series Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 01/19] drm/i915/display: Check whether platform supports joiner Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 02/19] drm/i915/display: Modify debugfs for joiner to force n pipes Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 03/19] drm/i915/display_debugfs: Allow force joiner only if supported Ankit Nautiyal
2024-09-11 20:00 ` Ville Syrjälä
2024-09-11 20:11 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 04/19] drm/i915/dp: Add helper to compute num pipes joined Ankit Nautiyal
2024-09-11 20:10 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 05/19] drm/i915/display: Add debugfs support to avoid joiner Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 06/19] drm/i915/display: Simplify intel_joiner_num_pipes and its usage Ankit Nautiyal
2024-09-11 20:14 ` Ville Syrjälä
2024-09-12 10:15 ` Nautiyal, Ankit K
2024-09-11 13:13 ` [PATCH 07/19] drm/i915/display: Use joined pipes in intel_dp_joiner_needs_dsc Ankit Nautiyal
2024-09-11 20:17 ` Ville Syrjälä
2024-09-12 10:20 ` Nautiyal, Ankit K
2024-09-12 10:58 ` Ville Syrjälä
2024-09-12 11:04 ` Nautiyal, Ankit K
2024-09-11 13:13 ` [PATCH 08/19] drm/i915/display: Use joined pipes in intel_mode_valid_max_plane_size Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 09/19] drm/i915/display: Use joined pipes in dsc helpers for slices, bpp Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 10/19] drm/i915: Add some essential functionality for joiners Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 11/19] drm/i915: Split current joiner hw state readout Ankit Nautiyal
2024-09-11 20:28 ` Ville Syrjälä [this message]
2024-09-11 13:13 ` [PATCH 12/19] drm/i915: Add bigjoiner and uncompressed joiner hw readout sanity checks Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 13/19] drm/i915: Implement hw state readout and checks for ultrajoiner Ankit Nautiyal
2024-09-11 20:33 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 14/19] drm/i915/display: Percolate ultrajoiner info to get_joiner_config Ankit Nautiyal
2024-09-11 20:45 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 15/19] drm/i915/display/vdsc: Add ultrajoiner support with DSC Ankit Nautiyal
2024-09-11 20:48 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 16/19] drm/i915: Add new abstraction layer to handle pipe order for different joiners Ankit Nautiyal
2024-09-11 22:38 ` Ville Syrjälä
2024-09-16 7:39 ` Nautiyal, Ankit K
2024-09-16 14:54 ` Ville Syrjälä
2024-09-16 15:06 ` Ville Syrjälä
2024-09-17 9:22 ` Nautiyal, Ankit K
2024-09-17 12:14 ` Ville Syrjälä
2024-09-11 13:13 ` [PATCH 17/19] drm/i915: Compute config and mode valid changes for ultrajoiner Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 18/19] drm/i915/display: Consider ultrajoiner for computing maxdotclock Ankit Nautiyal
2024-09-11 13:13 ` [PATCH 19/19] drm/i915/intel_dp: Add support for forcing ultrajoiner Ankit Nautiyal
2024-09-11 19:29 ` ✗ Fi.CI.BUILD: failure for Ultrajoiner basic functionality series (rev8) Patchwork
2024-09-11 23:05 ` [PATCH 00/19] Ultrajoiner basic functionality series Ville Syrjälä
2024-09-12 11:02 ` Nautiyal, Ankit K
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=ZuH9hFdHFn2U3YsU@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.saarinen@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 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.