All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: Disable writeback by default on ppc
@ 2013-06-17 14:06 Adam Jackson
  2013-06-17 15:04 ` Alex Deucher
  0 siblings, 1 reply; 23+ messages in thread
From: Adam Jackson @ 2013-06-17 14:06 UTC (permalink / raw)
  To: dri-devel

At least on an IBM Power 720, this check passes, but several piglit
tests will reliably trigger GPU resets due to the ring buffer pointers
not being updated.  There's probably a better way to limit this to just
affected machines though.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/radeon/r600_cp.c       | 7 +++++++
 drivers/gpu/drm/radeon/radeon_cp.c     | 7 +++++++
 drivers/gpu/drm/radeon/radeon_device.c | 4 ++--
 drivers/gpu/drm/radeon/radeon_drv.c    | 2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index 1c51c08..ef28532 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -552,6 +552,13 @@ static void r600_test_writeback(drm_radeon_private_t *dev_priv)
 		dev_priv->writeback_works = 0;
 		DRM_INFO("writeback test failed\n");
 	}
+#if defined(__ppc__) || defined(__ppc64__)
+	/* the test might succeed on ppc, but it's usually not reliable */
+	if (radeon_no_wb == -1) {
+		radeon_no_wb = 1;
+		DRM_INFO("not trusting writeback test due to arch quirk\n");
+	}
+#endif
 	if (radeon_no_wb == 1) {
 		dev_priv->writeback_works = 0;
 		DRM_INFO("writeback forced off\n");
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c
index efc4f64..a967b33 100644
--- a/drivers/gpu/drm/radeon/radeon_cp.c
+++ b/drivers/gpu/drm/radeon/radeon_cp.c
@@ -892,6 +892,13 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv)
 		dev_priv->writeback_works = 0;
 		DRM_INFO("writeback test failed\n");
 	}
+#if defined(__ppc__) || defined(__ppc64__)
+	/* the test might succeed on ppc, but it's usually not reliable */
+	if (radeon_no_wb == -1) {
+		radeon_no_wb = 1;
+		DRM_INFO("not trusting writeback test due to arch quirk\n");
+	}
+#endif
 	if (radeon_no_wb == 1) {
 		dev_priv->writeback_works = 0;
 		DRM_INFO("writeback forced off\n");
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 1899738..524046e 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -322,8 +322,8 @@ int radeon_wb_init(struct radeon_device *rdev)
 	/* disable event_write fences */
 	rdev->wb.use_event = false;
 	/* disabled via module param */
-	if (radeon_no_wb == 1) {
-		rdev->wb.enabled = false;
+	if (radeon_no_wb != -1) {
+		rdev->wb.enabled = !!radeon_no_wb;
 	} else {
 		if (rdev->flags & RADEON_IS_AGP) {
 			/* often unreliable on AGP */
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 094e7e5..04809d4 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -146,7 +146,7 @@ static inline void radeon_register_atpx_handler(void) {}
 static inline void radeon_unregister_atpx_handler(void) {}
 #endif
 
-int radeon_no_wb;
+int radeon_no_wb = -1;
 int radeon_modeset = -1;
 int radeon_dynclks = -1;
 int radeon_r4xx_atom = 0;
-- 
1.8.2.1

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

end of thread, other threads:[~2014-01-02 22:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 14:06 [PATCH] drm/radeon: Disable writeback by default on ppc Adam Jackson
2013-06-17 15:04 ` Alex Deucher
2013-06-17 16:07   ` Adam Jackson
2013-06-17 22:57     ` Alex Deucher
2013-11-07 22:29       ` Benjamin Herrenschmidt
2013-11-08 13:43         ` Kleber Sacilotto de Souza
2013-11-24 23:15           ` Benjamin Herrenschmidt
2013-11-26  0:11             ` Kleber Sacilotto de Souza
2013-12-04 22:16               ` Kleber Sacilotto de Souza
2013-12-04 23:56                 ` Alex Deucher
2013-12-05  0:05                   ` Alex Deucher
2013-12-05  1:39                     ` Benjamin Herrenschmidt
2013-12-05  2:29                       ` Michel Dänzer
2013-12-05  4:06                         ` Benjamin Herrenschmidt
2013-12-05 14:42                           ` Alex Deucher
2013-12-06 13:58                             ` Kleber Sacilotto de Souza
2013-12-06 15:59                               ` Alex Deucher
2013-12-10  0:48                                 ` Alex Deucher
2013-12-10  2:20                                   ` Michel Dänzer
2013-12-10 15:04                                     ` Alex Deucher
2013-12-10 15:12                                       ` Alex Deucher
2014-01-02 20:54                                         ` Kleber Sacilotto de Souza
2014-01-02 22:48                                           ` 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.