summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mediatek/mtk_drm_gem.h
diff options
context:
space:
mode:
authorCK Hu <ck.hu@mediatek.com>2019-01-14 12:36:48 +0300
committerCK Hu <ck.hu@mediatek.com>2019-03-19 05:37:40 +0300
commit3df64d7b0a4f70f1797f23cfd4cca5c4d48131fe (patch)
tree818876d719669c8005d6195c839affd36ae4ffa7 /drivers/gpu/drm/mediatek/mtk_drm_gem.h
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
downloadlinux-3df64d7b0a4f70f1797f23cfd4cca5c4d48131fe.tar.xz
drm/mediatek: Implement gem prime vmap/vunmap function
For some application which need kernel virtual address, such as fbcon, implement these function to map/unmap kernel virtual address of prime buffer. Signed-off-by: CK Hu <ck.hu@mediatek.com>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_drm_gem.h')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_gem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.h b/drivers/gpu/drm/mediatek/mtk_drm_gem.h
index 534639b43a1c..c047a7ef294f 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_gem.h
+++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.h
@@ -37,6 +37,7 @@ struct mtk_drm_gem_obj {
dma_addr_t dma_addr;
unsigned long dma_attrs;
struct sg_table *sg;
+ struct page **pages;
};
#define to_mtk_gem_obj(x) container_of(x, struct mtk_drm_gem_obj, base)
@@ -52,5 +53,7 @@ int mtk_drm_gem_mmap_buf(struct drm_gem_object *obj,
struct sg_table *mtk_gem_prime_get_sg_table(struct drm_gem_object *obj);
struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev,
struct dma_buf_attachment *attach, struct sg_table *sg);
+void *mtk_drm_gem_prime_vmap(struct drm_gem_object *obj);
+void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
#endif