From patchwork Fri Jul 25 19:22:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4625321 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BD0E59F36A for ; Fri, 25 Jul 2014 19:25:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8CEF20179 for ; Fri, 25 Jul 2014 19:25:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D544C201DC for ; Fri, 25 Jul 2014 19:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758877AbaGYTZY (ORCPT ); Fri, 25 Jul 2014 15:25:24 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:44221 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757205AbaGYTZW (ORCPT ); Fri, 25 Jul 2014 15:25:22 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9A001KQ8M8ZK90@mailout1.samsung.com>; Sat, 26 Jul 2014 04:25:20 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id C9.A3.16580.02FA2D35; Sat, 26 Jul 2014 04:25:20 +0900 (KST) X-AuditID: cbfee691-b7f2f6d0000040c4-5b-53d2af20d763 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3C.04.04943.02FA2D35; Sat, 26 Jul 2014 04:25:20 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9A00DP98LUTO60@mmp1.samsung.com>; Sat, 26 Jul 2014 04:25:20 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org Cc: inki.dae@samsung.com, thierry.reding@gmail.com, robdclark@gmail.com, daniel.vetter@ffwll.ch, seanpaul@google.com, ajaynumb@gmail.com, jg1.han@samsung.com, joshi@samsung.com, prashanth.g@samsung.com, Ajay Kumar Subject: [PATCH V6 3/8] drm/panel: simple: Add support for auo_b133htn01 panel Date: Sat, 26 Jul 2014 00:52:05 +0530 Message-id: <1406316130-4744-4-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406316130-4744-1-git-send-email-ajaykumar.rs@samsung.com> References: <1406316130-4744-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsWyRsSkSldh/aVgg8PT1S0OvD/IYrHhzUJm i4UP7zJbzD9yjtXiytf3bBaT7k9gsbi88BKrxfddX9gtZpzfx2Sx6vAGdovnC38wW8w9mGvx c9c8Fgdej73fFrB47Jx1l91jwaZSj/vdx5k8+rasYvT4vEkugC2KyyYlNSezLLVI3y6BK+P/ qUdMBTdlK+bN9G9gXCLRxcjJISFgInHrwSZWCFtM4sK99WxdjFwcQgJLGSV+HljDBlO06ucr JojEIkaJqy3/oaomMEnsW30CrIpNQFti2/SbLF2MHBwiAikSz//ygdQwC3xjlLiwcB0bSFxY wE9i+8RSkHIWAVWJI/eOgrXyCrhLNN+4wQhSIiGgIDFnkg1ImFPAQ6Lp5jsWEFsIqOTxiulQ h55jl9gy1RtijIDEt8mHWCBaZS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1NTC1KLYPqYODilGhhjpqmrvNw1k5Et MPP9ar4fFmzxPzQMNi3avs14w2sDptncf5Z9VNIqUbvN+mOmtoV8p6JzhHPx5C8pib/+Hm1q aJvwo8SDYanvCyb1BRxLyg7MbL5o887rqb5z5FXFRauUxTL8VS79uP3z2NRtW9Ofq/BcbHWo mOhX5PVAfuX6C3F+0963MM5SYinOSDTUYi4qTgQADO0iW9cCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add panel_desc structure for auo_b133htn01 eDP panel. Also, modify the panel_simple routines to support timing_parameter delays if mentioned in the panel_desc structure. Signed-off-by: Ajay Kumar --- .../devicetree/bindings/panel/auo,b133htn01.txt | 7 +++ drivers/gpu/drm/panel/panel-simple.c | 47 ++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/auo,b133htn01.txt diff --git a/Documentation/devicetree/bindings/panel/auo,b133htn01.txt b/Documentation/devicetree/bindings/panel/auo,b133htn01.txt new file mode 100644 index 0000000..302226b --- /dev/null +++ b/Documentation/devicetree/bindings/panel/auo,b133htn01.txt @@ -0,0 +1,7 @@ +AU Optronics Corporation 13.3" FHD (1920x1080) color TFT-LCD panel + +Required properties: +- compatible: should be "auo,b133htn01" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index fb0cfe2..cbbb1b8 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -41,6 +41,13 @@ struct panel_desc { unsigned int width; unsigned int height; } size; + + struct { + unsigned int prepare_stage_delay; + unsigned int enable_stage_delay; + unsigned int disable_stage_delay; + unsigned int unprepare_stage_delay; + } timing_parameter; }; struct panel_simple { @@ -105,6 +112,8 @@ static int panel_simple_unprepare(struct drm_panel *panel) gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); + if (p->desc) + msleep(p->desc->timing_parameter.unprepare_stage_delay); p->panel_enabled = false; @@ -123,6 +132,9 @@ static int panel_simple_disable(struct drm_panel *panel) backlight_update_status(p->backlight); } + if (p->desc) + msleep(p->desc->timing_parameter.disable_stage_delay); + p->backlight_enabled = false; return 0; @@ -142,6 +154,9 @@ static int panel_simple_prepare(struct drm_panel *panel) return err; } + if (p->desc) + msleep(p->desc->timing_parameter.prepare_stage_delay); + if (p->enable_gpio) gpiod_set_value_cansleep(p->enable_gpio, 1); @@ -157,6 +172,8 @@ static int panel_simple_enable(struct drm_panel *panel) if (p->backlight_enabled) return 0; + if (p->desc) + msleep(p->desc->timing_parameter.enable_stage_delay); if (p->backlight) { p->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(p->backlight); @@ -342,6 +359,33 @@ static const struct panel_desc auo_b133xtn01 = { }, }; +static const struct drm_display_mode auo_b133htn01_mode = { + .clock = 150660, + .hdisplay = 1920, + .hsync_start = 1920 + 172, + .hsync_end = 1920 + 172 + 80, + .htotal = 1920 + 172 + 80 + 60, + .vdisplay = 1080, + .vsync_start = 1080 + 25, + .vsync_end = 1080 + 25 + 10, + .vtotal = 1080 + 25 + 10 + 10, + .vrefresh = 60, +}; + +static const struct panel_desc auo_b133htn01 = { + .modes = &auo_b133htn01_mode, + .num_modes = 1, + .size = { + .width = 293, + .height = 165, + }, + .timing_parameter = { + .prepare_stage_delay = 105, + .enable_stage_delay = 20, + .prepare_stage_delay = 50, + }, +}; + static const struct drm_display_mode chunghwa_claa101wa01a_mode = { .clock = 72070, .hdisplay = 1366, @@ -481,6 +525,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "auo,b101aw03", .data = &auo_b101aw03, }, { + .compatible = "auo,b133htn01", + .data = &auo_b133htn01, + }, { .compatible = "auo,b133xtn01", .data = &auo_b133xtn01, }, {