* [PATCH] drm/ttm: let ttm_bo_wait timeout be configurable
@ 2019-09-04 20:08 Lepton Wu
0 siblings, 0 replies; only message in thread
From: Lepton Wu @ 2019-09-04 20:08 UTC (permalink / raw)
To: dri-devel, christian.koenig, ray.huang; +Cc: Lepton Wu
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.
Signed-off-by: Lepton Wu <ytht.net@gmail.com>
---
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
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index bd943a71756c..432054012fa1 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -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
diff --git a/drivers/gpu/drm/ttm/Kconfig b/drivers/gpu/drm/ttm/Kconfig
new file mode 100644
index 000000000000..c7953271c59b
--- /dev/null
+++ b/drivers/gpu/drm/ttm/Kconfig
@@ -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
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 3f56647cdb35..fb6991811ede 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -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))
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-04 20:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-04 20:08 [PATCH] drm/ttm: let ttm_bo_wait timeout be configurable Lepton Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox