Skip to contentSkip to conversation

drm/ttm: let ttm_bo_wait timeout be configurable

PATCH New Lepton Wu 1 participant 1 message Sep 4, 2019

Subsystems (3)
lore
Share & tools
lore

Lepton Wu

author
#0 lore raw

PATCH 1/1 drm/ttm: let ttm_bo_wait timeout be configurable

When running dEQP against virgl driver, it turns out the default 15 seconds timeout for ttm_bo_wait is not big enough for GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.22 Change it to a configurable value so we can tune it before virgl performance gets improved.

---
 drivers/gpu/drm/Kconfig      | 2 ++
 drivers/gpu/drm/ttm/Kconfig  | 7 +++++++
 drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/ttm/Kconfig
drivers/gpu/drm/Kconfig +2 -0
index bd943a71756c..432054012fa1 100644
@@ -160,6 +160,8 @@ config DRM_TTM
 	  GPU memory types. Will be enabled automatically if a device driver
 	  uses it.
 
+source "drivers/gpu/drm/ttm/Kconfig"
+
 config DRM_GEM_CMA_HELPER
 	bool
 	depends on DRM
drivers/gpu/drm/ttm/Kconfig new file +7 -0
new file mode 100644
index 000000000000..c7953271c59b
@@ -0,0 +1,7 @@
+config DRM_TTM_BO_WAIT_TIMEOUT
+	int "Default timeout for ttm bo wait (in seconds)"
+	depends on DRM_TTM
+	default 15
+	help
+	  This option controls the default timeout (in seconds) used in
+	  ttm_bo_wait
drivers/gpu/drm/ttm/ttm_bo.c +1 -1
index 3f56647cdb35..fb6991811ede 100644
@@ -1709,7 +1709,7 @@ EXPORT_SYMBOL(ttm_bo_unmap_virtual);
 int ttm_bo_wait(struct ttm_buffer_object *bo,
 		bool interruptible, bool no_wait)
 {
-	long timeout = 15 * HZ;
+	long timeout = CONFIG_DRM_TTM_BO_WAIT_TIMEOUT * HZ;
 
 	if (no_wait) {
 		if (reservation_object_test_signaled_rcu(bo->resv, true))
Signature · 6 lines
2.23.0.187.g17f5b7556c-goog

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel