diff mbox series

[1/2] drm/i915: Fix transposed arguments to skl_plane_wm_level()

Message ID 20210325004415.17432-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Fix transposed arguments to skl_plane_wm_level() | expand

Commit Message

Ville Syrjälä March 25, 2021, 12:44 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Accidentally transposed the arguments to skl_plane_wm_level()
which is causing us to mistakenly think that the plane watermarks
have/have not changed when the opposite may be true. Swap the
arguments so this actually works.

The other uses of this look OK.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Fixes: 2871b2fde449 ("drm/i915: Fix TGL+ plane SAGV watermark programming")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lisovskiy, Stanislav March 25, 2021, 8:35 a.m. UTC | #1
On Thu, Mar 25, 2021 at 02:44:14AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Accidentally transposed the arguments to skl_plane_wm_level()
> which is causing us to mistakenly think that the plane watermarks
> have/have not changed when the opposite may be true. Swap the
> arguments so this actually works.
> 
> The other uses of this look OK.

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> 
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Fixes: 2871b2fde449 ("drm/i915: Fix TGL+ plane SAGV watermark programming")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 820f850d5cbb..b2aede2be89d 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -6017,8 +6017,8 @@ static bool skl_plane_selected_wm_equals(struct intel_plane *plane,
>  		 * use it. It only gets used for calculating the required
>  		 * ddb allocation.
>  		 */
> -		if (!skl_wm_level_equals(skl_plane_wm_level(old_pipe_wm, level, plane->id),
> -					 skl_plane_wm_level(new_pipe_wm, level, plane->id)))
> +		if (!skl_wm_level_equals(skl_plane_wm_level(old_pipe_wm, plane->id, level),
> +					 skl_plane_wm_level(new_pipe_wm, plane->id, level)))
>  			return false;
>  	}
>  
> -- 
> 2.26.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 820f850d5cbb..b2aede2be89d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6017,8 +6017,8 @@  static bool skl_plane_selected_wm_equals(struct intel_plane *plane,
 		 * use it. It only gets used for calculating the required
 		 * ddb allocation.
 		 */
-		if (!skl_wm_level_equals(skl_plane_wm_level(old_pipe_wm, level, plane->id),
-					 skl_plane_wm_level(new_pipe_wm, level, plane->id)))
+		if (!skl_wm_level_equals(skl_plane_wm_level(old_pipe_wm, plane->id, level),
+					 skl_plane_wm_level(new_pipe_wm, plane->id, level)))
 			return false;
 	}