From patchwork Tue Jan 22 22:36:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 2021241 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 04570DF2EB for ; Tue, 22 Jan 2013 22:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753218Ab3AVWgi (ORCPT ); Tue, 22 Jan 2013 17:36:38 -0500 Received: from mail-ob0-f178.google.com ([209.85.214.178]:48444 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753350Ab3AVWgh (ORCPT ); Tue, 22 Jan 2013 17:36:37 -0500 Received: by mail-ob0-f178.google.com with SMTP id eh20so7599523obb.37 for ; Tue, 22 Jan 2013 14:36:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=tIgpUD/SgeS90AtJdwFOl7LWd/VWZvp5wHirAlAGDzQ=; b=T5UYfeZAB6/1cJLtGLJs09w5EOXWVMF8geHw/d+1Hr5nDocSJ/XZn6NMycLsO6C14t SlovDRqFn6hgoHab+zjRI/+4Pk8U2ozcy40Ml/vVfZCd8ak1QyWvya4NpiJ3i44YZLSf T/HX8nFap53047dx13G4F1+pVXwXrggQk46AWAHJxDg/COdLPqKip7Rdmw2Go21wGoyl xrp/Dn0iuGTNLXmUN3DE62NbLFlqp48n5Lfk00TYRM6lg05fiScmk+zYgfLYouQDFOiD ZkIK+2FtjP5NNBpfJRLj0Ul/Nwg75hjlX22c4yQHosFHPzRx+hY9AcZpifQi6xEztzsU lOSA== X-Received: by 10.182.151.9 with SMTP id um9mr1635330obb.89.1358894196641; Tue, 22 Jan 2013 14:36:36 -0800 (PST) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id ag15sm14445765oec.11.2013.01.22.14.36.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Jan 2013 14:36:36 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Clark Subject: [PATCH 4/4] drm/tilcdc: add support for LCD panels (v4) Date: Tue, 22 Jan 2013 16:36:25 -0600 Message-Id: <1358894185-21617-5-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358894185-21617-1-git-send-email-robdclark@gmail.com> References: <1358894185-21617-1-git-send-email-robdclark@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add an output panel driver for LCD panels. Tested with LCD3 cape on beaglebone. v1: original v2: s/of_find_node_by_name()/of_get_child_by_name()/ from Pantelis Antoniou v3: add backlight support v4: rebase to latest of video timing helpers Signed-off-by: Rob Clark --- drivers/gpu/drm/tilcdc/Kconfig | 3 + drivers/gpu/drm/tilcdc/Makefile | 1 + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 + drivers/gpu/drm/tilcdc/tilcdc_panel.c | 443 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_panel.h | 26 ++ 5 files changed, 476 insertions(+) create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.c create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.h diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig index 99beca2..f468b2b 100644 --- a/drivers/gpu/drm/tilcdc/Kconfig +++ b/drivers/gpu/drm/tilcdc/Kconfig @@ -4,6 +4,9 @@ config DRM_TILCDC select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER + select OF_VIDEOMODE + select OF_DISPLAY_TIMING + select BACKLIGHT_CLASS_DEVICE help Choose this option if you have an TI SoC with LCDC display controller, for example AM33xx in beagle-bone, DA8xx, or diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makefile index aa9097e..deda656 100644 --- a/drivers/gpu/drm/tilcdc/Makefile +++ b/drivers/gpu/drm/tilcdc/Makefile @@ -4,6 +4,7 @@ tilcdc-y := \ tilcdc_crtc.o \ tilcdc_tfp410.o \ tilcdc_slave.o \ + tilcdc_panel.o \ tilcdc_drv.o obj-$(CONFIG_DRM_TILCDC) += tilcdc.o diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index ca76dbe..d10858c 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -21,6 +21,7 @@ #include "tilcdc_regs.h" #include "tilcdc_tfp410.h" #include "tilcdc_slave.h" +#include "tilcdc_panel.h" #include "drm_fb_helper.h" @@ -589,6 +590,7 @@ static int __init tilcdc_drm_init(void) DBG("init"); tilcdc_tfp410_init(); tilcdc_slave_init(); + tilcdc_panel_init(); return platform_driver_register(&tilcdc_platform_driver); } @@ -597,6 +599,7 @@ static void __exit tilcdc_drm_fini(void) DBG("fini"); tilcdc_tfp410_fini(); tilcdc_slave_fini(); + tilcdc_panel_fini(); platform_driver_unregister(&tilcdc_platform_driver); } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c new file mode 100644 index 0000000..a3c7fe93 --- /dev/null +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -0,0 +1,443 @@ +/* + * Copyright (C) 2012 Texas Instruments + * Author: Rob Clark + * + * 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. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#include +#include +#include +#include