Message ID | 20200908151853.4837-3-narmstrong@baylibre.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Neil Armstrong |
Headers | show |
Series | drm/panfrost: add Amlogic integration quirks | expand |
On 08/09/2020 16:18, Neil Armstrong wrote: > Add a pgtbl_quirks entry in the compatible specific table to permit specyfying IOMMU > quirks for platforms. > > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Steven Price <steven.price@arm.com> > --- > drivers/gpu/drm/panfrost/panfrost_device.h | 3 +++ > drivers/gpu/drm/panfrost/panfrost_mmu.c | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h > index 953f7536a773..2cf1a6a13af8 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_device.h > +++ b/drivers/gpu/drm/panfrost/panfrost_device.h > @@ -70,6 +70,9 @@ struct panfrost_compatible { > int num_pm_domains; > /* Only required if num_pm_domains > 1. */ > const char * const *pm_domain_names; > + > + /* IOMMU quirks flags */ > + unsigned long pgtbl_quirks; > }; > > struct panfrost_device { > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c > index e8f7b11352d2..55a846c70e46 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c > @@ -368,6 +368,7 @@ int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv) > mmu->as = -1; > > mmu->pgtbl_cfg = (struct io_pgtable_cfg) { > + .quirks = pfdev->comp ? pfdev->comp->pgtbl_quirks : 0, > .pgsize_bitmap = SZ_4K | SZ_2M, > .ias = FIELD_GET(0xff, pfdev->features.mmu_features), > .oas = FIELD_GET(0xff00, pfdev->features.mmu_features), >
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h index 953f7536a773..2cf1a6a13af8 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.h +++ b/drivers/gpu/drm/panfrost/panfrost_device.h @@ -70,6 +70,9 @@ struct panfrost_compatible { int num_pm_domains; /* Only required if num_pm_domains > 1. */ const char * const *pm_domain_names; + + /* IOMMU quirks flags */ + unsigned long pgtbl_quirks; }; struct panfrost_device { diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index e8f7b11352d2..55a846c70e46 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -368,6 +368,7 @@ int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv) mmu->as = -1; mmu->pgtbl_cfg = (struct io_pgtable_cfg) { + .quirks = pfdev->comp ? pfdev->comp->pgtbl_quirks : 0, .pgsize_bitmap = SZ_4K | SZ_2M, .ias = FIELD_GET(0xff, pfdev->features.mmu_features), .oas = FIELD_GET(0xff00, pfdev->features.mmu_features),
Add a pgtbl_quirks entry in the compatible specific table to permit specyfying IOMMU quirks for platforms. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/gpu/drm/panfrost/panfrost_device.h | 3 +++ drivers/gpu/drm/panfrost/panfrost_mmu.c | 1 + 2 files changed, 4 insertions(+)