msm: camera: memmgr: Set name for dma buffer to help profiling
For dma buffer profiling,we don't konw the owner of one dma buffer. So we add it's name to show it's owner. If you use v1 struct to alloc/map dma buffer it will use default buffer name "UNKNOWN". For v2 struct you can set dma buffer name at UMD side. CRs-Fixed: 3131442 Change-Id: I24ce6aa1d97cd9fc26d9bd8796ab2367607008f6 Signed-off-by: Fengjie Chen <quic_fengjiec@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
2e6c254487
commit
cf223fa7b3
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -417,3 +418,19 @@ int cam_sensor_i3c_driver_remove(struct i3c_device *client)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE
|
||||
long cam_dma_buf_set_name(struct dma_buf *dmabuf, const char *name)
|
||||
{
|
||||
long ret = 0;
|
||||
|
||||
ret = dma_buf_set_name(dmabuf, name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
long cam_dma_buf_set_name(struct dma_buf *dmabuf, const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user