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

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

drm/radeon/kms: fix 2D tile height alignment in the r600 CS checker



macro tile heights are aligned to num channels, not num banks.

Noticed by Dave Airlie.

Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 2281a378
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -229,7 +229,7 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
				__func__, __LINE__, pitch);
				__func__, __LINE__, pitch);
			return -EINVAL;
			return -EINVAL;
		}
		}
		if (!IS_ALIGNED((height / 8), track->nbanks)) {
		if (!IS_ALIGNED((height / 8), track->npipes)) {
			dev_warn(p->dev, "%s:%d cb height (%d) invalid\n",
			dev_warn(p->dev, "%s:%d cb height (%d) invalid\n",
				 __func__, __LINE__, height);
				 __func__, __LINE__, height);
			return -EINVAL;
			return -EINVAL;
@@ -378,7 +378,7 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
						 __func__, __LINE__, pitch);
						 __func__, __LINE__, pitch);
					return -EINVAL;
					return -EINVAL;
				}
				}
				if ((height / 8) & (track->nbanks - 1)) {
				if (!IS_ALIGNED((height / 8), track->npipes)) {
					dev_warn(p->dev, "%s:%d db height (%d) invalid\n",
					dev_warn(p->dev, "%s:%d db height (%d) invalid\n",
						 __func__, __LINE__, height);
						 __func__, __LINE__, height);
					return -EINVAL;
					return -EINVAL;