From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, jani.saarinen@intel.com
Subject: Re: [PATCH 06/14] drm/i915: Split current joiner hw state readout
Date: Fri, 6 Sep 2024 18:29:47 +0300 [thread overview]
Message-ID: <Ztsf67BgD4z_BA50@intel.com> (raw)
In-Reply-To: <20240906125807.3960642-7-ankit.k.nautiyal@intel.com>
On Fri, Sep 06, 2024 at 06:27:59PM +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)
>
> 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 | 65 +++++++++++++++-----
> 1 file changed, 48 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 3278debf47cc..cdc7531311fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3580,51 +3580,82 @@ static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
> return tmp & TRANS_DDI_FUNC_ENABLE;
> }
>
> -static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
> - u8 *primary_pipes, u8 *secondary_pipes)
> +static void enabled_uncompressed_joiner_pipes(struct drm_i915_private *dev_priv,
> + u8 *primary_pipes, u8 *secondary_pipes)
> {
> struct intel_crtc *crtc;
>
> *primary_pipes = 0;
> *secondary_pipes = 0;
>
> + if (DISPLAY_VER(dev_priv) < 13)
> + return;
> +
> for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
> joiner_pipes(dev_priv)) {
> 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);
> + 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 (!(tmp & BIG_JOINER_ENABLE))
> - continue;
> -
> - if (tmp & PRIMARY_BIG_JOINER_ENABLE)
> + if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
> *primary_pipes |= BIT(pipe);
> - else
> + if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
> *secondary_pipes |= BIT(pipe);
> }
> + }
> +}
>
> - if (DISPLAY_VER(dev_priv) < 13)
> - continue;
> +static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
> + u8 *primary_pipes, u8 *secondary_pipes)
> +{
> + struct intel_crtc *crtc;
>
> - power_domain = POWER_DOMAIN_PIPE(pipe);
> + *primary_pipes = 0;
> + *secondary_pipes = 0;
We seem to be missing any kind of check to make sure bigjoiner
is actually present in the hardware. Or am I just blind?
If that is the case we need to fix it up before the
refactoring goes in.
> +
> + for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
> + joiner_pipes(dev_priv)) {
> + 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));
>
> - if (tmp & UNCOMPRESSED_JOINER_PRIMARY)
> + if (!(tmp & BIG_JOINER_ENABLE))
> + continue;
> +
> + if (tmp & PRIMARY_BIG_JOINER_ENABLE)
> *primary_pipes |= BIT(pipe);
> - if (tmp & UNCOMPRESSED_JOINER_SECONDARY)
> + else
> *secondary_pipes |= BIT(pipe);
> }
> }
> +}
> +
> +static void enabled_joiner_pipes(struct drm_i915_private *dev_priv,
> + u8 *primary_pipes, u8 *secondary_pipes)
> +{
> + u8 primary_uncompressed_joiner_pipes, primary_bigjoiner_pipes;
> + u8 secondary_uncompressed_joiner_pipes, secondary_bigjoiner_pipes;
> +
> + enabled_uncompressed_joiner_pipes(dev_priv, &primary_uncompressed_joiner_pipes,
> + &secondary_uncompressed_joiner_pipes);
> +
> + enabled_bigjoiner_pipes(dev_priv, &primary_bigjoiner_pipes,
> + &secondary_bigjoiner_pipes);
> +
> + *primary_pipes = 0;
> + *secondary_pipes = 0;
These seem redundant.
> +
> + *primary_pipes = primary_uncompressed_joiner_pipes | primary_bigjoiner_pipes;
>
> - /* Joiner pipes should always be consecutive primary and secondary */
> - drm_WARN(&dev_priv->drm, *secondary_pipes != *primary_pipes << 1,
> - "Joiner misconfigured (primary pipes 0x%x, secondary pipes 0x%x)\n",
> - *primary_pipes, *secondary_pipes);
Where did this go?
> + *secondary_pipes = secondary_uncompressed_joiner_pipes | secondary_bigjoiner_pipes;
> }
>
> static enum pipe get_joiner_primary_pipe(enum pipe pipe, u8 primary_pipes, u8 secondary_pipes)
> --
> 2.45.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-09-06 15:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 12:57 [PATCH 00/14] Ultrajoiner basic functionality series Ankit Nautiyal
2024-09-06 12:57 ` [PATCH 01/14] drm/i915/display: Modify debugfs for joiner to force n pipes Ankit Nautiyal
2024-09-06 14:46 ` Ville Syrjälä
2024-09-06 14:54 ` Ville Syrjälä
2024-09-09 5:40 ` Nautiyal, Ankit K
2024-09-09 13:40 ` Ville Syrjälä
2024-09-10 5:42 ` Nautiyal, Ankit K
2024-09-10 11:46 ` Ville Syrjälä
2024-09-10 14:10 ` Nautiyal, Ankit K
2024-09-10 14:16 ` Ville Syrjälä
2024-09-09 5:34 ` Nautiyal, Ankit K
2024-09-06 12:57 ` [PATCH 02/14] drm/i915/display: Use joined pipes in intel_dp_joiner_needs_dsc Ankit Nautiyal
2024-09-06 12:57 ` [PATCH 03/14] drm/i915/display: Use joined pipes in intel_mode_valid_max_plane_size Ankit Nautiyal
2024-09-06 14:52 ` Ville Syrjälä
2024-09-09 6:10 ` Nautiyal, Ankit K
2024-09-06 12:57 ` [PATCH 04/14] drm/i915/display: Use joined pipes in dsc helpers for slices, bpp Ankit Nautiyal
2024-09-06 12:57 ` [PATCH 05/14] drm/i915: Add some essential functionality for joiners Ankit Nautiyal
2024-09-06 15:24 ` Ville Syrjälä
2024-09-09 7:47 ` Nautiyal, Ankit K
2024-09-09 13:42 ` Ville Syrjälä
2024-09-06 12:57 ` [PATCH 06/14] drm/i915: Split current joiner hw state readout Ankit Nautiyal
2024-09-06 15:29 ` Ville Syrjälä [this message]
2024-09-09 7:55 ` Nautiyal, Ankit K
2024-09-06 12:58 ` [PATCH 07/14] drm/i915: Add bigjoiner and uncompressed joiner hw readout sanity checks Ankit Nautiyal
2024-09-06 15:39 ` Ville Syrjälä
2024-09-09 8:31 ` Nautiyal, Ankit K
2024-09-09 8:40 ` Nautiyal, Ankit K
2024-09-06 12:58 ` [PATCH 08/14] drm/i915: Implement hw state readout and checks for ultrajoiner Ankit Nautiyal
2024-09-06 15:58 ` Ville Syrjälä
2024-09-09 8:44 ` Nautiyal, Ankit K
2024-09-06 12:58 ` [PATCH 09/14] drm/i915/display: Add helpers to check for ultrajoiner primary Ankit Nautiyal
2024-09-06 12:58 ` [PATCH 10/14] drm/i915/display/vdsc: Add ultrajoiner support with DSC Ankit Nautiyal
2024-09-06 16:30 ` Ville Syrjälä
2024-09-06 16:39 ` Ville Syrjälä
2024-09-09 9:23 ` Nautiyal, Ankit K
2024-09-09 13:46 ` Ville Syrjälä
2024-09-06 12:58 ` [PATCH 11/14] drm/i915: Add new abstraction layer to handle pipe order for different joiners Ankit Nautiyal
2024-09-06 12:58 ` [PATCH 12/14] drm/i915: Compute config and mode valid changes for ultrajoiner Ankit Nautiyal
2024-09-06 12:58 ` [PATCH 13/14] drm/i915/display: Consider ultrajoiner for computing maxdotclock Ankit Nautiyal
2024-09-06 12:58 ` [PATCH 14/14] drm/i915/intel_dp: Add support for forcing ultrajoiner Ankit Nautiyal
2024-09-06 14:08 ` ✗ Fi.CI.CHECKPATCH: warning for Ultrajoiner basic functionality series (rev7) Patchwork
2024-09-06 14:08 ` ✗ Fi.CI.SPARSE: " 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=Ztsf67BgD4z_BA50@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 \
/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