From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751109AbaHDExF (ORCPT ); Mon, 4 Aug 2014 00:53:05 -0400 Received: from regular1.263xmail.com ([211.150.99.130]:48659 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbaHDExA (ORCPT ); Mon, 4 Aug 2014 00:53:00 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 4 X-KSVirus-check: 0 X-RL-SENDER: yzq@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: yzq@rock-chips.com X-UNIQUE-TAG: <71c1c471dd2890b4c25cd28662e040ed> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 1 From: mark yao To: heiko@sntech.de, 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@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-api@vger.kernel.org, olof@lixom.net, djkurtz@chromium.org, xjq@rock-chips.com, kfx@rock-chips.com, cym@rock-chips.com, cf@rock-chips.com, zyw@rock-chips.com, zwl@rock-chips.com, xxm@rock-chips.com, huangtao@rock-chips.com, kever.yang@rock-chips.com, zhangqing@rock-chips.com, yxj@rock-chips.com, wxt@rock-chips.com, xw@rock-chips.com, 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> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1407127274-1356-1-git-send-email-mark.yao@rock-chips.com> References: <1407127274-1356-1-git-send-email-mark.yao@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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