From patchwork Mon Jun 18 15:35:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10472117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D2A2D601D7 for ; Mon, 18 Jun 2018 15:37:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3756289DD for ; Mon, 18 Jun 2018 15:37:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7D4528B08; Mon, 18 Jun 2018 15:37:08 +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, 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 50433289DD for ; Mon, 18 Jun 2018 15:37:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E44C46E07F; Mon, 18 Jun 2018 15:37:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6B006E07F; Mon, 18 Jun 2018 15:37:04 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MBCPl-1fKnjt2bAr-00AIhq; Mon, 18 Jun 2018 17:36:52 +0200 From: Arnd Bergmann To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" Subject: [PATCH 1/2] amdgpu: display: use modern ktime accessors Date: Mon, 18 Jun 2018 17:35:10 +0200 Message-Id: <20180618153649.2015346-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:umsIqZTYk65nIOAMmpzwLpWL5u8ImQJ5rWj9gtL+ZRvrmMMC8xm Aw7nhgvySm0hxF74R58WsTbwxPV9hnwSh6Q+l9hfmDwZY2MyzMUCv4an74skto9qtYOSNi3 7mmePBstEtb40MigtaBIT4e2sNsM62nxLj4VXbUYzM43uP5jTLyf2BKtUeEpSI9TaV44GgE Ajvji/GbHsbU6cChgRzgw== X-UI-Out-Filterresults: notjunk:1; V01:K0:NEAG4fL1p+g=:cKodtql/M4riIKlQ8m1QVU 03qz6tEq65SMrszdHGIZ2I6K1Wmk432P+kCf3nTtABUCDr02L/R7pXC28sb1ZF1jpjn5JecDw 2oUBr31b/WS1EMTZFVP5OpQbGkndfdAwAC942cCgFGndMz+K0P79G6F6h6/8NlyC3zIEbpVyR baurbEy+0NJu1VLbjbg5h/tOFO+l+ywMaGVNWofZJkE/Rzb73vNJoi6T2x/Lp8G1Q4CNWtSFJ Mi6Jmwp2Y77FffingxZtK9DwzL61xOm946fGCKKojQzmDeHvMAh5ksSmzf7+MZSSYDGl1/rDc dywLqw2V+qHcvfzi7z6ZDkAnIuiKiseCkG8Oz3tinlgLZvgukxzWvKEEZc1/nin/jCC0uIonb FtZ4uh539V1WqTLtzHqQLYyqMemQk+uheEYHHcwMdb2cF+BDJxGrmg8FZOHj7eX0JeunuVGcK 7KsO4WrL6BgMSmXdZeX7IL4IIXraLm+o443irddYYTuPHjv+Ehy6Y9tvDV5KKhMLPKDu2Vf64 FODrXj5tur55J891p8orxrgyuRbEhz84SrdCfnomAABMg4qrdKD8Guo+lQfNEy1VSdU93Ex3J PMCGRuGPdX4shF/xy5PadlEgLMrT7QeSGByeh73Plce+NaMyWn5DeNY2HL3plW0xS4d4a8KpB +Y+ivFKxLCn+gQwvnwUe3qT34itFt0zHIw76AxecyEArrAduFStXSJw+2BMAg7ZU3uJA= 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: Arnd Bergmann , y2038@lists.linaro.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, David Airlie , Dmytro Laktyushkin , dri-devel@lists.freedesktop.org, Dave Airlie , Tony Cheng , Rex Zhu MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP getrawmonotonic64() is deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() also simplifies the callers. Signed-off-by: Arnd Bergmann Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 8 -------- drivers/gpu/drm/amd/display/dc/dm_services.h | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c index 5a3346124a01..e861929dd981 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c @@ -35,14 +35,6 @@ #include "amdgpu_dm_irq.h" #include "amdgpu_pm.h" -unsigned long long dm_get_timestamp(struct dc_context *ctx) -{ - struct timespec64 time; - - getrawmonotonic64(&time); - return timespec64_to_ns(&time); -} - unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx, unsigned long long current_time_stamp, unsigned long long last_time_stamp) diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h index 4ff9b2bba178..eb5ab3978e84 100644 --- a/drivers/gpu/drm/amd/display/dc/dm_services.h +++ b/drivers/gpu/drm/amd/display/dc/dm_services.h @@ -339,7 +339,10 @@ bool dm_dmcu_set_pipe(struct dc_context *ctx, unsigned int controller_id); #define dm_log_to_buffer(buffer, size, fmt, args)\ vsnprintf(buffer, size, fmt, args) -unsigned long long dm_get_timestamp(struct dc_context *ctx); +static inline unsigned long long dm_get_timestamp(struct dc_context *ctx) +{ + return ktime_get_raw_ns(); +} unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx, unsigned long long current_time_stamp,