From patchwork Fri Dec 15 15:15:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 10115347 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 3C1B660231 for ; Fri, 15 Dec 2017 15:16:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A3F629EB9 for ; Fri, 15 Dec 2017 15:16:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EF0D29F48; Fri, 15 Dec 2017 15:16:30 +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 BC5F029F66 for ; Fri, 15 Dec 2017 15:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756810AbdLOPQ3 (ORCPT ); Fri, 15 Dec 2017 10:16:29 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39642 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756747AbdLOPQ2 (ORCPT ); Fri, 15 Dec 2017 10:16:28 -0500 Received: by mail-wm0-f67.google.com with SMTP id i11so18170648wmf.4 for ; Fri, 15 Dec 2017 07:16:28 -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=u/vikYHrlNpSeJXvWdztfIoIEoNdqS3qPJaysgqBWfg=; b=vVUnZBibOLMhB7+HAAtYyFeHvL/mtGPHOiz/do+Z5OxQpalnMlBPeJlAEJW0+27X7e snygCCUfmbcEiMJmSLy3t7CUX8mAZ6UoUrKC7DRYiogNeqFdfOjwrSMwFXXNGXHjD5+F Z/cQ/Cgg/lcUzhgWXOfZFf3tgb7ewhYVZsgXbHArj6a8HhzZov+w5SnmMrw8/dN22rAU WakpUtDCX1ApQ9zRX1lGZb1zyYiejfA8p1L4vH4ylLp2EyIfDhtVyTKjNU9e8ZQPfUFI 4tf4NK0r4Src3Yo/T/ds7QykZ/ybPs8aTh+5ao0KkIWnGMDPRLhRoMV2+iXMahJYg9tH 7Ldg== 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=u/vikYHrlNpSeJXvWdztfIoIEoNdqS3qPJaysgqBWfg=; b=VaX9I7YTDx/JaJUwfrU5culsJAQjWZl2XfrDbBVSREwGtnThqtghoz/7zu8pZhnSXT E+w86k1V3yMiucJ6MnQ3PbE8bNhdZsTFKy6N1C/Jvv0/1EWL0cQ5Sddr0Wt6wOOg3ghz Lpf3uuZ8Wf20/eL2SH93JXKp6Ob1rE7nwJcGtYiniNoZHh7usfEyuzxSR9My/+7jeB66 62UAYyIJSfq96HRCxmn70QgT1KcrAIXIoybST3v7FjvSfiLjrlAWXfh8vtfnpJHPMOsD 8N1W7deTNAgmUA6hPFkyeT4RR6vwXv9BmeuiTKlvppY8D/xvTRghQH/mcR1RonXJfxhB +mKQ== X-Gm-Message-State: AKGB3mIqhj4Uec9t+YpUhdqLuzHT/SWiesEudDcf0ah7MhLkrJaf2wZs Ro7fiBJKZBGqtLMchlF0bWdX44Q= X-Google-Smtp-Source: ACJfBouDAzfCdmb4+3bTVUIHQksEg8wvwe8OZgINeMNKw6kfh+1+sfJ7g5H188l7mptlERncTLPCnA== X-Received: by 10.28.0.193 with SMTP id 184mr5837504wma.58.1513350987282; Fri, 15 Dec 2017 07:16:27 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Dec 2017 07:16:26 -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 5/7] drm/img-rogue: dma_ops->sync_single_for_*() -> dma_sync_single_for_*() Date: Fri, 15 Dec 2017 16:15:43 +0100 Message-Id: <1513350945-2642-6-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_arm64.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/services/server/env/linux/osfunc_arm64.c b/services/server/env/linux/osfunc_arm64.c index 8b7f06d..70f747b 100644 --- a/services/server/env/linux/osfunc_arm64.c +++ b/services/server/env/linux/osfunc_arm64.c @@ -121,18 +121,12 @@ void OSFlushCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); - dma_ops->sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#else - dma_ops->sync_single_for_device(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); - dma_ops->sync_single_for_cpu(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#endif + dma_sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); } void OSCleanCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, @@ -142,16 +136,11 @@ void OSCleanCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); -#else - dma_ops->sync_single_for_device(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); -#endif + dma_sync_single_for_device(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_TO_DEVICE); } void OSInvalidateCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, @@ -161,16 +150,11 @@ void OSInvalidateCPUCacheRangeKM(PVRSRV_DEVICE_NODE *psDevNode, IMG_CPU_PHYADDR sCPUPhysEnd) { struct device *dev = psDevNode->psDevConfig->pvOSDevice; - struct dma_map_ops *dma_ops = get_dma_ops(dev); PVR_UNREFERENCED_PARAMETER(pvVirtStart); PVR_UNREFERENCED_PARAMETER(pvVirtEnd); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - dma_ops->sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#else - dma_ops->sync_single_for_cpu(NULL, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); -#endif + dma_sync_single_for_cpu(dev, sCPUPhysStart.uiAddr, sCPUPhysEnd.uiAddr - sCPUPhysStart.uiAddr, DMA_FROM_DEVICE); } PVRSRV_CACHE_OP_ADDR_TYPE OSCPUCacheOpAddressType(PVRSRV_CACHE_OP uiCacheOp)