[PATCH 2/2] drm/radeon/kms/blit: workaround for a possible hardware bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If a blit copy operation specifies a rectangle whose one dimension
is 16384 (max allowed by these chips), the chip will silently
drop all commands. Fixed by reducing the maximum dimension by
one rectangle unit size. In the mainline kernel, the problem is
exposed only when buffers are very large (1G), but it's still
a problem. The problem *could* be exposed for smaller buffers
if anyone modifies the algorithm for rectangle construction
in r600_blit_create_rect() (the reason why someone would modify
that algorithm is to tune the performance of buffer moves).

Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/radeon/evergreen_blit_kms.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen_blit_kms.c b/drivers/gpu/drm/radeon/evergreen_blit_kms.c
index 4e83fdc..24abdf4 100644
--- a/drivers/gpu/drm/radeon/evergreen_blit_kms.c
+++ b/drivers/gpu/drm/radeon/evergreen_blit_kms.c
@@ -631,7 +631,8 @@ int evergreen_blit_init(struct radeon_device *rdev)
 	if (rdev->family >= CHIP_CAYMAN)
 		rdev->r600_blit.ring_size_per_loop += 9; /* additional DWs for surface sync */
 
-	rdev->r600_blit.max_dim = 16384;
+	/* Evergreen/NI bug: max dimension 16384 is broken for blit copy */
+	rdev->r600_blit.max_dim = 16384 - RECT_UNIT_H;
 
 	/* pin copy shader into vram if already initialized */
 	if (rdev->r600_blit.shader_obj)
-- 
1.7.7

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux