From patchwork Fri Dec 15 15:15:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 10115349 X-Patchwork-Delegate: geert@linux-m68k.org 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 59A1260231 for ; Fri, 15 Dec 2017 15:16:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47CD729EB9 for ; Fri, 15 Dec 2017 15:16:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CF1A29F62; Fri, 15 Dec 2017 15:16:31 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFA9D29EB9 for ; Fri, 15 Dec 2017 15:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756815AbdLOPQa (ORCPT ); Fri, 15 Dec 2017 10:16:30 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:46410 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756747AbdLOPQa (ORCPT ); Fri, 15 Dec 2017 10:16:30 -0500 Received: by mail-wr0-f196.google.com with SMTP id x49so8317554wrb.13 for ; Fri, 15 Dec 2017 07:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qvb5M64tVYh1biUDOJDLBi7HrdTUSQZu1IoyPDdwf1A=; b=plbvge7J6VU473cXIGg9JhReCyQ0Pee76WyFdCiA4alS2ezU1z1AxOsf8Gbxw6Nu18 8jZirhF0IIauJ6HOuE421pimi3SycllAofZ+d+TsaLGt7Yxf2FAW/cnATcdfgmmwc3eF FVVt6J9zto04jIn0XdwdTNMkriabDDNAmt/KAWi60MBcGBY9Z+I6RKmcUbH4mG8WapD7 2zAyIWtRnjXMljAPrV4RfRIu/kCtQaorXjYG4Eh6r0aUvqpQ4Z/B6R+X0gYB6S+Lc0z0 2OdFvQrYbFsEwsyhrKCNOpBfDPI/OteYvTrTWPUWq+LXditiKXIb5m36XjaVayjpdnK4 cNsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Qvb5M64tVYh1biUDOJDLBi7HrdTUSQZu1IoyPDdwf1A=; b=FJsnKbKKujj3vah4LCFkx0pbUCN/u57gBSFmefJ320D8TAujfSIu7Eoe8tdpMdkClj VYx9ePshWMynV0ZgkH5uzGOcfHnyQhqa4dhD9P/FTpr+vSw6C5myTQeMo5coMU08TlNU AxXMw6S4b8RY/f7vEn5+oXKkyxomIRBvHMyCRmq9zEzS5AKNMAai563998l4NcLu5Vc+ FRk0V14Rj4ZXMXKwbl6Et4mhAamwtg4nzWVV1TydnZ8j/1qgTdTZNAckNYHHfYlZE/mn x7ekb9tN6hwokzOLnHvJHkcr/G8aXL98ANobsA21OGpXTSH4bRVEx3n3qbDMIBhU+NsI RntQ== X-Gm-Message-State: AKGB3mJo+U43rXJkvh2MPEhHD7ffP1wPfpDwGDcdoOvIMDNgcdbfj2/k SdPD4v9/LOgTdTeJGdpxot6UhAA= X-Google-Smtp-Source: ACJfBosqjFnZTTpg8BYgsqCf9sA6k0ozk9xJtBydkdaBsCNuGFV4iBanyeaHgiddYRuoNKnHlE89qg== X-Received: by 10.223.157.138 with SMTP id p10mr10620902wre.28.1513350988644; Fri, 15 Dec 2017 07:16:28 -0800 (PST) Received: from groucho.site (ipbcc3b865.dynamic.kabel-deutschland.de. [188.195.184.101]) by smtp.gmail.com with ESMTPSA id j132sm28537735wmd.2.2017.12.15.07.16.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Dec 2017 07:16:28 -0800 (PST) From: Ulrich Hecht To: linux-renesas-soc@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com, Ulrich Hecht Subject: [PATCH 6/7] drm/img-rogue: init_timer() -> setup_timer() Date: Fri, 15 Dec 2017 16:15:44 +0100 Message-Id: <1513350945-2642-7-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513350945-2642-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1513350945-2642-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ulrich Hecht --- services/server/env/linux/osfunc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/services/server/env/linux/osfunc.c b/services/server/env/linux/osfunc.c index c222095..b529c63 100644 --- a/services/server/env/linux/osfunc.c +++ b/services/server/env/linux/osfunc.c @@ -492,7 +492,7 @@ static inline IMG_UINT64 KClockns64(void) { ktime_t sTime = ktime_get(); - return sTime.tv64; + return sTime; } PVRSRV_ERROR OSClockMonotonicns64(IMG_UINT64 *pui64Time) @@ -1135,9 +1135,9 @@ static void OSTimerCallbackBody(TIMER_CALLBACK_DATA *psTimerCBData) @Description OS specific timer callback wrapper function @Input uData Timer callback data */ /**************************************************************************/ -static void OSTimerCallbackWrapper(uintptr_t uData) +static void OSTimerCallbackWrapper(struct timer_list *t) { - TIMER_CALLBACK_DATA *psTimerCBData = (TIMER_CALLBACK_DATA*)uData; + TIMER_CALLBACK_DATA *psTimerCBData = from_timer(psTimerCBData, t, sTimer); #if defined(PVR_LINUX_TIMERS_USING_WORKQUEUES) || defined(PVR_LINUX_TIMERS_USING_SHARED_WORKQUEUE) int res; @@ -1219,12 +1219,8 @@ IMG_HANDLE OSAddTimer(PFN_TIMER_FUNC pfnTimerFunc, void *pvData, IMG_UINT32 ui32 psTimerCBData->ui32Delay = ((HZ * ui32MsTimeout) < 1000) ? 1 : ((HZ * ui32MsTimeout) / 1000); - /* initialise object */ - init_timer(&psTimerCBData->sTimer); - /* setup timer object */ - psTimerCBData->sTimer.function = (void *)OSTimerCallbackWrapper; - psTimerCBData->sTimer.data = (uintptr_t)psTimerCBData; + timer_setup(&psTimerCBData->sTimer, OSTimerCallbackWrapper, 0); return (IMG_HANDLE)(uintptr_t)(ui32i + 1); }