Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58e311b0 authored by Matt Roper's avatar Matt Roper Committed by Jani Nikula
Browse files

drm/i915/gen9: Give one extra block per line for SKL plane WM calculations



The bspec was updated a couple weeks ago to add an extra block per line
to plane watermark calculations for linear pixel formats.

Bspec update 115327 description:
  "Gen9+ - Updated the plane blocks per line calculation for linear
  cases. Adds +1 for all linear cases to handle the non-block aligned
  stride cases."

Cc: Lyude <cpaul@redhat.com>
Cc: drm-intel-fixes@lists.freedesktop.org
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470344880-27394-1-git-send-email-matthew.d.roper@intel.com


Reviewed-by: default avatarLyude <cpaul@redhat.com>
(cherry picked from commit 055c3ff6)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 3cffb0a4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3344,6 +3344,8 @@ static uint32_t skl_wm_method2(uint32_t pixel_rate, uint32_t pipe_htotal,
		plane_bytes_per_line *= 4;
		plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
		plane_blocks_per_line /= 4;
	} else if (tiling == DRM_FORMAT_MOD_NONE) {
		plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512) + 1;
	} else {
		plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
	}