From patchwork Thu Jul 14 10:54:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Yi X-Patchwork-Id: 9229829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D737760572 for ; Thu, 14 Jul 2016 13:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7DDE26861 for ; Thu, 14 Jul 2016 13:48:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB81B2808C; Thu, 14 Jul 2016 13:48:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B51D326861 for ; Thu, 14 Jul 2016 13:48:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0EDEA6E385; Thu, 14 Jul 2016 13:48:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1143 seconds by postgrey-1.35 at gabe; Thu, 14 Jul 2016 11:39:24 UTC Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0054.outbound.protection.outlook.com [104.47.42.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id A67EF6E2FC for ; Thu, 14 Jul 2016 11:39:24 +0000 (UTC) Received: from BN3PR0301CA0059.namprd03.prod.outlook.com (10.160.152.155) by SN2PR03MB2414.namprd03.prod.outlook.com (10.166.211.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Thu, 14 Jul 2016 11:05:41 +0000 Received: from BY2FFO11FD021.protection.gbl (2a01:111:f400:7c0c::171) by BN3PR0301CA0059.outlook.office365.com (2a01:111:e400:401e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.539.14 via Frontend Transport; Thu, 14 Jul 2016 11:05:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD021.mail.protection.outlook.com (10.1.15.210) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Thu, 14 Jul 2016 11:05:40 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6EB5Z1s026987; Thu, 14 Jul 2016 04:05:37 -0700 From: Meng Yi To: Subject: [PATCH v3 1/2] drm/fsl-dcu: rework codes to support of_graph dt binding for panel Date: Thu, 14 Jul 2016 18:54:43 +0800 Message-ID: <1468493684-19501-1-git-send-email-meng.yi@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131129679408951548; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5003940100001)(7846002)(5890100001)(81166006)(81156014)(8666005)(87936001)(106466001)(77096005)(305945005)(6806005)(8936002)(50466002)(11100500001)(105606002)(47776003)(68736007)(4326007)(2906002)(92566002)(586003)(356003)(19580395003)(19580405001)(110136002)(2351001)(97736004)(8676002)(36756003)(33646002)(104016004)(86362001)(50226002)(229853001)(189998001)(50986999)(85426001)(48376002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2414; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD021; 1:soK4C3uzWhxLvk6m85S/uTvn6O4PkIjSXKtbLTqrE+SnC1ZMUvvaJKwyPpQYr3i9kPRZ526fDStoi7n46FhvLrvAQ2JUyspFzOLXkz6Zrxlj7SQSskUguAwSHAagwMfbo5vsyaRG/WWDYyIHWP4R47K56EoIGhs8qhxYHqroYlRrQlB8CB1WbnWc5XRDspzoLdXaKeSpsjKUGsr/DuSntjnEuGtFyrNGUfRyA5EeCBCpa0WqkB2+VzkDUy7MLWruDIj+ZoxTzDUabgUJws6FfU8DLltPchYa+tqCWZ0ioE9iJoSSrkXkRfT5URDeuo6GSEIgEKowx0jRp223/JAnaf0pnRZa2YZ/PRIe5Nmx7iafEKht1T2C0lq6ziUOTzg87xr81DO//TOLeOdX9fi7PEL5eYQN9Psn+sXe5iGunh0iwWD+VXgs2PNVnLCa5MqnqeIlYEbhTRZQGZBOPm5AHjCakSyzs19vVOUqidOnQW18GO3TVUz9uuxgXN7qvLzBpYVgSB5l7ay49cGxgVKO7Z+mxxlwKARHK6RjCnsaIPFi8MDAuML7MJhG3gSoe+PdLbeBzDqrM9obbN1vskrY6hAvjnxzqcAIJ+yhz5aidddKnXXZwjDN46mxXENju/ori1dpGhCO4h5OzHBPKHBl2Q/Xxut3GYyLo0XzLK9JqM7fQ9itxjrhf3VJzPVRztIGc25GDDDo1jrFYWyQgqsqpi/dbRpvLyrWcYfn7OxypmI= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8535df33-7180-440a-0493-08d3abd6cb10 X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2414; 2:p0aq2zhWyunGr+gBXISTdCLKDnjMKAL8gk8J4yHRw+ZQIvPBxyjo5mV3neBRwqDFiBASpXLy5QqUxrh1UzXLnUZeY/1kg09A/E+4B9a1Kop6db2rtsV+KZu3LbG3a3XbXXqJlbSbt32QkmCr2EshxNW2OFEUwWvmj9qn6twaUKy8+fMFmT/21r+m9ekIVZnL; 3:U/AfPy4dsUqFcXIU7ogM8CppGEh+fPGijmnskZTyCkTj1G6X1MZbca3HDQBTZzLaZRFDvqMkoqghC0s4ostyxazaMhH3DaI0LF2lL3BLy9SHjLZdRROXEwoSQRl9ISaEm6iSY5w09l6H4sSLp6qRVNwyy0CDkQbvu7gTAGZvRDFzz9/sHCECyjYXTkSgGqOqldiCKEiWnv+x5sJpw5t5eagfRqeeGYuTugHSz6nbqbw=; 25:PXJCbgOnEqorTNIVjcSjOgwSEuAaS3X+k2kWHMrbSSNKdX6yB6zRs5w9w19k3iRzMbWcxGOc1QR40bW0j9SOXsdAbiNNhAxsXOdJTGco++G+4m/MvMiXD8OQsCCbNnPApaTRCG2XG0lXTBqCkdOlvSHbZC10JMqH1p00st99+6D6HxL0bSSkcHxkmyKlYofTd4VANRP9IfylEcyrnEucLd85JP//la7r0d6xwyu1o5gbCmVCv3iUO1yeV9Gg5v3vWfevJ2QRvz1is/uxoq48U8Vj1stOCWz8VpEEHpeRI2dPzqjqYdoGEiQX3vCdO5aKYRpGet++qMOZcYxIYQ7n3E2S05CFmZmxtm+fGzEYT+HPPSG+wX+RiZNUCk5V4o0lwO7CKNQUOfASS7jLXDiX3om+CBmF6VLi9Y9VKhNYuGc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB2414; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2414; 31:ZEnBMABy2nN8DdxmY5H4w/osfj3Kh+tyEROZ949Kbwe8RaPdsRNmZTEeHkMGgcZJcWIcDg/Oq6YC+VPzF3+zMuhpFluEYwHnhXDc+Mg0IZKaetauheyVL++/7Bbq7qj+8SqtG6c0jgaQlHI+AZJWkUfl2vop81nLXXv67wPGV9xk95bQ005+Cx1jjqXBWJmUQGvBGyyYrnyAQjkvpDMuig==; 4:nw5r0MG94fiBVJbji8yKJHB+5uo5c8VIGrmQHnSRYX3XGjb0cdjHviHeJWGs18hR32wrKWU+whDMdQ4RksS3wAFTnFtUKtETiZ7UP18tEE0cKHvlyI/l01El+wWGZ+j/RWKM8fOU5azAlKtwXWRHVEQJJoKY/78Se1mzPVQ0nBnaQ9uNF9d2Pq/LzWApmBgwNi4Lk7Zj2cT9/DiGKZsGEGYBUK8XloyZs+o3MdxL0zQWCl/r6FnkjA2SA39/2690Ezzu0QpUQ493GhKX4uUuZ3ZBPzzfh4L+wsZpqMa5h8OMS9DdA7OpcJv0j28GSBIy/3do5fjKd66c7nWr4lxxou055W5JsMdb5LXVpR+VAovxOpMdY1djWzYFg5Rl0dAT5524a/sF+MVRPxCovVmV4UvShirwCjIZA7vHRV7LsWh24defWVD/+JzEuE/SA9bFymwW9APVFiJGDETG4IUklSpaiu438lGqjFBkoR6bbVx9Gfgoc5ADpKPVIc4ATxrFON0cpHkuBQPfq7JRDch35w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13024025)(13023025)(13018025)(13015025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB2414; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2414; X-Forefront-PRVS: 00032065B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2414; 23:fIaY+Vh5r59aTnKlinUvhbGhPKx4v5n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lQ9rntcSRtxXSrHR0Y1TDHTpPZNAGVvgUZBve9w4iCQ4FjagszvxFEu0rohNY2eo4p6+yZvHv7wtAMUPkALWOc3axkcUJlr8wJSyNkP5NfM/EZL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2016 11:05:40.5675 (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: SN2PR03MB2414 X-Mailman-Approved-At: Thu, 14 Jul 2016 13:48:48 +0000 Cc: Meng Yi , emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org, alexander.stein@systec-electronic.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch rework the output code to add of_graph dt binding support for panel device and also keeps the backward compatibility Signed-off-by: Meng Yi --- Changes in V3: -simplify return value statements Changes in V2: -fix some coding style issue -add fsl_dev->connector.panel check -use fsl_dev->np and drop fsl_dev->dev->of_node -return 'ret' when fsl_dcu_attach_panel failed --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 3 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 73 ++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c index c564ec6..b48ffa7 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c @@ -43,7 +43,7 @@ int fsl_dcu_drm_modeset_init(struct fsl_dcu_drm_device *fsl_dev) if (ret) goto fail_encoder; - ret = fsl_dcu_drm_connector_create(fsl_dev, &fsl_dev->encoder); + ret = fsl_dcu_create_outputs(fsl_dev); if (ret) goto fail_connector; diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h index 7093109..5a7b88e 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h @@ -25,9 +25,8 @@ to_fsl_dcu_connector(struct drm_connector *con) : NULL; } -int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev, - struct drm_encoder *encoder); int fsl_dcu_drm_encoder_create(struct fsl_dcu_drm_device *fsl_dev, struct drm_crtc *crtc); +int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev); #endif /* __FSL_DCU_DRM_CONNECTOR_H__ */ diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c index 98c998d..2e71f4b 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -141,12 +142,12 @@ static const struct drm_connector_helper_funcs connector_helper_funcs = { .mode_valid = fsl_dcu_drm_connector_mode_valid, }; -int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev, - struct drm_encoder *encoder) +static int fsl_dcu_attach_panel(struct fsl_dcu_drm_device *fsl_dev, + struct drm_panel *panel) { + struct drm_encoder *encoder = &fsl_dev->encoder; struct drm_connector *connector = &fsl_dev->connector.base; struct drm_mode_config *mode_config = &fsl_dev->drm->mode_config; - struct device_node *panel_node; int ret; fsl_dev->connector.encoder = encoder; @@ -170,21 +171,7 @@ int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev, mode_config->dpms_property, DRM_MODE_DPMS_OFF); - panel_node = of_parse_phandle(fsl_dev->np, "fsl,panel", 0); - if (!panel_node) { - dev_err(fsl_dev->dev, "fsl,panel property not found\n"); - ret = -ENODEV; - goto err_sysfs; - } - - fsl_dev->connector.panel = of_drm_find_panel(panel_node); - if (!fsl_dev->connector.panel) { - ret = -EPROBE_DEFER; - goto err_panel; - } - of_node_put(panel_node); - - ret = drm_panel_attach(fsl_dev->connector.panel, connector); + ret = drm_panel_attach(panel, connector); if (ret) { dev_err(fsl_dev->dev, "failed to attach panel\n"); goto err_sysfs; @@ -192,11 +179,57 @@ int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev, return 0; -err_panel: - of_node_put(panel_node); err_sysfs: drm_connector_unregister(connector); err_cleanup: drm_connector_cleanup(connector); return ret; } + +static int fsl_dcu_attach_endpoint(struct fsl_dcu_drm_device *fsl_dev, + const struct of_endpoint *ep) +{ + struct device_node *np; + int ret; + + np = of_graph_get_remote_port_parent(ep->local_node); + + fsl_dev->connector.panel = of_drm_find_panel(np); + of_node_put(np); + if (fsl_dev->connector.panel) { + ret = fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel); + return ret; + } + + return -ENODEV; +} + +int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev) +{ + struct of_endpoint ep; + struct device_node *ep_node, *panel_node; + int ret; + + /* This is for backward compatibility */ + panel_node = of_parse_phandle(fsl_dev->np, "fsl,panel", 0); + if (panel_node) { + fsl_dev->connector.panel = of_drm_find_panel(panel_node); + of_node_put(panel_node); + if (!fsl_dev->connector.panel) + return -EPROBE_DEFER; + ret = fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel); + return ret; + } + + ep_node = of_graph_get_next_endpoint(fsl_dev->np, NULL); + if (!ep_node) + return -ENODEV; + + ret = of_graph_parse_endpoint(ep_node, &ep); + of_node_put(ep_node); + if (ret) + return -ENODEV; + + ret = fsl_dcu_attach_endpoint(fsl_dev, &ep); + return ret; +}