media: ipu6: Drop unused ipu6_dma_get_sgtable()
Subsystems (2)
Sakari Ailus
maintainerPATCH 1/1 media: ipu6: Drop unused ipu6_dma_get_sgtable()
ipu6_dma_get_sgtable() is now unused. Drop it.
--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)
drivers/media/pci/intel/ipu6/ipu6-dma.c +0 -33
@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}
drivers/media/pci/intel/ipu6/ipu6-dma.h +0 -3
@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs);void ipu6_dma_unmap_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt,enum dma_data_direction dir,unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);#endif /* IPU6_DMA_H */
Signature · 1 line
2.39.5
Quoted 3 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>
Regards
Stanislaw
Quoted 61 lines
--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs);void ipu6_dma_unmap_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt,enum dma_data_direction dir,unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);#endif /* IPU6_DMA_H */ Signature · 1 line
2.39.5
Sakari,
Quoted 54 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 6 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs);void ipu6_dma_unmap_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt,enum dma_data_direction dir,unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable() is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.
Quoted 2 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0#endif /* IPU6_DMA_H */
Signature · 2 lines
Best regards, Bingbu Cao
Sakari Ailus
maintainerHi Bingbu,
Quoted 59 lines · Bingbu Cao
Sakari,
Quoted 56 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs); void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
Quoted 8 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 4 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3enum dma_data_direction dir, unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable()is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.
When will there be an upstream PSYS driver?
I suppose you can just as well apply a revert of this patch to your downstream tree?
Signature · 3 lines
Kind regards, Sakari Ailus
Quoted 71 lines · Sakari Ailus
Hi Bingbu,
Quoted 59 lines · Bingbu Cao
Sakari,
Quoted 56 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs); void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,Quoted 8 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 4 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3enum dma_data_direction dir, unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable()is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.
Quoted 5 lines
When will there be an upstream PSYS driver?
I suppose you can just as well apply a revert of this patch to your downstream tree?
Sakari,
I don't think all the OS vendors like this way, it make the downstream development harder. It's a trade-off, I cannot see removing offer any benefits that its side-effect.
Signature · 2 lines
Best regards, Bingbu Cao
Sakari Ailus
maintainerHi Bingbu,
Quoted 79 lines · Bingbu Cao
Quoted 71 lines · Sakari Ailus
Hi Bingbu,
Quoted 59 lines · Bingbu Cao
Sakari,
Quoted 56 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs); void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,Quoted 8 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 4 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3enum dma_data_direction dir, unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable()is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.Quoted 5 lines
When will there be an upstream PSYS driver?
I suppose you can just as well apply a revert of this patch to your downstream tree?
Quoted 5 lines
Sakari,
I don't think all the OS vendors like this way, it make the downstream development harder. It's a trade-off, I cannot see removing offer any benefits that its side-effect.
I don't think the Linux distro maintainers like downstream drivers at all, independently of how many patches they consist of.
You could as well move the function to the PSYS driver and use find_vm_area(cpu_addr) instead to find the area.
Signature · 3 lines
Regards, Sakari Ailus
Bingbu Cao
Reviewed-bySakari,
Quoted 88 lines · Sakari Ailus
Hi Bingbu,
Quoted 79 lines · Bingbu Cao
Quoted 71 lines · Sakari Ailus
Hi Bingbu,
Quoted 59 lines · Bingbu Cao
Sakari,
Quoted 56 lines · Sakari Ailus
ipu6_dma_get_sgtable()is now unused. Drop it.Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 33 ------------------------- drivers/media/pci/intel/ipu6/ipu6-dma.h | 3 --- 2 files changed, 36 deletions(-)drivers/media/pci/intel/ipu6/ipu6-dma.c +0
-33@@ -455,36 +455,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,ipu6_dma_unmap_sg (sys, sgt->sgl, sgt->nents, dir, attrs); }EXPORT_SYMBOL_NS_GPL (ipu6_dma_unmap_sgtable,"INTEL_IPU6" ); - -/* -* Create scatter-list for the already allocated DMA buffer -*/ -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs) -{ -struct device *dev = &sys->auxdev.dev; -struct ipu6_mmu *mmu = sys->mmu; -struct vm_info *info; -int n_pages; -int ret =0 ; - - info =get_vm_info (mmu, handle); -if (!info) -return -EFAULT ; - -if (!info->vaddr) -return -EFAULT ; - -if (WARN_ON (!info->pages)) -return -ENOMEM ; - - n_pages =PFN_UP (size); - - ret =sg_alloc_table_from_pages (sgt, info->pages, n_pages,0 , size, -GFP_KERNEL ); -if (ret) -dev_warn (dev,"get sgt table failed\n" ); - -return ret; -}drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs); void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,Quoted 8 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 4 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3enum dma_data_direction dir, unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable()is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.Quoted 5 lines
When will there be an upstream PSYS driver?
I suppose you can just as well apply a revert of this patch to your downstream tree?
Quoted 5 lines
Sakari,
I don't think all the OS vendors like this way, it make the downstream development harder. It's a trade-off, I cannot see removing offer any benefits that its side-effect.
Quoted 5 lines
I don't think the Linux distro maintainers like downstream drivers at all, independently of how many patches they consist of.
You could as well move the function to the PSYS driver and use
find_vm_area(cpu_addr)instead to find the area.
My fault, I forgot I already removed the ipu6_dma_get_sgtable() from downstream driver months ago, so,
;)
Quoted 1 line
Signature · 2 lines
Best regards, Bingbu Cao
Sakari Ailus
maintainerQuoted 31 lines · Bingbu Cao
Quoted 31 lines
Quoted 22 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-0@@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs); void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,Quoted 8 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt, · line 48
Quoted 4 lines
drivers/media/pci/intel/ipu6/ipu6-dma.h +0
-3enum dma_data_direction dir, unsigned long attrs); -int ipu6_dma_get_sgtable (struct ipu6_bus_device *sys,struct sg_table *sgt, -void *cpu_addr,dma_addr_t handle,size_t size, -unsigned long attrs);
ipu6_dma_get_sgtable()is used in downstream PS driver, I don't think it is necessary to remove it as it will be hard to integrate with downstream PS driver.Quoted 5 lines
When will there be an upstream PSYS driver?
I suppose you can just as well apply a revert of this patch to your downstream tree?
Quoted 5 lines
Sakari,
I don't think all the OS vendors like this way, it make the downstream development harder. It's a trade-off, I cannot see removing offer any benefits that its side-effect.
I don't think the Linux distro maintainers like downstream drivers at all, independently of how many patches they consist of.
Quoted 7 lines
Quoted 2 lines
You could as well move the function to the PSYS driver and use
find_vm_area(cpu_addr)instead to find the area.My fault, I forgot I already removed the
ipu6_dma_get_sgtable()from downstream driver months ago, so,Reviewed-by Bingbu Cao <[email protected]>
Thanks, Bingbu!
Signature · 1 line
Sakari Ailus