* [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc()
@ 2024-08-12 7:21 Lu Baolu
2024-08-12 7:21 ` [PATCH 2/2] media: venus: firmware: " Lu Baolu
2024-08-29 15:25 ` [PATCH 1/2] media: nvidia: tegra: " Thierry Reding
0 siblings, 2 replies; 8+ messages in thread
From: Lu Baolu @ 2024-08-12 7:21 UTC (permalink / raw)
To: Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding,
Jonathan Hunter, Stanimir Varbanov, Vikash Garodia, Joerg Roedel,
Will Deacon, Robin Murphy, Jason Gunthorpe, Kevin Tian
Cc: linux-media, linux-tegra, linux-arm-msm, iommu, linux-kernel,
Lu Baolu, Jason Gunthorpe
An iommu domain is allocated in tegra_vde_iommu_init() and is attached to
vde->dev. Use iommu_paging_domain_alloc() to make it explicit.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240610085555.88197-9-baolu.lu@linux.intel.com
---
drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/nvidia/tegra-vde/iommu.c b/drivers/media/platform/nvidia/tegra-vde/iommu.c
index 5521ed3e465f..b1d9d841d944 100644
--- a/drivers/media/platform/nvidia/tegra-vde/iommu.c
+++ b/drivers/media/platform/nvidia/tegra-vde/iommu.c
@@ -78,9 +78,10 @@ int tegra_vde_iommu_init(struct tegra_vde *vde)
arm_iommu_release_mapping(mapping);
}
#endif
- vde->domain = iommu_domain_alloc(&platform_bus_type);
- if (!vde->domain) {
- err = -ENOMEM;
+ vde->domain = iommu_paging_domain_alloc(dev);
+ if (IS_ERR(vde->domain)) {
+ err = PTR_ERR(vde->domain);
+ vde->domain = NULL;
goto put_group;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
2024-08-12 7:21 [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc() Lu Baolu
@ 2024-08-12 7:21 ` Lu Baolu
2024-08-20 20:43 ` Stanimir Varbanov
2024-08-29 15:25 ` [PATCH 1/2] media: nvidia: tegra: " Thierry Reding
1 sibling, 1 reply; 8+ messages in thread
From: Lu Baolu @ 2024-08-12 7:21 UTC (permalink / raw)
To: Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding,
Jonathan Hunter, Stanimir Varbanov, Vikash Garodia, Joerg Roedel,
Will Deacon, Robin Murphy, Jason Gunthorpe, Kevin Tian
Cc: linux-media, linux-tegra, linux-arm-msm, iommu, linux-kernel,
Lu Baolu, Jason Gunthorpe
An iommu domain is allocated in venus_firmware_init() and is attached to
core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
make it explicit.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240610085555.88197-10-baolu.lu@linux.intel.com
---
drivers/media/platform/qcom/venus/firmware.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index fe7da2b30482..66a18830e66d 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -316,10 +316,10 @@ int venus_firmware_init(struct venus_core *core)
core->fw.dev = &pdev->dev;
- iommu_dom = iommu_domain_alloc(&platform_bus_type);
- if (!iommu_dom) {
+ iommu_dom = iommu_paging_domain_alloc(core->fw.dev);
+ if (IS_ERR(iommu_dom)) {
dev_err(core->fw.dev, "Failed to allocate iommu domain\n");
- ret = -ENOMEM;
+ ret = PTR_ERR(iommu_dom);
goto err_unregister;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
2024-08-12 7:21 ` [PATCH 2/2] media: venus: firmware: " Lu Baolu
@ 2024-08-20 20:43 ` Stanimir Varbanov
2024-09-04 12:16 ` Jason Gunthorpe
0 siblings, 1 reply; 8+ messages in thread
From: Stanimir Varbanov @ 2024-08-20 20:43 UTC (permalink / raw)
To: Lu Baolu, Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding,
Jonathan Hunter, Vikash Garodia, Joerg Roedel, Will Deacon,
Robin Murphy, Jason Gunthorpe, Kevin Tian
Cc: linux-media, linux-tegra, linux-arm-msm, iommu, linux-kernel,
Jason Gunthorpe
Hi,
Thank you for the patch!
On 12.08.24 г. 10:21 ч., Lu Baolu wrote:
> An iommu domain is allocated in venus_firmware_init() and is attached to
> core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
> make it explicit.
>
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> Link: https://lore.kernel.org/r/20240610085555.88197-10-baolu.lu@linux.intel.com
> ---
> drivers/media/platform/qcom/venus/firmware.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> index fe7da2b30482..66a18830e66d 100644
> --- a/drivers/media/platform/qcom/venus/firmware.c
> +++ b/drivers/media/platform/qcom/venus/firmware.ced
Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
I'll take the patch through linux-media tree.
> @@ -316,10 +316,10 @@ int venus_firmware_init(struct venus_core *core)
>
> core->fw.dev = &pdev->dev;
>
> - iommu_dom = iommu_domain_alloc(&platform_bus_type);
> - if (!iommu_dom) {
> + iommu_dom = iommu_paging_domain_alloc(core->fw.dev);
> + if (IS_ERR(iommu_dom)) {
> dev_err(core->fw.dev, "Failed to allocate iommu domain\n");
> - ret = -ENOMEM;
> + ret = PTR_ERR(iommu_dom);
> goto err_unregister;
> }
>
--
regards,
Stan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc()
2024-08-12 7:21 [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc() Lu Baolu
2024-08-12 7:21 ` [PATCH 2/2] media: venus: firmware: " Lu Baolu
@ 2024-08-29 15:25 ` Thierry Reding
2024-09-15 14:08 ` Jason Gunthorpe
1 sibling, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2024-08-29 15:25 UTC (permalink / raw)
To: Lu Baolu
Cc: Dmitry Osipenko, Mauro Carvalho Chehab, Jonathan Hunter,
Stanimir Varbanov, Vikash Garodia, Joerg Roedel, Will Deacon,
Robin Murphy, Jason Gunthorpe, Kevin Tian, linux-media,
linux-tegra, linux-arm-msm, iommu, linux-kernel, Jason Gunthorpe
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
On Mon, Aug 12, 2024 at 03:21:04PM GMT, Lu Baolu wrote:
> An iommu domain is allocated in tegra_vde_iommu_init() and is attached to
> vde->dev. Use iommu_paging_domain_alloc() to make it explicit.
>
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> Link: https://lore.kernel.org/r/20240610085555.88197-9-baolu.lu@linux.intel.com
> ---
> drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
2024-08-20 20:43 ` Stanimir Varbanov
@ 2024-09-04 12:16 ` Jason Gunthorpe
2024-09-06 9:51 ` Stanimir Varbanov
0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2024-09-04 12:16 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: Lu Baolu, Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding,
Jonathan Hunter, Vikash Garodia, Joerg Roedel, Will Deacon,
Robin Murphy, Kevin Tian, linux-media, linux-tegra, linux-arm-msm,
iommu, linux-kernel
On Tue, Aug 20, 2024 at 11:43:50PM +0300, Stanimir Varbanov wrote:
> Hi,
>
> Thank you for the patch!
>
> On 12.08.24 г. 10:21 ч., Lu Baolu wrote:
> > An iommu domain is allocated in venus_firmware_init() and is attached to
> > core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
> > make it explicit.
> >
> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> > Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> > Link: https://lore.kernel.org/r/20240610085555.88197-10-baolu.lu@linux.intel.com
> > ---
> > drivers/media/platform/qcom/venus/firmware.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> > index fe7da2b30482..66a18830e66d 100644
> > --- a/drivers/media/platform/qcom/venus/firmware.c
> > +++ b/drivers/media/platform/qcom/venus/firmware.ced
>
> Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
>
> I'll take the patch through linux-media tree.
Did this patch and the 1/2:
https://lore.kernel.org/linux-iommu/20240812072105.9578-1-baolu.lu@linux.intel.com/
Get picked up for media? I don't see it in linux-next?
Thanks,
Jason
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
2024-09-04 12:16 ` Jason Gunthorpe
@ 2024-09-06 9:51 ` Stanimir Varbanov
2024-09-06 13:20 ` Jason Gunthorpe
0 siblings, 1 reply; 8+ messages in thread
From: Stanimir Varbanov @ 2024-09-06 9:51 UTC (permalink / raw)
To: Jason Gunthorpe, Stanimir Varbanov
Cc: Lu Baolu, Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding,
Jonathan Hunter, Vikash Garodia, Joerg Roedel, Will Deacon,
Robin Murphy, Kevin Tian, linux-media, linux-tegra, linux-arm-msm,
iommu, linux-kernel
Hi Jason,
On 9/4/24 15:16, Jason Gunthorpe wrote:
> On Tue, Aug 20, 2024 at 11:43:50PM +0300, Stanimir Varbanov wrote:
>> Hi,
>>
>> Thank you for the patch!
>>
>> On 12.08.24 г. 10:21 ч., Lu Baolu wrote:
>>> An iommu domain is allocated in venus_firmware_init() and is attached to
>>> core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
>>> make it explicit.
>>>
>>> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
>>> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
>>> Link: https://lore.kernel.org/r/20240610085555.88197-10-baolu.lu@linux.intel.com
>>> ---
>>> drivers/media/platform/qcom/venus/firmware.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
>>> index fe7da2b30482..66a18830e66d 100644
>>> --- a/drivers/media/platform/qcom/venus/firmware.c
>>> +++ b/drivers/media/platform/qcom/venus/firmware.ced
>>
>> Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
>>
>> I'll take the patch through linux-media tree.
>
> Did this patch and the 1/2:
2/2 is in linux-next now.
~Stan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
2024-09-06 9:51 ` Stanimir Varbanov
@ 2024-09-06 13:20 ` Jason Gunthorpe
0 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2024-09-06 13:20 UTC (permalink / raw)
To: Stanimir Varbanov, Hans Verkuil
Cc: Stanimir Varbanov, Lu Baolu, Dmitry Osipenko,
Mauro Carvalho Chehab, Thierry Reding, Jonathan Hunter,
Vikash Garodia, Joerg Roedel, Will Deacon, Robin Murphy,
Kevin Tian, linux-media, linux-tegra, linux-arm-msm, iommu,
linux-kernel
On Fri, Sep 06, 2024 at 12:51:08PM +0300, Stanimir Varbanov wrote:
> >> On 12.08.24 г. 10:21 ч., Lu Baolu wrote:
> >>> An iommu domain is allocated in venus_firmware_init() and is attached to
> >>> core->fw.dev in the same function. Use iommu_paging_domain_alloc() to
> >>> make it explicit.
> >>>
> >>> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> >>> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> >>> Link: https://lore.kernel.org/r/20240610085555.88197-10-baolu.lu@linux.intel.com
> >>> ---
> >>> drivers/media/platform/qcom/venus/firmware.c | 6 +++---
> >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> >>> index fe7da2b30482..66a18830e66d 100644
> >>> --- a/drivers/media/platform/qcom/venus/firmware.c
> >>> +++ b/drivers/media/platform/qcom/venus/firmware.ced
> >>
> >> Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
> >>
> >> I'll take the patch through linux-media tree.
> >
> > Did this patch and the 1/2:
>
> 2/2 is in linux-next now.
And 1/2? Can someone pick it up too?
https://lore.kernel.org/all/2o6gpxknio4kvf5fmqgai5jaov65semmw3wvtmt4gdauwzhbti@ii3ydtlmp2sb/
Thanks,
Jason
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc()
2024-08-29 15:25 ` [PATCH 1/2] media: nvidia: tegra: " Thierry Reding
@ 2024-09-15 14:08 ` Jason Gunthorpe
0 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2024-09-15 14:08 UTC (permalink / raw)
To: Thierry Reding, Stanimir Varbanov, Hans Verkuil
Cc: Lu Baolu, Dmitry Osipenko, Mauro Carvalho Chehab, Jonathan Hunter,
Vikash Garodia, Joerg Roedel, Will Deacon, Robin Murphy,
Kevin Tian, linux-media, linux-tegra, linux-arm-msm, iommu,
linux-kernel
On Thu, Aug 29, 2024 at 05:25:12PM +0200, Thierry Reding wrote:
> On Mon, Aug 12, 2024 at 03:21:04PM GMT, Lu Baolu wrote:
> > An iommu domain is allocated in tegra_vde_iommu_init() and is attached to
> > vde->dev. Use iommu_paging_domain_alloc() to make it explicit.
> >
> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> > Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> > Link: https://lore.kernel.org/r/20240610085555.88197-9-baolu.lu@linux.intel.com
> > ---
> > drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
>
> Acked-by: Thierry Reding <treding@nvidia.com>
Can someone please pick this up for this cycle? This is one of the
last two call sites before we can delete this API. Things are waiting
on this.
Jason
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-09-15 14:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 7:21 [PATCH 1/2] media: nvidia: tegra: Use iommu_paging_domain_alloc() Lu Baolu
2024-08-12 7:21 ` [PATCH 2/2] media: venus: firmware: " Lu Baolu
2024-08-20 20:43 ` Stanimir Varbanov
2024-09-04 12:16 ` Jason Gunthorpe
2024-09-06 9:51 ` Stanimir Varbanov
2024-09-06 13:20 ` Jason Gunthorpe
2024-08-29 15:25 ` [PATCH 1/2] media: nvidia: tegra: " Thierry Reding
2024-09-15 14:08 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox