From patchwork Wed Jan 23 09:39:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10776847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9AE366C2 for ; Wed, 23 Jan 2019 09:39:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8945A2A81C for ; Wed, 23 Jan 2019 09:39:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D3B02A87D; Wed, 23 Jan 2019 09:39:58 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 226342A81C for ; Wed, 23 Jan 2019 09:39:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BA026E081; Wed, 23 Jan 2019 09:39:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id C90D46E081 for ; Wed, 23 Jan 2019 09:39:54 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id l9so1542403wrt.13 for ; Wed, 23 Jan 2019 01:39:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AP+iSAaDHNCQCHK9yEdolr4Di03CanV+8oI/QFXgfJU=; b=mhJ1bDwkMiwnJNjCpEziPrjlAO41xXxPi1c3jTVUWjeSuVc0l/k2C07rHn1nm2z2l0 Qvj1EO2RJN37Cypt2JW9WFCiqXe+/6ZiDWXKz/qwspD+qaYVl3OFHds+j/nU8fhHxvA3 jOFrj3GLqtV82FFGVNjlJILs/hhuvSPWQI0KO3JlnxYCYl02atf/G/ov7NyLSi0NVAze dQDAGswWxteg6L6xGPJ5zDDrPv6aBFaappO1NT1F6SKurJ3pUueA6w+SME35/KnIj1/g IZTeoFBj4OfPNC5l2QMZP0hqa0y2EWpnB+KSuiuAwt84bsH4vHjG2k8G7md2de8jB41J zApw== X-Gm-Message-State: AJcUukfYzoDPd5jCplkoEwM45p35lRskUl0gP1vUvA7IFNYm1LvvmQEe j0xShGYwj29/S1Atw8xm1r4= X-Google-Smtp-Source: ALg8bN6x1vw9CmwHoru9yCntpQawb/LtuwZZsoMmGxMeVuwdJ6ee0+Jsx/tdL3RhKr1SUh3I3ijUbQ== X-Received: by 2002:adf:fd87:: with SMTP id d7mr1783776wrr.74.1548236393354; Wed, 23 Jan 2019 01:39:53 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id v16sm80435602wrs.75.2019.01.23.01.39.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Jan 2019 01:39:52 -0800 (PST) From: Thierry Reding To: Thierry Reding Subject: [PATCH 0/5] drm/tegra: Fix IOVA space on Tegra186 and later Date: Wed, 23 Jan 2019 10:39:46 +0100 Message-Id: <20190123093951.24908-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 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: linux-tegra@vger.kernel.org, Dmitry Osipenko , dri-devel@lists.freedesktop.org, Mikko Perttunen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Tegra186 and later are different than earlier generations in that they use an ARM SMMU rather than the Tegra SMMU. The ARM SMMU driver behaves slightly differently in that the geometry for IOMMU domains is set only after a device was attached to it. This is to make sure that the SMMU instance that the domain belongs to is known, because each instance can have a different input address space (i.e. geometry). Work around this by moving all IOVA allocations to a point where the geometry of the domain is properly initialized. This supersedes the following patch: https://patchwork.kernel.org/patch/10775579/ Thierry Thierry Reding (5): drm/tegra: Store parent pointer in Tegra DRM clients drm/tegra: vic: Load firmware on demand drm/tegra: Setup shared IOMMU domain after initialization drm/tegra: Restrict IOVA space to DMA mask gpu: host1x: Supports 40-bit addressing on Tegra186 drivers/gpu/drm/tegra/drm.c | 57 +++++++++++++++++++++---------------- drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/vic.c | 17 ++++++----- drivers/gpu/host1x/dev.c | 2 +- 4 files changed, 44 insertions(+), 33 deletions(-)