From: CK Hu Date: Mon, 4 Jan 2016 17:36:35 +0000 (+0100) Subject: drm/mediatek: Add DSI sub driver X-Git-Tag: v4.14-rc1~3168^2~17^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e54c14e310f655bb0915413e8e4a3da67c78a66;p=platform%2Fkernel%2Flinux-rpi.git drm/mediatek: Add DSI sub driver This patch add a drm encoder/connector driver for the MIPI DSI function block of the Mediatek display subsystem and a phy driver for the MIPI TX D-PHY control module. Signed-off-by: Jitao Shi Signed-off-by: Philipp Zabel --- diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 30e5371..eeefc97 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -4,6 +4,8 @@ config DRM_MEDIATEK depends on ARCH_MEDIATEK || (ARM && COMPILE_TEST) select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL select IOMMU_DMA select MEMORY select MTK_SMI diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index d4bde7c..e781db5 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -6,6 +6,8 @@ mediatek-drm-y := mtk_disp_ovl.o \ mtk_drm_drv.o \ mtk_drm_fb.o \ mtk_drm_gem.o \ - mtk_drm_plane.o + mtk_drm_plane.o \ + mtk_dsi.o \ + mtk_mipi_tx.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index ade67201..66bd764 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -523,6 +523,8 @@ static struct platform_driver * const mtk_drm_drivers[] = { &mtk_disp_ovl_driver, &mtk_disp_rdma_driver, &mtk_drm_platform_driver, + &mtk_dsi_driver, + &mtk_mipi_tx_driver, }; static int __init mtk_drm_init(void) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index 27dc8fa..ac6c92b 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -53,5 +53,7 @@ struct mtk_drm_private { extern struct platform_driver mtk_ddp_driver; extern struct platform_driver mtk_disp_ovl_driver; extern struct platform_driver mtk_disp_rdma_driver; +extern struct platform_driver mtk_dsi_driver; +extern struct platform_driver mtk_mipi_tx_driver; #endif /* MTK_DRM_DRV_H */ diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c new file mode 100644 index 0000000..2d808e5 --- /dev/null +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -0,0 +1,913 @@ +/* + * Copyright (c) 2015 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include