[PATCH 07/12] drm/i915: Add bigjoiner and uncompressed joiner hw readout sanity checks
Kandpal, Suraj
suraj.kandpal at intel.com
Wed Jul 31 08:25:02 UTC 2024
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ankit
> Nautiyal
> Sent: Thursday, July 18, 2024 1:48 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: Lisovskiy, Stanislav <stanislav.lisovskiy at intel.com>; Saarinen, Jani
> <jani.saarinen at intel.com>; ville.syrjala at linux.intel.com
> Subject: [PATCH 07/12] drm/i915: Add bigjoiner and uncompressed joiner
> hw readout sanity checks
>
> From: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
>
> Adding sanity checks for primary and secondary bigjoiner/uncompressed
> bitmasks, should make it easier to spot possible issues.
>
Use imperative here in commit meesgae some thing like " add sanity checks..."
Other than that everything else LGTM.
Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 25 +++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 4aed8117f614..59cb0d2f773b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3648,11 +3648,17 @@ static void enabled_bigjoiner_pipes(struct
> drm_i915_private *dev_priv,
> }
> }
>
> +static u8 expected_secondary_pipes(u8 primary_pipes) {
> + return primary_pipes << 1;
> +}
> +
> 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;
> + u8 uncompressed_joiner_pipes, bigjoiner_pipes;
>
> enabled_uncompressed_joiner_pipes(dev_priv,
> &primary_uncompressed_joiner_pipes,
>
> &secondary_uncompressed_joiner_pipes);
> @@ -3660,11 +3666,28 @@ static void enabled_joiner_pipes(struct
> drm_i915_private *dev_priv,
> enabled_bigjoiner_pipes(dev_priv, &primary_bigjoiner_pipes,
> &secondary_bigjoiner_pipes);
>
> + uncompressed_joiner_pipes = primary_uncompressed_joiner_pipes
> |
> + secondary_uncompressed_joiner_pipes;
> + bigjoiner_pipes = primary_bigjoiner_pipes |
> secondary_bigjoiner_pipes;
> +
> + drm_WARN(&dev_priv->drm, (uncompressed_joiner_pipes &
> bigjoiner_pipes) != 0,
> + "Uncomressed joiner pipes(%x) and bigjoiner pipes(%x)
> can't intersect\n",
> + uncompressed_joiner_pipes, bigjoiner_pipes);
> + drm_WARN(&dev_priv->drm, secondary_bigjoiner_pipes !=
> + expected_secondary_pipes(primary_bigjoiner_pipes),
> + "Wrong secondary bigjoiner pipes(expected %x, current
> %x)\n",
> + expected_secondary_pipes(primary_bigjoiner_pipes),
> + secondary_bigjoiner_pipes);
> + drm_WARN(&dev_priv->drm,
> secondary_uncompressed_joiner_pipes !=
> +
> expected_secondary_pipes(primary_uncompressed_joiner_pipes),
> + "Wrong secondary uncompressed joiner pipes(expected %x,
> current %x)\n",
> +
> expected_secondary_pipes(primary_uncompressed_joiner_pipes),
> + secondary_uncompressed_joiner_pipes);
> +
> *primary_pipes = 0;
> *secondary_pipes = 0;
>
> *primary_pipes = primary_uncompressed_joiner_pipes |
> primary_bigjoiner_pipes;
> -
> *secondary_pipes = secondary_uncompressed_joiner_pipes |
> secondary_bigjoiner_pipes; }
>
> --
> 2.45.2
More information about the Intel-gfx
mailing list