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: 139027 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4095641lji; Mon, 18 Jun 2018 08:37:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLvKHPXexq5inLOoFDBbIwK6WxW4fMqaAwCXzg0bWtWm7O/80XWORHH6hqcA8u648F+9S2T X-Received: by 2002:a62:701:: with SMTP id b1-v6mr14151409pfd.252.1529336227995; Mon, 18 Jun 2018 08:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529336227; cv=none; d=google.com; s=arc-20160816; b=CqSpOvZeGOTOJPpMSvMdD8yBZYeFO2EWG6fDMKpzKypOTNfsWPfeTl5hda++E0H5XS yLzfVqXCYFuvp6fNTMV5TAiz7ZpVCnh3B9Etplb2ETeZ6Q6BvYKEyLU0Nf31GLLrt83t oyPIf39b8agzMiEBC4wYpRNkGVEFbAQ0Q9aO52afZDR9pZFQc4W4PERv/39n57dvvYjx mEJo00wLWiLWnMCLuxkNvsjX5uwLXsLNMxuieGrVRoVMeFX8WWfWVmY4lLpkqKPlSabL 2rTISS7iA59JJY7sQQMkqha2ZbGBvGydR1PDLO2HApwYwAOPootfK5iMVmn0O4ZX3pHC /rYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=LXuAMEiT893ykRM0uiQhm/9/kprb78jLqNFDl0siybA=; b=gY5CHe5t7c+Vb3K0eBA9oG8Q2U1sTKvJgTiojQ+aP0XY6KttG7xX7p8wCR3NyKU6dJ ldKG7pxSGhMIrbRT7+8wljJrtDaHZxvStFyIOV1eSM5lLdZKxRn6fk2fJzmZ4T4ujXRT izJNMu4P9u9Lsfa2VqKLTe2p/eRk7xIzS0MpaeO9reK4y5vD6M201E+ulCG28+qZTTJq 2vqalG+b/sGYki4zGwhZ1y8rB+T5KkG2041Phtq9dUz+r081sPLefI1rJO7lnhSOxTUP K9sPtQLWw+UJxkB0JpqNKeel8T8smjNXmaWF38J8Fz8w5gEMTrLKyxFfm7yT82mhVXuF ZAng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s193-v6si12506896pgc.372.2018.06.18.08.37.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 08:37:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) 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 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_K=C3=B6n?= =?utf-8?q?ig?= , "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" 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,