All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 01/11] drm/i915: WARN if plane src coords are too big
Date: Wed, 27 Jan 2021 16:41:08 +0530	[thread overview]
Message-ID: <e5d4e543-e840-c9b8-300a-917dbfa18d71@intel.com> (raw)
In-Reply-To: <20210111163711.12913-2-ville.syrjala@linux.intel.com>

On 1/11/2021 10:07 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Inform us if we're buggy and are about to exceed the size of the
> bitfields in the plane TILEOFF/OFFSET registers.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks good to me.

Reviewed-by: Karthik B S <karthik.b.s@intel.com>

> ---
>   drivers/gpu/drm/i915/display/i9xx_plane.c    | 7 +++++++
>   drivers/gpu/drm/i915/display/intel_display.c | 4 ++++
>   2 files changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index b78985c855a5..b1158ce4df92 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -276,6 +276,13 @@ int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
>   		}
>   	}
>   
> +	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> +		drm_WARN_ON(&dev_priv->drm, src_x > 8191 || src_y > 4095);
> +	} else if (INTEL_GEN(dev_priv) >= 4 &&
> +		   fb->modifier == I915_FORMAT_MOD_X_TILED) {
> +		drm_WARN_ON(&dev_priv->drm, src_x > 4095 || src_y > 4095);
> +	}
> +
>   	plane_state->color_plane[0].offset = offset;
>   	plane_state->color_plane[0].x = src_x;
>   	plane_state->color_plane[0].y = src_y;
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 0189d379a55e..7735c28b2467 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3854,6 +3854,8 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
>   		}
>   	}
>   
> +	drm_WARN_ON(&dev_priv->drm, x > 8191 || y > 8191);
> +
>   	plane_state->color_plane[0].offset = offset;
>   	plane_state->color_plane[0].x = x;
>   	plane_state->color_plane[0].y = y;
> @@ -3926,6 +3928,8 @@ static int skl_check_nv12_aux_surface(struct intel_plane_state *plane_state)
>   		}
>   	}
>   
> +	drm_WARN_ON(&i915->drm, x > 8191 || y > 8191);
> +
>   	plane_state->color_plane[uv_plane].offset = offset;
>   	plane_state->color_plane[uv_plane].x = x;
>   	plane_state->color_plane[uv_plane].y = y;


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-01-27 11:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 16:37 [Intel-gfx] [PATCH v2 00/11] drm/i915: Async flips for all ilk+ platforms Ville Syrjala
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 01/11] drm/i915: WARN if plane src coords are too big Ville Syrjala
2021-01-27 11:11   ` Karthik B S [this message]
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 02/11] drm/i915: Limit plane stride to below TILEOFF.x limit Ville Syrjala
2021-01-28  9:41   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 03/11] drm/i915: Drop redundant parens Ville Syrjala
2021-01-15 10:19   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 04/11] drm/i915: Generalize the async flip capability check Ville Syrjala
2021-01-15 10:23   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 05/11] drm/i915: Add plane vfuncs to enable/disable flip_done interrupt Ville Syrjala
2021-01-15 11:38   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 06/11] drm/i915: Move the async_flip bit setup into the .async_flip() hook Ville Syrjala
2021-01-15 11:40   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 07/11] drm/i915: Reuse the async_flip() hook for the async flip disable w/a Ville Syrjala
2021-01-18  9:27   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 08/11] drm/i915: Implement async flips for bdw Ville Syrjala
2021-01-18  9:44   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 09/11] drm/i915: Implement async flip for ivb/hsw Ville Syrjala
2021-01-18 10:45   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 10/11] drm/i915: Implement async flip for ilk/snb Ville Syrjala
2021-01-18 11:08   ` Karthik B S
2021-01-11 16:37 ` [Intel-gfx] [PATCH v2 11/11] drm/i915: Implement async flips for vlv/chv Ville Syrjala
2021-01-27  8:09   ` Karthik B S
2021-01-11 17:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Async flips for all ilk+ platforms (rev2) Patchwork
2021-01-11 18:58 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=e5d4e543-e840-c9b8-300a-917dbfa18d71@intel.com \
    --to=karthik.b.s@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 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.