All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker
@ 2010-10-26 19:21 Alex Deucher
  2010-10-27  0:22 ` [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2 Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2010-10-26 19:21 UTC (permalink / raw)
  To: airlied, dri-devel

broken by:
drm/radeon/r600: fix tiling issues in CS checker.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
---
 drivers/gpu/drm/radeon/r600_cs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 7e44b5a..aec0944 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -190,6 +190,8 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 	height = slice_tile_max / (pitch * 8);
 	if (height > 8192)
 		height = 8192;
+	if (height > 7)
+		height &= ~0x7;
 	array_mode = G_0280A0_ARRAY_MODE(track->cb_color_info[i]);
 	switch (array_mode) {
 	case V_0280A0_ARRAY_LINEAR_GENERAL:
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2
  2010-10-26 19:21 [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker Alex Deucher
@ 2010-10-27  0:22 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2010-10-27  0:22 UTC (permalink / raw)
  To: airlied, dri-devel

broken by:
drm/radeon/r600: fix tiling issues in CS checker.

v2: only apply it to 1D tiling case.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
---
 drivers/gpu/drm/radeon/r600_cs.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 7e44b5a..0d29065 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -215,6 +215,9 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 				 __func__, __LINE__, pitch);
 			return -EINVAL;
 		}
+		/* avoid breaking userspace */
+		if (height > 7)
+			height &= ~0x7;
 		if (!IS_ALIGNED(height, 8)) {
 			dev_warn(p->dev, "%s:%d cb height (%d) invalid\n",
 				 __func__, __LINE__, height);
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-27  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26 19:21 [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker Alex Deucher
2010-10-27  0:22 ` [PATCH] drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2 Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.