From patchwork Mon Feb 25 14:07:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 10828621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8179922 for ; Mon, 25 Feb 2019 14:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6E782AA1A for ; Mon, 25 Feb 2019 14:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B73FB2B762; Mon, 25 Feb 2019 14:08:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 765312AA1A for ; Mon, 25 Feb 2019 14:08:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92AF789216; Mon, 25 Feb 2019 14:08:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2852589216; Mon, 25 Feb 2019 14:08:37 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id n74so4552803pfi.9; Mon, 25 Feb 2019 06:08:37 -0800 (PST) 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:in-reply-to :references; bh=t8VvF5419W/4u8buRvmUrkQMsg4ZZ8tZO+CGF235jGo=; b=tJOdKYLEYU1oixKwHgeAFHAIa0MUb3wUTTwlfygWmRQ6HIIhBrOzHtKMwBqUj6tEkN AISvjasZ2XGzTt2jR7ZC6SHlOL5x7l2cJUI1ZpDwNq6YfXd3hHjpbG6qriznCZ0Ap3O3 NNRS84fj4TM5ByuC72WbECskZff8sAgkqqdUeDpW76M/Zo7C/TACA+JvAzh5EtERe5YZ LDQSrjK7JhfCyg7799sJeflVad69B0hLsN955wAGShSWBHYg4xD0MhWaTpp5FFFevVBm q/bou/C9SVBTSOi3c0D6AbnNwZ4Dvke1/COpiSsYqWk1/Sk8EJoShHaYjhA3NVG12Ush nLRA== X-Gm-Message-State: AHQUAuaIeRXaN6jh25FvCeO7DPa+8lDeoKyo3B2DS9M0BLco67LxwQ/O HF2s/R7wG7YLNg9cHgd06dF60D/sidE= X-Google-Smtp-Source: AHgI3IZeTzRXHeHox5GTEKmn8CVAH6Yt98RyQXwL7dFVEYpe1wDBVYxm/PibHWzvIX5jj9AZXnyYoA== X-Received: by 2002:aa7:8249:: with SMTP id e9mr6786777pfn.6.1551103716607; Mon, 25 Feb 2019 06:08:36 -0800 (PST) Received: from localhost.localdomain ([150.109.119.235]) by smtp.gmail.com with ESMTPSA id e21sm22765214pfh.45.2019.02.25.06.08.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 06:08:35 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/2] drm: export drm_timeout_abs_to_jiffies Date: Mon, 25 Feb 2019 22:07:16 +0800 Message-Id: <20190225140717.20586-2-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190225140717.20586-1-yuq825@gmail.com> References: <20190225140717.20586-1-yuq825@gmail.com> 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:in-reply-to:references; bh=t8VvF5419W/4u8buRvmUrkQMsg4ZZ8tZO+CGF235jGo=; b=F3Zlt9Rc5eoD7ef7dWT0D2f1ophRUbg91WojBcrp+k80Zll22Zo+CCxrMn+8SzA2hB Gi5WPVfM0lgBGMDERAEQe72QzfVNF5+6nbhZoeXtJiv1Fvbs2vnqjQEwRfuA69aOS8LG J1X2RQVbWDvBSWWl6XCqz4bdHecwCdF/p7pYoqkXLP3k0ZVGUACRzhzupJqyj22UeuIT h7qpO6srEGo9PrsjLBjL6UukVQBrMlQrkODMqzD48uIuuVY4LXEIegjI4RySpkp93DMh GQo+owvXCAC4zzfe94pjaZKFMU9AYpZw9j9OAgtHo31ixQGQeWZefu/zyrbwyJAq/61I LVkw== 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: lima@lists.freedesktop.org, Maxime Ripard , David Airlie , Qiang Yu , Sean Paul MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP For other driver like lima usage. Cc: Rob Herring Signed-off-by: Qiang Yu --- drivers/gpu/drm/drm_syncobj.c | 3 ++- include/drm/drm_utils.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index db30a0e89db8..23fb1a5e4fda 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -762,7 +762,7 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs, * * Calculate the timeout in jiffies from an absolute time in sec/nsec. */ -static signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec) +signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec) { ktime_t abs_timeout, now; u64 timeout_ns, timeout_jiffies64; @@ -786,6 +786,7 @@ static signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec) return timeout_jiffies64 + 1; } +EXPORT_SYMBOL(drm_timeout_abs_to_jiffies); static int drm_syncobj_array_wait(struct drm_device *dev, struct drm_file *file_private, diff --git a/include/drm/drm_utils.h b/include/drm/drm_utils.h index a803988d8579..70775748d243 100644 --- a/include/drm/drm_utils.h +++ b/include/drm/drm_utils.h @@ -10,6 +10,10 @@ #ifndef __DRM_UTILS_H__ #define __DRM_UTILS_H__ +#include + int drm_get_panel_orientation_quirk(int width, int height); +signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec); + #endif