Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752281AbbG2IhY (ORCPT ); Wed, 29 Jul 2015 04:37:24 -0400 Received: from mail-bl2on0082.outbound.protection.outlook.com ([65.55.169.82]:56799 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750871AbbG2IhU (ORCPT ); Wed, 29 Jul 2015 04:37:20 -0400 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; linaro.org; dkim=none (message not signed) header.d=none; From: Jianwei Wang To: CC: , , , , , , , , Subject: [PATCH v14 0/6] drm/layerscape: Add Freescale DCU DRM driver Date: Wed, 29 Jul 2015 16:29:59 +0800 Message-ID: <1438158605-28248-1-git-send-email-jianwei.wang.chn@gmail.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130826326362727722;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD029;1:ALjjiBvqxdetr8vNeDSS1Mj041KK5os8h0IWs/dsUqzrg2WUyKCACUJYVw5bx6m8y5cWqHE6e28dNUqElVQRWMgyhxtdu3/uQc5xuYzfKUAKSTcdRU3BH5S5qplLe7N4uGzFH6Ughd6FHGlJolSpkwOFZ1pMy93Nn4NS7tVjhRowWq1oK5x8mjcRYyleIM06QrLn3s8uXTqmIHLrt9Q9AD9PVpxsx5AdIHfysoOBowJjLCfwKCsLkgHmjkCPDEK99VXXRFpkq4U3b8mb0xWLUu0SjOruKkSSrrJHx4RX7tlXFWYuNqiDfQ3neRFWh2OLecpFe8evomOmxX5/tFaLSRF7+fpUn2ZMpsA4qPAeqtnTOiI+GgfRqx4eZiEkBKS1 X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(199003)(189002)(6806004)(19580395003)(83322999)(87936001)(55446002)(87572001)(81442002)(46102003)(2351001)(229853001)(73972006)(104016003)(106466001)(105596002)(92566002)(48376002)(76482005)(33646002)(77156002)(5001920100001)(62966003)(47776003)(110136002)(86362001)(36756003)(82202001)(189998001)(50986999)(5001960100002)(77096005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR03MB336;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;2:/oVNnJaqdYoCqliI1c6nKSfvHIFHVvzPVSxXVaIxRt7iafFE8J373pSrYthF7qriqRqxnLpVYS/JUuZpqRW8Yh8iLRHpsUxqK67fKpCSVX45nSI0NcOfCGi3FJ+f0caFjbkuGe08Ju+thxcxFCtyy7JLrPHrBhTA0t+r9FaHYw4=;3:yCzN+i9Bl+2Q+1/BJH98LU1LwfoUQTEilUV6vs/ibFrOyBj/jyN/GanUodTvEj6YhThU+kJi/8j1IU1VF6w5K/Gl/z/0p/AOKTOMJOrMP9VOI20wrS92x0nr337HfvfsfeK+yt22ItPvsf/WP+YzVZXTWo9wFzYVmSN17or6yBmjY+qskPiR0rErc6I5f3R4FmmHACnsIfRWi3lEszjroJn22sL3Esf5MZprW7FJ2PY=;25:OKBoGiLJ/0EIwD4/HM9XJ6MuIk5NI2+mg0Z9WXltnC/VSA4iUFuqN3yWJCJkck6luD5fNr4T7YasaKuw63Mm0LqhtUE6V+/VLoa+mbFzy4vXWceIRc6581yH2fD0HMAoZeAi4E0/oUtwrqaoqQenuMu1Td73YIy6rSfsuNL10/kA2cP2ZU/Yml/8WrbhFaP9MIrAvtKoT7WzysOXySmTn6dbT06cd1pI+GGudDSh/X1DBPoaYFKrwDBNrL8v1gFb;4:DgQ8RjqVOEA0c8k2oVgLn1CH3AnO8xuiq2jU1cwFnSzKECWGaiwNibUitHotN6uOqqpthCWQpJeGmOnBsLhYTRBhmn0skDy/0LtfGZ96scy1T3FEnByfLBq5G/sZjTxJG7qZ90II/fcysmv3KOWttfzWIQ3CPi5Tz7dnp6rHPPoxuJZ2mbRC/gEsENlZfeCbwaHYHUiDK+RSMik0D8cEqhPxu2r/NR4HACL9nRen9mczBxzTI2mrxtYRvJ5Hn4LvS+o2UzA3p2FK9VHtx29zhAva3rsnvKdInZqvfLOvBA4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB336; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DM2PR03MB336;BCL:0;PCL:0;RULEID:(400006);SRVR:DM2PR03MB336; X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;23:Hrl2qI9G7xkuI6suGva3b9PPLapLl2B6dAMLRKeGo5NybZcO5UMf/wEzfHJviLtombZlG5xSkRKb32P4q0qJeiA2Z9T4Zm9zA8qp8K7onTGPqqdBs3+I+MnYmk5ARyTY1HdgsTswq1FzoHWJBAU15KK47c3qWw9rq5WUAHEuknV40N4RKP9ZecQ7393JMas9+74U54ig1IRmE0cva1Ii0+oIQccOrsUih3+kquSF4ndfVcCEWsv3ZywhEuQGHj6TyQihul4CI7DS7bY72VW+pSNHWqBD9tbilVZkG7qspG00P6YAnH+sjRQVcGZsHIsrYVlgKhJ0S7wnqguaLc9MrMh49A+ilIpm4KCxPR0FhB7atuSq1oy2OtZweJmKhQtWP3eW1Tjm7geGPR1tOYlb4hA+/gxjxDPFeCDljqN94CtAjW/DvXYgyHpDdayYmpgP5evt0JujRINDHiSY9yJg83tW8As8Jqw2nCv+B/+TqXs66HHRTsxKdmu0VFJqXgNMqRLP4Hn4ltpCA1F4qsSNfsRUU0E4vvICP5ATumudE6eHbV4M5BwQ5yhqabSDAbtiGiUHF+GJYqwA+Sl6zX6reV8cGBW8B6nf22i4DNAziintmANEY39MZ7OvHXes+XtnnTQEkdiPsBLezwh2Dq3CUsyz1BeDwrVSIkrgf2vXNJXdWL6lcXeovE2X44KDC7db4/GBRKYBsCAByPy4TbMV61/14ospKFO0RDGrI7usGPa4rRNOnGJ7Ul58g07RCbe+IaQ2syrRliDbl9r3cIXV8tLxRFcDPCB5wUfXR7ZQ7GSHkZ8/kGqqX2upkHOWRc0mqwjhMskPIVEKZN1AAnXWcSq9PfOYuwcQaUAl1pEVt9dJh9Tl8qDVs2O+FFiQKBIZNsR+DUjiiVsnpciPgZGTChoosYMna9R2hkWsgGFxC2k= X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;5:3ct22jvc2WULxR+Bm8PhvH5vapKIJWIfkbl99GFXCJLKQEY9FDIYS20wu5ZlU5pZMkgY/rafQqlJRwaMlcLc9IcMLFHlb9tQ35PqG4vxdgjrr9U/k4xdFjw6bI1J5C8lHUwTUbU1IrwaZ+/5CZ/0uOXplgHh4DZVwF66jtApgLc=;24:ILaAdUILcZlol1FbjNDoKRvtsCQPq6EIsAks3cIsXnUV88U/aAT+h/JlHNu/UQvZg1z9Vhk0u3BvZPNpv/MWvEsqnb02M25bJHaOaNydiJE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2015 08:37:16.0855 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB336 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6383 Lines: 172 Changed in v14 -Remove drm_modeset_lock_all before drm_mode_config_reset Changed in v13 -set regmap_config.cache_type to REGCACHE_RBTREE -add call drm_modeset_lock_all before drm_mode_config_reset -adjust patch order for creating pull request Changed in v12 -Add one patch for MAINTAINER entry for drm/layerscape Adviced by Daniel Vetter -Add #include Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 put node after calling of_drm_find_panel split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value check regmap_write/regmap_read return return value remove useless ".owner = THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hook Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA8888 BGRA4444 ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig | 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 +++++++++++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c | 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 261 +++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h | 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++++++++++ 15 files changed, 1437 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/