Skip to content

Commit

Permalink
drm/i915: Check SAGV wm min_ddb_alloc rather than plane_res_b
Browse files Browse the repository at this point in the history
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: df4a50a ("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>
Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-4-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
  • Loading branch information
Ville Syrjälä committed Mar 12, 2021
1 parent cdf6462 commit f0dfaa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit f0dfaa9

Please sign in to comment.