From patchwork Wed Nov 19 11:15:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 41131 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 080C720CBB for ; Wed, 19 Nov 2014 11:16:34 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf540917wiv.9 for ; Wed, 19 Nov 2014 03:16:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=lCq2/FTAiso7S8TxlbaCM3olQ6RBOHK0JkA9Ua4plcc=; b=Do30iI2TaMpLKrzfeYM0bxJ228xYmdpaTFxBJ2RPws93MGizLvietGeSANxXkQzPW1 okxohAojOJWuweHtcEInrsskvy3neOFzesCgjNz8EMgmEgcQVhqn/X9ygSZkPlwpvMpW M/d0UBpBU0uHOgN0rS0E/WwEV/DtNOJeru1MQNKSWpUL8/FXxdQCWZ0vTM2Cu4dqoXzy rrvGVN9wqN7l0C8WcqoOWVuZJzqY2GKBVr9J84VKt8UZ1RfkOos84EJPcj6D4PRVCdD6 lUnH1oO/lSfGTU9bvCEmXkPtwZ+Kdex22ZypgYal/X6w0py2yutml7RpfcFHSj3IhQp7 Klww== X-Gm-Message-State: ALoCoQmQaJIVaD6SBBTrwDieSX2/pBQTp4jS0EbJrVTCNpyYi/GEQdkqg04wB8Azw3S4tMc5FcwR X-Received: by 10.152.36.135 with SMTP id q7mr378855laj.8.1416395793290; Wed, 19 Nov 2014 03:16:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.131 with SMTP id ei3ls305743lad.106.gmail; Wed, 19 Nov 2014 03:16:33 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr4671445laj.67.1416395793150; Wed, 19 Nov 2014 03:16:33 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id n4si1500541lan.14.2014.11.19.03.16.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 03:16:33 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id n15so295819lbi.4 for ; Wed, 19 Nov 2014 03:16:33 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr4643713lbr.74.1416395793070; Wed, 19 Nov 2014 03:16:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp64271lbc; Wed, 19 Nov 2014 03:16:32 -0800 (PST) X-Received: by 10.70.135.41 with SMTP id pp9mr45714270pdb.77.1416395788889; Wed, 19 Nov 2014 03:16:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xo9si2087857pbc.210.2014.11.19.03.16.28 for ; Wed, 19 Nov 2014 03:16:28 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150AbaKSLQ1 (ORCPT + 4 others); Wed, 19 Nov 2014 06:16:27 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:23330 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754004AbaKSLQ1 (ORCPT ); Wed, 19 Nov 2014 06:16:27 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFA00JRTA44RH40@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 19 Nov 2014 11:19:17 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-b3-546c7c08553c Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 98.A2.24279.80C7C645; Wed, 19 Nov 2014 11:16:24 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NFA00GC59YMTL30@eusync1.samsung.com>; Wed, 19 Nov 2014 11:16:24 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v3 04/19] drm: exynos: detach from default dma-mapping domain on init Date: Wed, 19 Nov 2014 12:15:33 +0100 Message-id: <1416395748-10731-5-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t/xy7ocNTkhBt/vyln8nXSM3WLiysnM FpPuT2CxWLDf2qJz9gZ2i94FV9kszja9YbfonLiE3eLLlYdMFpseX2O1mHF+H5PF2iN32S1O Xf/MZvGv9yCjxf89O9gtjjzczW6xatcfRovbv/ksXn48weIg7PHk4DwmjzXz1jB6/P41idFj 56y77B6zO2ayemxeoeWxaVUnm8fmJfUet/89ZvaYfGM5o8eVE02sHr3N79g8+rasYvT4vEku gC+KyyYlNSezLLVI3y6BK+P29aCC+2wVF2a3MjUwvmLtYuTkkBAwkWg+3wpli0lcuLeerYuR i0NIYCmjxNO+vywQTh+TxJobi9lBqtgEDCW63naxgdgiAvkSL/aCFHFyMAu8YZG4t8mwi5GD Q1ggXOLVK1sQk0VAVeLQczGQCl4BD4mLj64xQeySk/j/cgUTSAmngKfE9RdgQ4SASpqmr2Od wMi7gJFhFaNoamlyQXFSeq6RXnFibnFpXrpecn7uJkZIZHzdwbj0mNUhRgEORiUe3obinBAh 1sSy4srcQ4wSHMxKIrzFhUAh3pTEyqrUovz4otKc1OJDjEwcnFINjJOO8LEJqJZHHnJaPLvU M3nuFI7gVVc7Q/7ez+tne/Lk1emZp0RuKr2Plb2ysIZ/0l3tnSzmR50VWHpifdfcndHXza9x 9taZKcF5FlPbNzlknzgRH8xwMtnLRbT9bIaLY90fxn0XDjM+MOren1a1T+nWdVmzE4kfXi4U /nnzzv3+tC7HLTPSJiuxFGckGmoxFxUnAgCoskztagIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds code, which detach sub-device nodes from default iommu domain if such has been configured. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index b32b291f88ff..323601a52a25 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c @@ -100,6 +100,9 @@ int drm_iommu_attach_device(struct drm_device *drm_dev, dma_set_max_seg_size(subdrv_dev, 0xffffffffu); + if (subdrv_dev->archdata.mapping) + arm_iommu_detach_device(subdrv_dev); + ret = arm_iommu_attach_device(subdrv_dev, dev->archdata.mapping); if (ret < 0) { DRM_DEBUG_KMS("failed iommu attach.\n");