Re: [Freedreno] [PATCH] of/device: add blacklist for iommu dma_ops

From: Rob Clark
Date: Wed Jun 05 2019 - 10:21:10 EST


On Wed, Jun 5, 2019 at 6:18 AM Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
>
> Hi Rob,
>
> On 2019-06-05 14:57, Rob Clark wrote:
> > On Tue, Jun 4, 2019 at 11:58 PM Tomasz Figa <tfiga@xxxxxxxxxxxx> wrote:
> >> But first of all, I remember Marek already submitted some patches long
> >> ago that extended struct driver with some flag that means that the
> >> driver doesn't want the IOMMU to be attached before probe. Why
> >> wouldn't that work? Sounds like a perfect opt-out solution.
> > Actually, yeah.. we should do that. That is the simplest solution.
>
> Tomasz has very good memory. It took me a while to find that old patches:
>
> https://patchwork.kernel.org/patch/4677251/
> https://patchwork.kernel.org/patch/4677941/
> https://patchwork.kernel.org/patch/4677401/
>
> It looks that my idea was a bit ahead of its time ;)
>

if I re-spin this, was their a reason not to just use bitfields, ie:

- bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
+ bool suppress_bind_attrs : 1; /* disables bind/unbind via sysfs */
+ bool has_own_iommu_manager : 1; /* driver explictly manages IOMMU */

That seems like it would have been a bit less churn and a bit nicer
looking (IMO at least)

BR,
-R