linux-4.4/ION_API
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#b0981a2f]
#backlinks
*説明 [#te966698]
FIXME: なにをするもの?
-とぴっく
--解説
**ユーザ API 一覧 [#l69c9be9]
-ioctl() のコマンド
--[[linux-4.4.1/ION_IOC_ALLOC]]
---[[linux-4.4.1/ion_alloc()]]
--[[linux-4.4.1/ION_IOC_FREE]]
---[[linux-4.4.1/ion_free()]]
--[[linux-4.4.1/ION_IOC_MAP]]
--[[linux-4.4.1/ION_IOC_SHARE]]
---[[linux-4.4.1/ion_share_dma_buf_fd()]]
--[[linux-4.4.1/ION_IOC_IMPORT]]
---[[linux-4.4.1/ion_import_dma_buf()]]
--[[linux-4.4.1/ION_IOC_SYNC]]
---[[linux-4.4.1/ion_sync_for_device()]]
--[[linux-4.4.1/ION_IOC_CUSTOM]]
-ION_IOC_SHARE で取得したファイルディスクリプタへの操作
--[[linux-4.4.1/dma_buf_ops(global)]]
**カーネル API 一覧 [#ha6a6047]
-[[linux-4.4.1/ion_alloc()]]
-[[linux-4.4.1/ion_free()]]
-[[linux-4.4.1/ion_phys()]]
-[[linux-4.4.1/ion_map_kernel()]]
-[[linux-4.4.1/ion_unmap_kernel()]]
-[[linux-4.4.1/ion_client_create()]]
-[[linux-4.4.1/ion_client_destroy()]]
-[[linux-4.4.1/ion_sg_table()]]
-[[linux-4.4.1/ion_share_dma_buf()]]
-[[linux-4.4.1/ion_share_dma_buf_fd()]]
-[[linux-4.4.1/ion_import_dma_buf()]]
-[[linux-4.4.1/ion_device_add_heap()]]
-[[linux-4.4.1/ion_device_create()]]
-[[linux-4.4.1/ion_device_destroy()]]
-[[linux-4.4.1/ion_heap_create()]]
-[[linux-4.4.1/ion_heap_destroy()]]
**カーネル API 使い方の例 [#a98a76ed]
drivers/staging/android/ion/tegra/tegra_ion.c が最短でわ...
エラー処理を全部外して基本的な流れだけ示せば、初期化は下...
static struct ion_device *idev;
static int num_heaps;
static struct ion_heap **heaps;
static int tegra_ion_probe(struct platform_device *pdev)
{
struct ion_platform_data *pdata = pdev->dev.plat...
num_heaps = pdata->nr;
heaps = devm_kzalloc(&pdev->dev,
sizeof(struct ion_heap *) *...
GFP_KERNEL);
idev = ion_device_create(NULL);
/* create the heaps as specified in the board fi...
for (i = 0; i < num_heaps; i++) {
struct ion_platform_heap *heap_data = &p...
heaps[i] = ion_heap_create(heap_data);
ion_device_add_heap(idev, heaps[i]);
}
platform_set_drvdata(pdev, idev);
終了は下記の通り。
static int tegra_ion_remove(struct platform_device *pdev)
{
struct ion_device *idev = platform_get_drvdata(p...
int i;
ion_device_destroy(idev);
for (i = 0; i < num_heaps; i++)
ion_heap_destroy(heaps[i]);
return 0;
}
Tegra の ION ドライバの場合、ドライバとデバイスの追加は分...
メモリのどこから取るか(= &pdata->heaps[i] に入ってる情報...
FIXME: platform_device_add() するときに渡しているのか?
-コードの全容は下記参照。
--[[linux-4.4.1/tegra_ion_probe()]]
--[[linux-4.4.1/tegra_ion_remove()]]
**参考 [#uf4fc901]
調査方法。
ユーザー API
$ grep -r ION_IOC_ drivers/staging/android/uapi/ | grep ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_ALLOC...
drivers/staging/android/uapi/ion.h:#define ION_IOC_FREE ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_MAP ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_SHARE...
drivers/staging/android/uapi/ion.h:#define ION_IOC_IMPOR...
drivers/staging/android/uapi/ion.h:#define ION_IOC_SYNC ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_CUSTO...
カーネル API
$ grep -r EXPORT_SYMBOL drivers/staging/android/ion/
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_allo...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_free);
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_phys);
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_map_...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_unma...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_clie...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_clie...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_sg_t...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_shar...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_shar...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_impo...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion_heap.c:EXPORT_SYMBOL(ion...
drivers/staging/android/ion/ion_heap.c:EXPORT_SYMBOL(ion...
**関連モジュール [#bbe67917]
*コメント [#zc3e3089]
終了行:
*参照元 [#b0981a2f]
#backlinks
*説明 [#te966698]
FIXME: なにをするもの?
-とぴっく
--解説
**ユーザ API 一覧 [#l69c9be9]
-ioctl() のコマンド
--[[linux-4.4.1/ION_IOC_ALLOC]]
---[[linux-4.4.1/ion_alloc()]]
--[[linux-4.4.1/ION_IOC_FREE]]
---[[linux-4.4.1/ion_free()]]
--[[linux-4.4.1/ION_IOC_MAP]]
--[[linux-4.4.1/ION_IOC_SHARE]]
---[[linux-4.4.1/ion_share_dma_buf_fd()]]
--[[linux-4.4.1/ION_IOC_IMPORT]]
---[[linux-4.4.1/ion_import_dma_buf()]]
--[[linux-4.4.1/ION_IOC_SYNC]]
---[[linux-4.4.1/ion_sync_for_device()]]
--[[linux-4.4.1/ION_IOC_CUSTOM]]
-ION_IOC_SHARE で取得したファイルディスクリプタへの操作
--[[linux-4.4.1/dma_buf_ops(global)]]
**カーネル API 一覧 [#ha6a6047]
-[[linux-4.4.1/ion_alloc()]]
-[[linux-4.4.1/ion_free()]]
-[[linux-4.4.1/ion_phys()]]
-[[linux-4.4.1/ion_map_kernel()]]
-[[linux-4.4.1/ion_unmap_kernel()]]
-[[linux-4.4.1/ion_client_create()]]
-[[linux-4.4.1/ion_client_destroy()]]
-[[linux-4.4.1/ion_sg_table()]]
-[[linux-4.4.1/ion_share_dma_buf()]]
-[[linux-4.4.1/ion_share_dma_buf_fd()]]
-[[linux-4.4.1/ion_import_dma_buf()]]
-[[linux-4.4.1/ion_device_add_heap()]]
-[[linux-4.4.1/ion_device_create()]]
-[[linux-4.4.1/ion_device_destroy()]]
-[[linux-4.4.1/ion_heap_create()]]
-[[linux-4.4.1/ion_heap_destroy()]]
**カーネル API 使い方の例 [#a98a76ed]
drivers/staging/android/ion/tegra/tegra_ion.c が最短でわ...
エラー処理を全部外して基本的な流れだけ示せば、初期化は下...
static struct ion_device *idev;
static int num_heaps;
static struct ion_heap **heaps;
static int tegra_ion_probe(struct platform_device *pdev)
{
struct ion_platform_data *pdata = pdev->dev.plat...
num_heaps = pdata->nr;
heaps = devm_kzalloc(&pdev->dev,
sizeof(struct ion_heap *) *...
GFP_KERNEL);
idev = ion_device_create(NULL);
/* create the heaps as specified in the board fi...
for (i = 0; i < num_heaps; i++) {
struct ion_platform_heap *heap_data = &p...
heaps[i] = ion_heap_create(heap_data);
ion_device_add_heap(idev, heaps[i]);
}
platform_set_drvdata(pdev, idev);
終了は下記の通り。
static int tegra_ion_remove(struct platform_device *pdev)
{
struct ion_device *idev = platform_get_drvdata(p...
int i;
ion_device_destroy(idev);
for (i = 0; i < num_heaps; i++)
ion_heap_destroy(heaps[i]);
return 0;
}
Tegra の ION ドライバの場合、ドライバとデバイスの追加は分...
メモリのどこから取るか(= &pdata->heaps[i] に入ってる情報...
FIXME: platform_device_add() するときに渡しているのか?
-コードの全容は下記参照。
--[[linux-4.4.1/tegra_ion_probe()]]
--[[linux-4.4.1/tegra_ion_remove()]]
**参考 [#uf4fc901]
調査方法。
ユーザー API
$ grep -r ION_IOC_ drivers/staging/android/uapi/ | grep ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_ALLOC...
drivers/staging/android/uapi/ion.h:#define ION_IOC_FREE ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_MAP ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_SHARE...
drivers/staging/android/uapi/ion.h:#define ION_IOC_IMPOR...
drivers/staging/android/uapi/ion.h:#define ION_IOC_SYNC ...
drivers/staging/android/uapi/ion.h:#define ION_IOC_CUSTO...
カーネル API
$ grep -r EXPORT_SYMBOL drivers/staging/android/ion/
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_allo...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_free);
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_phys);
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_map_...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_unma...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_clie...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_clie...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_sg_t...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_shar...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_shar...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_impo...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion.c:EXPORT_SYMBOL(ion_devi...
drivers/staging/android/ion/ion_heap.c:EXPORT_SYMBOL(ion...
drivers/staging/android/ion/ion_heap.c:EXPORT_SYMBOL(ion...
**関連モジュール [#bbe67917]
*コメント [#zc3e3089]
ページ名: