diff mbox series

[v2,6/6] drm/i915/fbc: Remove pointless "stride is multiple of 64 bytes" check

Message ID 20231003194256.28569-6-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/6] drm/i915/fbc: Remove ancient 16k plane stride limit | expand

Commit Message

Ville Syrjälä Oct. 3, 2023, 7:42 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Plane stride is always a multiple of 64 bytes. Remove the
pointless check that really doesn't have anything to do
with FBC.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Govindapillai, Vinod Oct. 4, 2023, 10:21 a.m. UTC | #1
On Tue, 2023-10-03 at 22:42 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Plane stride is always a multiple of 64 bytes. Remove the
> pointless check that really doesn't have anything to do
> with FBC.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 7 -------
>  1 file changed, 7 deletions(-)

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 37f96a4d50f2..4820d21cc942 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -897,13 +897,6 @@ static bool icl_fbc_stride_is_valid(const struct intel_plane_state
> *plane_state)
>  static bool stride_is_valid(const struct intel_plane_state *plane_state)
>  {
>         struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
> -       const struct drm_framebuffer *fb = plane_state->hw.fb;
> -       unsigned int stride = intel_fbc_plane_stride(plane_state) *
> -               fb->format->cpp[0];
> -
> -       /* This should have been caught earlier. */
> -       if (drm_WARN_ON_ONCE(&i915->drm, (stride & (64 - 1)) != 0))
> -               return false;
>  
>         if (DISPLAY_VER(i915) >= 11)
>                 return icl_fbc_stride_is_valid(plane_state);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 37f96a4d50f2..4820d21cc942 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -897,13 +897,6 @@  static bool icl_fbc_stride_is_valid(const struct intel_plane_state *plane_state)
 static bool stride_is_valid(const struct intel_plane_state *plane_state)
 {
 	struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
-	const struct drm_framebuffer *fb = plane_state->hw.fb;
-	unsigned int stride = intel_fbc_plane_stride(plane_state) *
-		fb->format->cpp[0];
-
-	/* This should have been caught earlier. */
-	if (drm_WARN_ON_ONCE(&i915->drm, (stride & (64 - 1)) != 0))
-		return false;
 
 	if (DISPLAY_VER(i915) >= 11)
 		return icl_fbc_stride_is_valid(plane_state);