@@ -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
new file mode 100644
@@ -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
@@ -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))
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