media: nvidia: tegra: Use iommu_paging_domain_alloc()
Subsystems (6)
PATCH 1/2 media: nvidia: tegra: Use iommu_paging_domain_alloc()
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.
--- drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/media/platform/nvidia/tegra-vde/iommu.c +4 -3
@@ -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; }
Signature · 1 line
2.34.1
PATCH 2/2 media: venus: firmware: Use iommu_paging_domain_alloc()
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.
--- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/platform/qcom/venus/firmware.c +3 -3
@@ -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; }
Signature · 1 line
2.34.1
Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
Hi,
Thank you for the patch!
drivers/media/platform/qcom/venus/firmware.ced
Quoted 15 lines · Lu Baolu
An iommu domain is allocated in
venus_firmware_init()and is attached tocore->fw.devin the same function. Useiommu_paging_domain_alloc()to make it explicit.Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/media/platform/qcom/venus/firmware.ced renamed from drivers/media/platform/qcom/venus/firmware.c +0
-0
I'll take the patch through linux-media tree.
Quoted 14 lines
drivers/media/platform/qcom/venus/firmware.ced renamed from drivers/media/platform/qcom/venus/firmware.c +3
-3@@ -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; }
Signature · 2 lines
regards, Stan
Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
Quoted 16 lines · Stanimir Varbanov
Hi,
Thank you for the patch!
Quoted 11 lines · Lu Baolu
An iommu domain is allocated in
venus_firmware_init()and is attached tocore->fw.devin the same function. Useiommu_paging_domain_alloc()to make it explicit.Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines
drivers/media/platform/qcom/venus/firmware.ced
Quoted 4 lines
drivers/media/platform/qcom/venus/firmware.ced renamed from drivers/media/platform/qcom/venus/firmware.c +0
-0I'll take the patch through linux-media tree.
Did this patch and the 1/2:
https://lore.kernel.org/linux-iommu/[email protected]/
Get picked up for media? I don't see it in linux-next?
Thanks,
Jason
Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
Hi Jason,
Quoted 24 lines · Jason Gunthorpe
Quoted 23 lines · Stanimir Varbanov
Hi,
Thank you for the patch!
drivers/media/platform/qcom/venus/firmware.ced
Quoted 15 lines · Lu Baolu
An iommu domain is allocated in
venus_firmware_init()and is attached tocore->fw.devin the same function. Useiommu_paging_domain_alloc()to make it explicit.Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/media/platform/qcom/venus/firmware.ced renamed from drivers/media/platform/qcom/venus/firmware.c +0
-0
Quoted 3 lines
Quoted 1 line
I'll take the patch through linux-media tree.
Did this patch and the 1/2:
2/2 is in linux-next now.
~Stan
Re: [PATCH 2/2] media: venus: firmware: Use iommu_paging_domain_alloc()
Quoted 19 lines · Stanimir Varbanov
Quoted 19 lines
Quoted 19 lines · Lu Baolu
drivers/media/platform/qcom/venus/firmware.ced
Quoted 15 lines
An iommu domain is allocated in
venus_firmware_init()and is attached tocore->fw.devin the same function. Useiommu_paging_domain_alloc()to make it explicit.Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/media/platform/qcom/venus/firmware.ced renamed from drivers/media/platform/qcom/venus/firmware.c +0
-0
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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
Quoted 9 lines · Lu Baolu
An iommu domain is allocated in
tegra_vde_iommu_init()and is attached tovde->dev. Useiommu_paging_domain_alloc()to make it explicit.Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 4 lines · Thierry Reding
Quoted 3 lines · Lu Baolu
An iommu domain is allocated in
tegra_vde_iommu_init()and is attached tovde->dev. Useiommu_paging_domain_alloc()to make it explicit.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Lu Baolu <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>--- drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)Acked-by Thierry Reding <[email protected]>
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