[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211022014850.22933-1-huangshuosheng@allwinnertech.com>
Date: Fri, 22 Oct 2021 09:48:50 +0800
From: Shuosheng Huang <huangshuosheng@...winnertech.com>
To: sumit.semwal@...aro.org, lmark@...eaurora.org, labbott@...hat.com,
Brian.Starkey@....com, john.stultz@...aro.org,
christian.koenig@....com
Cc: linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Shuosheng Huang <huangshuosheng@...winnertech.com>
Subject: [PATCH v2] dma-buf: heaps: init heaps in subsys_initcall
Some built-in modules will failed to use dma-buf heap to allocate
memory if the heap drivers are too late to be initialized.
To fix this issue, move initialization of dma-buf heap drivers in
subsys_initcall() which is more earlier to be called.
Signed-off-by: Shuosheng Huang <huangshuosheng@...winnertech.com>
---
drivers/dma-buf/heaps/cma_heap.c | 2 +-
drivers/dma-buf/heaps/system_heap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c
index 0c05b79870f9..e051403a346d 100644
--- a/drivers/dma-buf/heaps/cma_heap.c
+++ b/drivers/dma-buf/heaps/cma_heap.c
@@ -400,6 +400,6 @@ static int add_default_cma_heap(void)
return ret;
}
-module_init(add_default_cma_heap);
+subsys_initcall(add_default_cma_heap);
MODULE_DESCRIPTION("DMA-BUF CMA Heap");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
index 23a7e74ef966..3d6927657ec9 100644
--- a/drivers/dma-buf/heaps/system_heap.c
+++ b/drivers/dma-buf/heaps/system_heap.c
@@ -435,5 +435,5 @@ static int system_heap_create(void)
return 0;
}
-module_init(system_heap_create);
+subsys_initcall(system_heap_create);
MODULE_LICENSE("GPL v2");
--
2.29.0
Powered by blists - more mailing lists