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

Commit a235e4c9 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

Revert "drm/radeon/kms: fix typo in r600 cs checker"



This reverts commit d33ef52d.

This change seems to expose a bug in the 3D driver tiggered by
certain apps, so revert it to keep userspace working.

Reported-by: default avatarRafael J. Wysocki <rjw@sisk.pl>

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f24d86f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -315,7 +315,7 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
		if (array_mode == V_0280A0_ARRAY_LINEAR_GENERAL) {
		if (array_mode == V_0280A0_ARRAY_LINEAR_GENERAL) {
			/* the initial DDX does bad things with the CB size occasionally */
			/* the initial DDX does bad things with the CB size occasionally */
			/* it rounds up height too far for slice tile max but the BO is smaller */
			/* it rounds up height too far for slice tile max but the BO is smaller */
			tmp = (height - 7) * pitch * bpe;
			tmp = (height - 7) * 8 * bpe;
			if ((tmp + track->cb_color_bo_offset[i]) > radeon_bo_size(track->cb_color_bo[i])) {
			if ((tmp + track->cb_color_bo_offset[i]) > radeon_bo_size(track->cb_color_bo[i])) {
				dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
				dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
				return -EINVAL;
				return -EINVAL;