All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
	Joerg Roedel <jroedel@suse.de>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Chenfeng <puck.chen@hisilicon.com>,
	linuxarm@huawei.com, Wei Xu <xuwei5@hisilicon.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	iommu@lists.linux-foundation.org,
	Rob Herring <robh+dt@kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	mauro.chehab@huawei.com,
	Suzhuangluan <suzhuangluan@hisilicon.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970
Date: Mon, 17 Aug 2020 12:46:17 +0200	[thread overview]
Message-ID: <20200817124617.303bb4a9@coco.lan> (raw)
In-Reply-To: <20200817093703.GA2258686@kroah.com>

Em Mon, 17 Aug 2020 11:37:03 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:

> On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote:
> > Hi Christoph,
> > 
> > Em Mon, 17 Aug 2020 09:21:06 +0100
> > Christoph Hellwig <hch@infradead.org> 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.  
> 
> DRM drivers can't go through staging unless you get the DRM developers
> to agree with it, and last I heard, they were strongly against it.


Ok, I'll ping them. There's already a thread I opened at the DRM devel
ML about this driver. IMHO, there's nothing on this specific driver
that would prevent having it on staging for a while, until the two
or three remaining bugs gets fixed.

On the other hand, the code already follows the current DRM policies,
as far as I can tell. The bugs are related to some specific register
settings that would need to be better tuned (and maybe some delay
when waiting for EDID data at the already-existing adv7535 driver).
Maybe it would be preferred to have it at drivers/gpu even with
such bugs.

> It's _always_ faster to just do the work out-of-tree for a week or so
> and then merge it correctly to the proper part of the kernel tree.  I'd
> recommend doing that here for the iommu driver, as well as the DRM
> driver.

It is OK for me to working for a week or so, until the iommu people
become happy with that. 

The main reason of submitting via staging is that I need to preserve
the patch that added this driver as-is, in order to preserve its
SoB and not causing legal issues.

It it is OK for iommu to accept a submission like that, I can
re-submit it, doing the changes at drivers/iommu.

If not, besides this series, the only alternative I can think of is to 
merge it first at the staging, with the incremental changes, and with
a final patch moving the code out of staging.

Thanks,
Mauro
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
	Joerg Roedel <jroedel@suse.de>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Chenfeng <puck.chen@hisilicon.com>,
	Joerg Roedel <joro@8bytes.org>,
	linuxarm@huawei.com, Wei Xu <xuwei5@hisilicon.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	iommu@lists.linux-foundation.org,
	Rob Herring <robh+dt@kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	mauro.chehab@huawei.com,
	Suzhuangluan <suzhuangluan@hisilicon.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970
Date: Mon, 17 Aug 2020 12:46:17 +0200	[thread overview]
Message-ID: <20200817124617.303bb4a9@coco.lan> (raw)
In-Reply-To: <20200817093703.GA2258686@kroah.com>

Em Mon, 17 Aug 2020 11:37:03 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:

> On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote:
> > Hi Christoph,
> > 
> > Em Mon, 17 Aug 2020 09:21:06 +0100
> > Christoph Hellwig <hch@infradead.org> 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.  
> 
> DRM drivers can't go through staging unless you get the DRM developers
> to agree with it, and last I heard, they were strongly against it.


Ok, I'll ping them. There's already a thread I opened at the DRM devel
ML about this driver. IMHO, there's nothing on this specific driver
that would prevent having it on staging for a while, until the two
or three remaining bugs gets fixed.

On the other hand, the code already follows the current DRM policies,
as far as I can tell. The bugs are related to some specific register
settings that would need to be better tuned (and maybe some delay
when waiting for EDID data at the already-existing adv7535 driver).
Maybe it would be preferred to have it at drivers/gpu even with
such bugs.

> It's _always_ faster to just do the work out-of-tree for a week or so
> and then merge it correctly to the proper part of the kernel tree.  I'd
> recommend doing that here for the iommu driver, as well as the DRM
> driver.

It is OK for me to working for a week or so, until the iommu people
become happy with that. 

The main reason of submitting via staging is that I need to preserve
the patch that added this driver as-is, in order to preserve its
SoB and not causing legal issues.

It it is OK for iommu to accept a submission like that, I can
re-submit it, doing the changes at drivers/iommu.

If not, besides this series, the only alternative I can think of is to 
merge it first at the staging, with the incremental changes, and with
a final patch moving the code out of staging.

Thanks,
Mauro

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
	Joerg Roedel <jroedel@suse.de>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Joerg Roedel <joro@8bytes.org>,
	linuxarm@huawei.com, Wei Xu <xuwei5@hisilicon.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	Rob Herring <robh+dt@kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	Chenfeng <puck.chen@hisilicon.com>,
	mauro.chehab@huawei.com,
	Suzhuangluan <suzhuangluan@hisilicon.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/16] IOMMU driver for Kirin 960/970
Date: Mon, 17 Aug 2020 12:46:17 +0200	[thread overview]
Message-ID: <20200817124617.303bb4a9@coco.lan> (raw)
In-Reply-To: <20200817093703.GA2258686@kroah.com>

Em Mon, 17 Aug 2020 11:37:03 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:

> On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote:
> > Hi Christoph,
> > 
> > Em Mon, 17 Aug 2020 09:21:06 +0100
> > Christoph Hellwig <hch@infradead.org> 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.  
> 
> DRM drivers can't go through staging unless you get the DRM developers
> to agree with it, and last I heard, they were strongly against it.


Ok, I'll ping them. There's already a thread I opened at the DRM devel
ML about this driver. IMHO, there's nothing on this specific driver
that would prevent having it on staging for a while, until the two
or three remaining bugs gets fixed.

On the other hand, the code already follows the current DRM policies,
as far as I can tell. The bugs are related to some specific register
settings that would need to be better tuned (and maybe some delay
when waiting for EDID data at the already-existing adv7535 driver).
Maybe it would be preferred to have it at drivers/gpu even with
such bugs.

> It's _always_ faster to just do the work out-of-tree for a week or so
> and then merge it correctly to the proper part of the kernel tree.  I'd
> recommend doing that here for the iommu driver, as well as the DRM
> driver.

It is OK for me to working for a week or so, until the iommu people
become happy with that. 

The main reason of submitting via staging is that I need to preserve
the patch that added this driver as-is, in order to preserve its
SoB and not causing legal issues.

It it is OK for iommu to accept a submission like that, I can
re-submit it, doing the changes at drivers/iommu.

If not, besides this series, the only alternative I can think of is to 
merge it first at the staging, with the incremental changes, and with
a final patch moving the code out of staging.

Thanks,
Mauro

  reply	other threads:[~2020-08-17 10:46 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  7:49 [PATCH 00/16] IOMMU driver for Kirin 960/970 Mauro Carvalho Chehab
2020-08-17  7:49 ` Mauro Carvalho Chehab
2020-08-17  7:49 ` Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 01/16] iommu: add support for HiSilicon Kirin 960/970 iommu Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 02/16] iommu: hisilicon: remove default iommu_map_sg handler Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 03/16] iommu: hisilicon: map and unmap ops gained new arguments Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 04/16] iommu: hisi_smmu_lpae: rebase it to work with upstream Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 05/16] iommu: hisi_smmu: remove linux/hisi/hisi-iommu.h Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 06/16] iommu: hisilicon: cleanup its code style Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 07/16] iommu: hisi_smmu_lpae: get rid of IOMMU_SEC and IOMMU_DEVICE Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 08/16] iommu: get rid of map/unmap tile functions Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 09/16] iommu: hisi_smmu_lpae: use the right code to get domain-priv data Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 10/16] iommu: hisi_smmu_lpae: convert it to probe_device Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 11/16] iommu: add Hisilicon Kirin970 iommu at the building system Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 12/16] iommu: hisi_smmu_lpae: cleanup printk macros Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 13/16] iommu: hisi_smmu_lpae: make OF compatible more standard Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 14/16] dt: add an spec for the Kirin36x0 SMMU Mauro Carvalho Chehab
2020-08-17  7:50   ` Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 15/16] dt: hi3670-hikey970.dts: load the SMMU driver on Hikey970 Mauro Carvalho Chehab
2020-08-17  7:50   ` Mauro Carvalho Chehab
2020-08-17  7:50 ` [PATCH 16/16] staging: hikey9xx: add an item about the iommu driver Mauro Carvalho Chehab
2020-08-17  8:21 ` [PATCH 00/16] IOMMU driver for Kirin 960/970 Christoph Hellwig
2020-08-17  8:21   ` Christoph Hellwig
2020-08-17  8:21   ` Christoph Hellwig
2020-08-17  9:27   ` Mauro Carvalho Chehab
2020-08-17  9:27     ` Mauro Carvalho Chehab
2020-08-17  9:27     ` Mauro Carvalho Chehab
2020-08-17  9:31     ` Christoph Hellwig
2020-08-17  9:31       ` Christoph Hellwig
2020-08-17  9:31       ` Christoph Hellwig
2020-08-17  9:37     ` Greg Kroah-Hartman
2020-08-17  9:37       ` Greg Kroah-Hartman
2020-08-17  9:37       ` Greg Kroah-Hartman
2020-08-17 10:46       ` Mauro Carvalho Chehab [this message]
2020-08-17 10:46         ` Mauro Carvalho Chehab
2020-08-17 10:46         ` Mauro Carvalho Chehab
2020-08-17 10:53         ` Greg Kroah-Hartman
2020-08-17 10:53           ` Greg Kroah-Hartman
2020-08-17 10:53           ` Greg Kroah-Hartman
2020-08-17 12:59           ` Joerg Roedel
2020-08-17 12:59             ` Joerg Roedel
2020-08-17 12:59             ` Joerg Roedel
2020-08-18 14:47 ` Robin Murphy
2020-08-18 14:47   ` Robin Murphy
2020-08-18 14:47   ` Robin Murphy
2020-08-18 15:29   ` Mauro Carvalho Chehab
2020-08-18 15:29     ` Mauro Carvalho Chehab
2020-08-18 15:29     ` Mauro Carvalho Chehab
2020-08-18 16:26     ` Robin Murphy
2020-08-18 16:26       ` Robin Murphy
2020-08-18 16:26       ` Robin Murphy
2020-08-18 22:02       ` John Stultz
2020-08-18 22:02         ` John Stultz
2020-08-18 22:02         ` John Stultz
2020-08-19 10:12         ` Robin Murphy
2020-08-19 10:12           ` Robin Murphy
2020-08-19 10:12           ` Robin Murphy
2020-08-19 10:28         ` Mauro Carvalho Chehab
2020-08-19 10:28           ` Mauro Carvalho Chehab
2020-08-19 10:28           ` Mauro Carvalho Chehab
2020-08-19 11:33           ` Robin Murphy
2020-08-19 11:33             ` Robin Murphy
2020-08-19 11:33             ` Robin Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817124617.303bb4a9@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=john.stultz@linaro.org \
    --cc=jroedel@suse.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mani@kernel.org \
    --cc=mauro.chehab@huawei.com \
    --cc=puck.chen@hisilicon.com \
    --cc=robh+dt@kernel.org \
    --cc=suzhuangluan@hisilicon.com \
    --cc=xuwei5@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.