From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C156BC433E3 for ; Mon, 17 Aug 2020 09:27:36 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DD39207DF for ; Mon, 17 Aug 2020 09:27:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="vqk5sYZZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DD39207DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 269828764B; Mon, 17 Aug 2020 09:27:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KhykUK9BMOHH; Mon, 17 Aug 2020 09:27:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 6EBFB8757D; Mon, 17 Aug 2020 09:27:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5FFC3C07FF; Mon, 17 Aug 2020 09:27:33 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DED8AC0051 for ; Mon, 17 Aug 2020 09:27:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CE62F87A8D for ; Mon, 17 Aug 2020 09:27:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pSRytks7DTQn for ; Mon, 17 Aug 2020 09:27:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by hemlock.osuosl.org (Postfix) with ESMTPS id 569478712D for ; Mon, 17 Aug 2020 09:27:31 +0000 (UTC) Received: from coco.lan (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E6CF2072D; Mon, 17 Aug 2020 09:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597656451; bh=J/kOpSEU8RbORM5aCdkVXUkRjQk8bFOWgJybhAWbpJU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vqk5sYZZ5vFZvh+OqPDYux84g9ZoKEUfl5z4tXlktjbc5mbcZQo9e27w5hlB9T2ZO hUtwy0hXhHzgSFFRkZjOfcnrDWyr8IUSf4FplhzqtGDtOHOLFXvmhtO/K4kBNzavLa F3lePsGgArFX+LDzGfPRsQr7vKYAV3zzh8B8ZqAs= Date: Mon, 17 Aug 2020 11:27:25 +0200 From: Mauro Carvalho Chehab To: Christoph Hellwig Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970 Message-ID: <20200817112725.26f1b7d6@coco.lan> In-Reply-To: <20200817082106.GA16296@infradead.org> References: <20200817082106.GA16296@infradead.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Joerg Roedel , Manivannan Sadhasivam , Greg Kroah-Hartman , linuxarm@huawei.com, Wei Xu , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , John Stultz , Chenfeng , mauro.chehab@huawei.com, Suzhuangluan , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Christoph, Em Mon, 17 Aug 2020 09:21:06 +0100 Christoph Hellwig escreveu: > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > > Add a driver for the Kirin 960/970 iommu. > > > > As on the past series, this starts from the original 4.9 driver from > > the 96boards tree: > > > > https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 > > > > The remaining patches add SPDX headers and make it build and run with > > the upstream Kernel. > > Please don't add iommu drivers to staging, and just work with the > maintainers to properly clean it up. I need to start from the original patch in order to preserve its authorship. My plan is to work with the iommu subsystem maintainers after have this (and another pending patch series for DRM) merged. > I also don't think adding a totally out of date not compiling version > is a good idea. Please do a proper rollup, and if required (probably > not in this case), split it into useful chunks. This series make this driver working as expected. I mean, while patch 01/16 is against Kernel 4.9, the other patches on this series ports it to upstream, cleans up the driver and address several issues on it. This specific IOMMU seems to be an specific part of the SoC dedicated for the display engine and by the encoding/decoding images via the ISP. With this series, this driver builds and runs as expected, providing IOMMU support needed by the upcoming KMS/DRM driver. The only issue on it (as far as I can tell) is that the DT bindings require some work, as, instead of using dma-ranges, the DRM driver binds into it with: smmu_lpae { compatible = "hisilicon,smmu-lpae"; }; dpe: dpe@e8600000 { compatible = "hisilicon,kirin970-dpe"; ... iommu_info { start-addr = <0x8000>; size = <0xbfff8000>; }; }; In order to properly address it, the best would be to also have the DRM driver merged upstream, as it relies on it. So, a change in DT will also mean a change at the way the DRM uses it. The DRM itself should go via staging, as it has some bugs that I'd like to fix before moving it to drivers/gpu/drm. Those are more tricky to solve, as they seem to require using different settings for some hardware registers, and the downstream driver also have the same issues. Fixing them will likely require some time. Thanks, Mauro _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68917C433E1 for ; Mon, 17 Aug 2020 09:33:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 248672072D for ; Mon, 17 Aug 2020 09:33:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y4mAnZd7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="vqk5sYZZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 248672072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f+wr9qph3cyIaasN+RQRvXYUjourdLuU1rs4gDaAkp0=; b=Y4mAnZd7OkrmYI8DK1yEHcABL diBpn0TtNhb2utVDX2GSHtXd/a6+J0uv6Dj3An7mA81Lf9wJAPwqNze+ocxAOpUL+7BA/J8pVyssM qFlLp3KISPjakwT432P96bPLf2xQFQ/PQ2VuTG/TYRvuj6PetIFHACL2xKMi7+LZ9J5Dbh2H/9vVc SPF06hRz/W48ra2fAIfg7z4fOLNhzQk3swJvVFEU9x386Uik5RCzaCGb0HgpnyE3jQ6lBQnWqak/9 kgQE7fLtFwl3jCUmkCU6sK6U9KndGUx0yWdcmUhgpcfE8F7KUiy/3eKiA5WDpigFtDbgGlxWIWmLj X9Pjm7oUw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7bU9-0002qK-O3; Mon, 17 Aug 2020 09:31:21 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7bQV-0000tE-99 for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2020 09:27:37 +0000 Received: from coco.lan (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E6CF2072D; Mon, 17 Aug 2020 09:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597656451; bh=J/kOpSEU8RbORM5aCdkVXUkRjQk8bFOWgJybhAWbpJU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vqk5sYZZ5vFZvh+OqPDYux84g9ZoKEUfl5z4tXlktjbc5mbcZQo9e27w5hlB9T2ZO hUtwy0hXhHzgSFFRkZjOfcnrDWyr8IUSf4FplhzqtGDtOHOLFXvmhtO/K4kBNzavLa F3lePsGgArFX+LDzGfPRsQr7vKYAV3zzh8B8ZqAs= Date: Mon, 17 Aug 2020 11:27:25 +0200 From: Mauro Carvalho Chehab To: Christoph Hellwig Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970 Message-ID: <20200817112725.26f1b7d6@coco.lan> In-Reply-To: <20200817082106.GA16296@infradead.org> References: <20200817082106.GA16296@infradead.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_052735_592881_AD8373A0 X-CRM114-Status: GOOD ( 25.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Joerg Roedel , Manivannan Sadhasivam , Greg Kroah-Hartman , Joerg Roedel , linuxarm@huawei.com, Wei Xu , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , John Stultz , Chenfeng , mauro.chehab@huawei.com, Suzhuangluan , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Christoph, Em Mon, 17 Aug 2020 09:21:06 +0100 Christoph Hellwig escreveu: > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > > Add a driver for the Kirin 960/970 iommu. > > > > As on the past series, this starts from the original 4.9 driver from > > the 96boards tree: > > > > https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 > > > > The remaining patches add SPDX headers and make it build and run with > > the upstream Kernel. > > Please don't add iommu drivers to staging, and just work with the > maintainers to properly clean it up. I need to start from the original patch in order to preserve its authorship. My plan is to work with the iommu subsystem maintainers after have this (and another pending patch series for DRM) merged. > I also don't think adding a totally out of date not compiling version > is a good idea. Please do a proper rollup, and if required (probably > not in this case), split it into useful chunks. This series make this driver working as expected. I mean, while patch 01/16 is against Kernel 4.9, the other patches on this series ports it to upstream, cleans up the driver and address several issues on it. This specific IOMMU seems to be an specific part of the SoC dedicated for the display engine and by the encoding/decoding images via the ISP. With this series, this driver builds and runs as expected, providing IOMMU support needed by the upcoming KMS/DRM driver. The only issue on it (as far as I can tell) is that the DT bindings require some work, as, instead of using dma-ranges, the DRM driver binds into it with: smmu_lpae { compatible = "hisilicon,smmu-lpae"; }; dpe: dpe@e8600000 { compatible = "hisilicon,kirin970-dpe"; ... iommu_info { start-addr = <0x8000>; size = <0xbfff8000>; }; }; In order to properly address it, the best would be to also have the DRM driver merged upstream, as it relies on it. So, a change in DT will also mean a change at the way the DRM uses it. The DRM itself should go via staging, as it has some bugs that I'd like to fix before moving it to drivers/gpu/drm. Those are more tricky to solve, as they seem to require using different settings for some hardware registers, and the downstream driver also have the same issues. Fixing them will likely require some time. Thanks, Mauro _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA808C433DF for ; Mon, 17 Aug 2020 09:27:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAFD5207DF for ; Mon, 17 Aug 2020 09:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597656452; bh=J/kOpSEU8RbORM5aCdkVXUkRjQk8bFOWgJybhAWbpJU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=dqA41FKqj6wP02whKASRuwaFyeXge37XHs4VzHZ28qUtzJG5Ts3LjKIcPp7C8wRr/ AO/qQ7kpq6pdWTdUQecw2D+TsGwC0Wd8SsDyKJKOlmV8BReKDMBePlGJ+Vzlr7+4td or1MHpL8+SWpWvG40txbEOgRKp5haAkom+Q+OBtA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgHQJ1c (ORCPT ); Mon, 17 Aug 2020 05:27:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:36802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbgHQJ1b (ORCPT ); Mon, 17 Aug 2020 05:27:31 -0400 Received: from coco.lan (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E6CF2072D; Mon, 17 Aug 2020 09:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597656451; bh=J/kOpSEU8RbORM5aCdkVXUkRjQk8bFOWgJybhAWbpJU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vqk5sYZZ5vFZvh+OqPDYux84g9ZoKEUfl5z4tXlktjbc5mbcZQo9e27w5hlB9T2ZO hUtwy0hXhHzgSFFRkZjOfcnrDWyr8IUSf4FplhzqtGDtOHOLFXvmhtO/K4kBNzavLa F3lePsGgArFX+LDzGfPRsQr7vKYAV3zzh8B8ZqAs= Date: Mon, 17 Aug 2020 11:27:25 +0200 From: Mauro Carvalho Chehab To: Christoph Hellwig Cc: Greg Kroah-Hartman , linuxarm@huawei.com, mauro.chehab@huawei.com, John Stultz , Manivannan Sadhasivam , Rob Herring , linux-arm-kernel@lists.infradead.org, Wei Xu , devicetree@vger.kernel.org, Joerg Roedel , Joerg Roedel , iommu@lists.linux-foundation.org, Chenfeng , devel@driverdev.osuosl.org, Suzhuangluan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970 Message-ID: <20200817112725.26f1b7d6@coco.lan> In-Reply-To: <20200817082106.GA16296@infradead.org> References: <20200817082106.GA16296@infradead.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Christoph, Em Mon, 17 Aug 2020 09:21:06 +0100 Christoph Hellwig escreveu: > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > > Add a driver for the Kirin 960/970 iommu. > > > > As on the past series, this starts from the original 4.9 driver from > > the 96boards tree: > > > > https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 > > > > The remaining patches add SPDX headers and make it build and run with > > the upstream Kernel. > > Please don't add iommu drivers to staging, and just work with the > maintainers to properly clean it up. I need to start from the original patch in order to preserve its authorship. My plan is to work with the iommu subsystem maintainers after have this (and another pending patch series for DRM) merged. > I also don't think adding a totally out of date not compiling version > is a good idea. Please do a proper rollup, and if required (probably > not in this case), split it into useful chunks. This series make this driver working as expected. I mean, while patch 01/16 is against Kernel 4.9, the other patches on this series ports it to upstream, cleans up the driver and address several issues on it. This specific IOMMU seems to be an specific part of the SoC dedicated for the display engine and by the encoding/decoding images via the ISP. With this series, this driver builds and runs as expected, providing IOMMU support needed by the upcoming KMS/DRM driver. The only issue on it (as far as I can tell) is that the DT bindings require some work, as, instead of using dma-ranges, the DRM driver binds into it with: smmu_lpae { compatible = "hisilicon,smmu-lpae"; }; dpe: dpe@e8600000 { compatible = "hisilicon,kirin970-dpe"; ... iommu_info { start-addr = <0x8000>; size = <0xbfff8000>; }; }; In order to properly address it, the best would be to also have the DRM driver merged upstream, as it relies on it. So, a change in DT will also mean a change at the way the DRM uses it. The DRM itself should go via staging, as it has some bugs that I'd like to fix before moving it to drivers/gpu/drm. Those are more tricky to solve, as they seem to require using different settings for some hardware registers, and the downstream driver also have the same issues. Fixing them will likely require some time. Thanks, Mauro