diff mbox series

[3/6] drm/i915: Check SAGV wm min_ddb_alloc rather than plane_res_b

Message ID 20210305153610.12177-4-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: More SAGV related fixes/cleanups | expand

Commit Message

Ville Syrjala March 5, 2021, 3:36 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

For non-transition watermarks we are supposed to check min_ddb_alloc
rather than plane_res_b when determining if we have enough DDB space
for it. A bit too much copy pasta made me check the wrong thing.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Fixes: df4a50a35e2c ("drm/i915: Zero out SAGV wm when we don't have enough DDB for it")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lisovskiy, Stanislav March 12, 2021, 12:13 p.m. UTC | #1
On Fri, Mar 05, 2021 at 05:36:07PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> For non-transition watermarks we are supposed to check min_ddb_alloc
> rather than plane_res_b when determining if we have enough DDB space
> for it. A bit too much copy pasta made me check the wrong thing.
> 
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Fixes: df4a50a35e2c ("drm/i915: Zero out SAGV wm when we don't have enough DDB for it")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b6e34d1701a0..36601e0a5073 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4989,7 +4989,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state,
>  		if (wm->trans_wm.plane_res_b >= total[plane_id])
>  			memset(&wm->trans_wm, 0, sizeof(wm->trans_wm));
>  
> -		if (wm->sagv.wm0.plane_res_b >= total[plane_id])
> +		if (wm->sagv.wm0.min_ddb_alloc > total[plane_id])
>  			memset(&wm->sagv.wm0, 0, sizeof(wm->sagv.wm0));
>  
>  		if (wm->sagv.trans_wm.plane_res_b >= total[plane_id])
> -- 
> 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 b6e34d1701a0..36601e0a5073 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4989,7 +4989,7 @@  skl_allocate_plane_ddb(struct intel_atomic_state *state,
 		if (wm->trans_wm.plane_res_b >= total[plane_id])
 			memset(&wm->trans_wm, 0, sizeof(wm->trans_wm));
 
-		if (wm->sagv.wm0.plane_res_b >= total[plane_id])
+		if (wm->sagv.wm0.min_ddb_alloc > total[plane_id])
 			memset(&wm->sagv.wm0, 0, sizeof(wm->sagv.wm0));
 
 		if (wm->sagv.trans_wm.plane_res_b >= total[plane_id])