From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark yao Subject: [PATCH 5/9] drm: add Rockchip rk3288 lcd controller driver Date: Mon, 4 Aug 2014 12:51:46 +0800 Message-ID: <1407127906-1790-1-git-send-email-yzq@rock-chips.com> References: <1407127274-1356-1-git-send-email-mark.yao@rock-chips.com> Return-path: In-Reply-To: <1407127274-1356-1-git-send-email-mark.yao-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org, Rob Clark , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Randy Dunlap , David Airlie , Grant Likely , Greg Kroah-Hartman , John Stultz , Rom Lemarchand Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org, djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, xjq-TNX95d0MmH7DzftRWevZcw@public.gmane.org, kfx-TNX95d0MmH7DzftRWevZcw@public.gmane.org, cym-TNX95d0MmH7DzftRWevZcw@public.gmane.org, cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org, zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org, zwl-TNX95d0MmH7DzftRWevZcw@public.gmane.org, xxm-TNX95d0MmH7DzftRWevZcw@public.gmane.org, huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org, kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org, zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org, yxj-TNX95d0MmH7DzftRWevZcw@public.gmane.org, wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org, xw-TNX95d0MmH7DzftRWevZcw@public.gmane.org, mark yao List-Id: devicetree@vger.kernel.org Signed-off-by: mark yao --- drivers/gpu/drm/rockchip/Kconfig | 2 + drivers/gpu/drm/rockchip/Makefile | 2 +- drivers/gpu/drm/rockchip/lcdc/Kconfig | 9 + drivers/gpu/drm/rockchip/lcdc/Makefile | 4 + drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.c | 819 ++++++++++++++++++ drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.h | 1202 +++++++++++++++++++++++++++ 6 files changed, 2037 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/rockchip/lcdc/Kconfig create mode 100644 drivers/gpu/drm/rockchip/lcdc/Makefile create mode 100644 drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.c create mode 100644 drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.h diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 592e999..ccce827 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -38,3 +38,5 @@ config DRM_ROCKCHIP_CONNECTOR Choose this option if you want to use Rockchip Primary DISPLAY. The driver provides an abstraction for Rockchip display devices, such as lcd plane, lvds, edp , mipi, etc. + +source "drivers/gpu/drm/rockchip/lcdc/Kconfig" diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index a5e5132..6d49edc 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile @@ -9,5 +9,5 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_gem.o \ rockchip_panel.o obj-$(CONFIG_DRM_ROCKCHIP_CONNECTOR) += rockchip_drm_connector.o -obj-$(CONFIG_DRM_ROCKCHIP_LCDC) += rockchip_drm_lcdc.o +obj-$(CONFIG_DRM_ROCKCHIP_LCDC) += rockchip_drm_lcdc.o lcdc/ obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o diff --git a/drivers/gpu/drm/rockchip/lcdc/Kconfig b/drivers/gpu/drm/rockchip/lcdc/Kconfig new file mode 100644 index 0000000..2b94057 --- /dev/null +++ b/drivers/gpu/drm/rockchip/lcdc/Kconfig @@ -0,0 +1,9 @@ +config LCDC_RK3288 + bool "rk3288 lcdc support" + depends on DRM_ROCKCHIP_LCDC + help + Choose this option if you have a rk3288 lcd controller. + rk3288 lcdc is the display interface from memory frame buffer + to display device. There are two lcd controllers on rk3288, + They have same regs setting, can use same drivers. We use the + lcdc id distinguish between them diff --git a/drivers/gpu/drm/rockchip/lcdc/Makefile b/drivers/gpu/drm/rockchip/lcdc/Makefile new file mode 100644 index 0000000..943dcd6 --- /dev/null +++ b/drivers/gpu/drm/rockchip/lcdc/Makefile @@ -0,0 +1,4 @@ +# +# Makefile for the lcd control device driver. + +obj-$(CONFIG_LCDC_RK3288) += rk3288_lcdc.o diff --git a/drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.c b/drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.c new file mode 100644 index 0000000..f1b016c --- /dev/null +++ b/drivers/gpu/drm/rockchip/lcdc/rk3288_lcdc.c @@ -0,0 +1,819 @@ +/* + * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd + * Author: + * hjc + * mark yao + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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