From patchwork Wed Sep 4 20:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lepton Wu X-Patchwork-Id: 11132281 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6500714DE for ; Thu, 5 Sep 2019 07:13:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D6D322CF7 for ; Thu, 5 Sep 2019 07:13:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D6D322CF7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A986189E32; Thu, 5 Sep 2019 07:13:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1275989C61 for ; Wed, 4 Sep 2019 20:08:39 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id 4so34932pld.10 for ; Wed, 04 Sep 2019 13:08:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kh3Db9I7Xebgd/JXo/7tdzEdpkE9kcIoF13CE+aAkEE=; b=s23W+zK56iDLY/qW1iz4yiY0ftHbRUJmSIZ6NrOlbhoX6GhCp8RkZyW3W/8zMZfoN0 D7HeXVVJs8tvPDBP0IA92qYeysnhYIzJFup2Sgjbyprmahf2R0UR7kP0heCGHKkqYFRE ooMJgIvd5ZZVqG9ruODLMFMiA9vtqt5K0wU4gUwafnaKX9gztPEr0+KIEoTWEBVqJe9V VQ69aEh1YfUYt+sqetZHl0YeKvBLCECyt1X0niCE8u7N6MkHcgt2ZPCj9dMf/XDJ7u6f 9xlcVUdYYmsgvZQHco5PqVLqNMdL7UpTJHuFuWB1dJbBtvw4L3YSJ+l7/f03xo1aQhwb n71Q== X-Gm-Message-State: APjAAAXT/QiPVlzZ2/HBHZ8wCSoUtstxN/nAuToUmeSjDKJf2hp6fXR3 f0YBF8U3702t9KksODinlKY= X-Google-Smtp-Source: APXvYqwjGoqqc2jFPB/XpUTiHEx4gG3gOWNX9YG+HjDfQCyNlyc9JVLCe5zU/6Gnw+sb7s4O0ycnTA== X-Received: by 2002:a17:902:bb85:: with SMTP id m5mr8163482pls.336.1567627718035; Wed, 04 Sep 2019 13:08:38 -0700 (PDT) Received: from paxos.mtv.corp.google.com ([2620:15c:202:201:31a4:f84f:da5f:97b4]) by smtp.gmail.com with ESMTPSA id x8sm6494440pfn.106.2019.09.04.13.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 13:08:37 -0700 (PDT) From: Lepton Wu To: dri-devel@lists.freedesktop.org, christian.koenig@amd.com, ray.huang@amd.com Subject: [PATCH] drm/ttm: let ttm_bo_wait timeout be configurable Date: Wed, 4 Sep 2019 13:08:27 -0700 Message-Id: <20190904200827.65930-1-ytht.net@gmail.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 05 Sep 2019 07:13:21 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kh3Db9I7Xebgd/JXo/7tdzEdpkE9kcIoF13CE+aAkEE=; b=tyZd4y6N+JPRpcs9wvuZzU+8Vqds0BHbb4+1G+g2nQMaBK/XOwYKbmYcGsWoSdUaQo Q9b7GQJk2O09VxPwZS71X+I1QUX8e1z+bLcQ6oCD7BWw+W3fr42h3iiYxcy24aropwGM DehF0Laxn9bWvlhsayMJql5+IMRiAPcQyDF9y5dmmp9S4Wma8pyO7kZT2HgGWLnBXc72 nvsac5Wb3J2RCnv1k9RTrDqh8wObO8xDyusCRhu7K6DfSz7cxhFZH5yATi2J89znfeHy z/V6C0AwdUuk3HFYB/bDZwUepJzI9j0LcJ/CmNBja+NvM3G0xHAsBRbXS6CCCcv9SAMe Gaog== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lepton Wu Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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))