From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756142AbbCCKHL (ORCPT ); Tue, 3 Mar 2015 05:07:11 -0500 Received: from mail-bn1bon0113.outbound.protection.outlook.com ([157.56.111.113]:6368 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755593AbbCCKHC convert rfc822-to-8bit (ORCPT ); Tue, 3 Mar 2015 05:07:02 -0500 From: "Jianwei.Wang@freescale.com" To: Daniel Vetter CC: "dri-devel@lists.freedesktop.org" , "jbarnes@virtuousgeek.org" , Scott Wood , Xiubo Li , Huan Wang , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver Thread-Topic: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver Thread-Index: AQHQR30nnheRT87PeU+gNHTK+PAZfZz8mDyAgA2ZQKA= Date: Tue, 3 Mar 2015 10:06:57 +0000 Message-ID: References: <1423825436-47780-1-git-send-email-b52261@freescale.com> <20150222113507.GO24485@phenom.ffwll.local> In-Reply-To: <20150222113507.GO24485@phenom.ffwll.local> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [123.151.195.53] authentication-results: ffwll.ch; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0878; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006);SRVR:DM2PR0301MB0878;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0878; x-forefront-prvs: 0504F29D72 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(13464003)(24454002)(377454003)(51704005)(87936001)(2656002)(62966003)(2900100001)(54356999)(2950100001)(76576001)(74316001)(66066001)(15975445007)(76176999)(50986999)(102836002)(99286002)(77156002)(1720100001)(106116001)(5890100001)(92566002)(110136001)(86362001)(575784001)(19580405001)(46102003)(19580395003)(40100003)(122556002)(33656002)(2004002)(579004)(559001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0878;H:DM2PR0301MB1229.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2015 10:06:57.2146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0878 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel > Vetter > Sent: Sunday, February 22, 2015 7:35 PM > To: Wang Jianwei-B52261 > Cc: dri-devel@lists.freedesktop.org; jbarnes@virtuousgeek.org; Wood > Scott-B07421; Xiubo Li; Wang Huan-B18965; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver > > On Fri, Feb 13, 2015 at 07:03:54PM +0800, Jianwei Wang wrote: > > This patch add support for Two Dimensional Animation and Compositing > > Engine (2D-ACE) on the Freescale LS102x SoCs. > > > > 2D-ACE is a Freescale display controller. It supports at most four > > plane and provide an hardware cursor. > > > > This is a simplified version, only a primary plane, a fb created for > > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the > > encoder is not in use. Now this drver support fbdev only. > > > > Signed-off-by: Alison Wang > > Signed-off-by: Xiubo Li > > Signed-off-by: Jianwei Wang > > Imo adding a new driver without primary plane support (use > drm_crtc_init_with_planes) and without atomic support doesn't make sense > any more. > > Also, what do you mean with "support fbdev only"? > -Daniel > Daniel, This driver has supported primary plane (use drm_crtc_init_with_planes) Already. If atomic support is a must? 2D-ACE is a simple display Controller and this is a simplified version. If atomic support is not a must, I want to add it with patches, is it ok? " Now this drver support fbdev only." if this sentence confuses you, I'd like remove it. In fact I mean that this driver only create a framebuffer dev (use drm_fbdev_cma_init). Thanks Regards, Wang Jianwei > > --- > > .../devicetree/bindings/video/fsl,dcfb.txt | 50 +++ > > drivers/gpu/drm/Kconfig | 2 + > > drivers/gpu/drm/Makefile | 1 + > > drivers/gpu/drm/fsl/Kconfig | 17 + > > drivers/gpu/drm/fsl/Makefile | 7 + > > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 412 > +++++++++++++++++++++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h | 40 ++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c | 323 > ++++++++++++++++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h | 167 +++++++++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c | 43 +++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c | 45 +++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h | 22 ++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c | 124 +++++++ > > drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h | 28 ++ > > 14 files changed, 1281 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/video/fsl,dcfb.txt > > create mode 100644 drivers/gpu/drm/fsl/Kconfig create mode 100644 > > drivers/gpu/drm/fsl/Makefile create mode 100644 > > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c > > create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h > > > > diff --git a/Documentation/devicetree/bindings/video/fsl,dcfb.txt > > b/Documentation/devicetree/bindings/video/fsl,dcfb.txt > > new file mode 100644 > > index 0000000..de7da97 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/video/fsl,dcfb.txt > > @@ -0,0 +1,50 @@ > > +* Freescale Simple Display Controller FB Driver > > + > > +Required properties: > > +- compatible: Should be one of "fsl,ls1021a-dcfb". > > +- reg: Address and length of the register set for dcfb. > > +- clocks: From common clock binding: handle to dcfb clock. > > +- clock-names: From common clock binding: Shall be "dcfb". > > +- display: The phandle to display node. > > + > > +Optional properties: > > +- scfg-controller: The phandle of scfg node. > > + > > +Required properties: > > +- bits-per-pixel: <16> for RGB565, > > + <24> for RGB888, > > + <32> for RGB8888. > > + > > +Required timing node for dispplay sub-node: > > +- display-timings: Refer to binding doc display-timing.txt for > details. > > + > > +Examples: > > +dcfb: dcfb@2ce0000 { > > + compatible = "fsl,ls1021a-dcfb"; > > + reg = <0x0 0x2ce0000 0x0 0x10000>; > > + clocks = <&platform_clk 0>; > > + clock-names = "dcfb"; > > + scfg-controller = <&scfg>; > > + display = <&display>; > > + > > + display: display@0 { > > + bits-per-pixel = <24>; > > + > > + display-timings { > > + native-mode = <&timing0>; > > + timing0: nl4827hc19 { > > + clock-frequency = <10870000>; > > + hactive = <480>; > > + vactive = <272>; > > + hback-porch = <2>; > > + hfront-porch = <2>; > > + vback-porch = <1>; > > + vfront-porch = <1>; > > + hsync-len = <41>; > > + vsync-len = <2>; > > + hsync-active = <1>; > > + vsync-active = <1>; > > + }; > > + }; > > + }; > > +}; > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index > > 151a050..a6957aa 100644 > > --- a/drivers/gpu/drm/Kconfig > > +++ b/drivers/gpu/drm/Kconfig > > @@ -199,6 +199,8 @@ source "drivers/gpu/drm/bochs/Kconfig" > > > > source "drivers/gpu/drm/msm/Kconfig" > > > > +source "drivers/gpu/drm/fsl/Kconfig" > > + > > source "drivers/gpu/drm/tegra/Kconfig" > > > > source "drivers/gpu/drm/panel/Kconfig" > > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index > > 2c239b9..ab5b9ef 100644 > > --- a/drivers/gpu/drm/Makefile > > +++ b/drivers/gpu/drm/Makefile > > @@ -56,6 +56,7 @@ obj-$(CONFIG_DRM_UDL) += udl/ > > obj-$(CONFIG_DRM_AST) += ast/ > > obj-$(CONFIG_DRM_ARMADA) += armada/ > > obj-$(CONFIG_DRM_ATMEL_HLCDC) += atmel-hlcdc/ > > +obj-$(CONFIG_DRM_FSL_DCU) += fsl/ > > obj-$(CONFIG_DRM_RCAR_DU) += rcar-du/ > > obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ > > obj-$(CONFIG_DRM_OMAP) += omapdrm/ > > diff --git a/drivers/gpu/drm/fsl/Kconfig b/drivers/gpu/drm/fsl/Kconfig > > new file mode 100644 index 0000000..e4f8df0 > > --- /dev/null > > +++ b/drivers/gpu/drm/fsl/Kconfig > > @@ -0,0 +1,17 @@ > > +config DRM_FSL_DCU > > + tristate "DRM Support for Freescale DCU" > > + depends on DRM && OF && ARM > > + select DRM_KMS_HELPER > > + select DRM_KMS_CMA_HELPER > > + select VIDEOMODE_HELPERS > > + select BACKLIGHT_CLASS_DEVICE > > + select BACKLIGHT_LCD_SUPPORT > > + select REGMAP_MMIO > > + select DRM_KMS_FB_HELPER > > + select FB_SYS_FILLRECT > > + select FB_SYS_COPYAREA > > + select FB_SYS_IMAGEBLIT > > + select FB_SYS_FOPS > > + help > > + Choose this option if you have an Freescale DCU chipset. > > + If M is selected the module will be called fsl-dcu-drm. > > diff --git a/drivers/gpu/drm/fsl/Makefile > > b/drivers/gpu/drm/fsl/Makefile new file mode 100644 index > > 0000000..51c3e1f > > --- /dev/null > > +++ b/drivers/gpu/drm/fsl/Makefile > > @@ -0,0 +1,7 @@ > > +fsl-dcu-drm-y := fsl_dcu_drm_drv.o \ > > + fsl_dcu_drm_kms.o \ > > + fsl_dcu_drm_plane.o \ > > + fsl_dcu_drm_crtc.o \ > > + fsl_dcu_drm_fbdev.o \ > > + > > +obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu-drm.o > > diff --git a/drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c > > b/drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c > > new file mode 100644 > > index 0000000..9f5ba86 > > --- /dev/null > > +++ b/drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c > > @@ -0,0 +1,412 @@ > > +/* > > + * Copyright 2015 Freescale Semiconductor, Inc. > > + * > > + * Freescale DCU drm device driver > > + * > > + * This program is free software; you can redistribute it and/or > > +modify > > + * it under the terms of the GNU General Public License as published > > +by > > + * the Free Software Foundation; either version 2 of the License, or > > + * (at your option) any later version. > > + */ > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include