diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index 5dc97ec0993d..0a173b70149b 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -9,8 +9,8 @@ config DMABUF_CACHE This option support to store attachments in a list and destroy them by set to a callback list in the dtor of dma-buf. -config DMABUF_DEBUG - bool "DMABUF debug option" +config RK_DMABUF_DEBUG + bool "Rockchip DMABUF debug option" depends on NO_GKI select RK_DMABUF_PROCFS help @@ -19,7 +19,7 @@ config DMABUF_DEBUG config DMABUF_DEBUG_ADVANCED bool "DMABUF debug advanced option" - depends on DMABUF_DEBUG + depends on RK_DMABUF_DEBUG help This option support to debug all the dmabuf on db_list, allows to attach and map a dmabuf who has no attachment. If not sure, say N diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 0891d5994a30..b077fe78b756 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -63,7 +63,7 @@ int get_each_dmabuf(int (*callback)(const struct dma_buf *dmabuf, } EXPORT_SYMBOL_GPL(get_each_dmabuf); -#if IS_ENABLED(CONFIG_DMABUF_DEBUG) +#if IS_ENABLED(CONFIG_RK_DMABUF_DEBUG) static size_t db_total_size; static size_t db_peak_size; @@ -167,7 +167,7 @@ static int dma_buf_file_release(struct inode *inode, struct file *file) dmabuf = file->private_data; mutex_lock(&db_list.lock); -#if IS_ENABLED(CONFIG_DMABUF_DEBUG) +#if IS_ENABLED(CONFIG_RK_DMABUF_DEBUG) db_total_size -= dmabuf->size; #endif list_del(&dmabuf->list_node); @@ -726,7 +726,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) mutex_lock(&db_list.lock); list_add(&dmabuf->list_node, &db_list.head); -#if IS_ENABLED(CONFIG_DMABUF_DEBUG) +#if IS_ENABLED(CONFIG_RK_DMABUF_DEBUG) db_total_size += dmabuf->size; db_peak_size = max(db_total_size, db_peak_size); #endif @@ -736,7 +736,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) if (ret) goto err_sysfs; - if (IS_ENABLED(CONFIG_DMABUF_DEBUG)) + if (IS_ENABLED(CONFIG_RK_DMABUF_DEBUG)) dma_buf_set_default_name(dmabuf); return dmabuf; diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f87ebbdf945b..485b3d526e66 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -661,7 +661,7 @@ static inline void dma_buf_set_destructor(struct dma_buf *dmabuf, } #endif -#if IS_ENABLED(CONFIG_DMABUF_DEBUG) +#if IS_ENABLED(CONFIG_RK_DMABUF_DEBUG) void dma_buf_reset_peak_size(void); size_t dma_buf_get_peak_size(void); size_t dma_buf_get_total_size(void);