From patchwork Tue May 17 17:11:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9114611 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EBA489F1C3 for ; Tue, 17 May 2016 18:20:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26F3520259 for ; Tue, 17 May 2016 18:20:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4BB7A2021B for ; Tue, 17 May 2016 18:20:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 224DF6E1B2; Tue, 17 May 2016 18:20:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 961 seconds by postgrey-1.35 at gabe; Tue, 17 May 2016 17:28:10 UTC Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0092.outbound.protection.outlook.com [157.56.110.92]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4431D89D53 for ; Tue, 17 May 2016 17:28:10 +0000 (UTC) Received: from BN3PR0301CA0013.namprd03.prod.outlook.com (10.160.180.151) by BL2PR03MB467.namprd03.prod.outlook.com (10.141.92.23) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 17 May 2016 17:12:08 +0000 Received: from BN1BFFO11FD031.protection.gbl (2a01:111:f400:7c10::1:108) by BN3PR0301CA0013.outlook.office365.com (2a01:111:e400:4000::23) with Microsoft SMTP Server (TLS) id 15.1.497.12 via Frontend Transport; Tue, 17 May 2016 17:12:08 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=nxp.com; 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 BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server (TLS) id 15.1.492.8 via Frontend Transport; Tue, 17 May 2016 17:12:07 +0000 Received: from fabio-Latitude-E6410.am.freescale.net (fabio-Latitude-E6410.am.freescale.net [10.29.244.169]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u4HHC2AU026822; Tue, 17 May 2016 10:12:02 -0700 From: Fabio Estevam To: Subject: [PATCH] Revert "drm/imx: Remove of_node assignment from ipuv3-crtc driver probe" Date: Tue, 17 May 2016 14:11:32 -0300 Message-ID: <1463505092-28018-1-git-send-email-fabio.estevam@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131079787279820403; (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)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(5008740100001)(33646002)(50466002)(48376002)(36756003)(19580395003)(85426001)(229853001)(106466001)(2351001)(105606002)(87936001)(47776003)(77096005)(11100500001)(189998001)(19580405001)(6806005)(586003)(1220700001)(110136002)(5003940100001)(104016004)(50226002)(86362001)(4326007)(2906002)(50986999)(8676002)(81166006)(8936002)(92566002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB467; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD031; 1:N4lWeKF/yfc0+MIyw9UBZllOohWrSmUT920oSAaQWk9J2/FyzShQFkPwYWXLwhFNkSdZaPUYLxW2KTROCO2jX4vdkd3ALtFIjYBN/W/Nx85J0efz8PIv8DY5l89aDuh5+46nVOBIFCJ3kFvbo4Mcbn7KLTVqcf/5aRgQYFCT4gLjZW3jq6+pZN8+utpcIKmHyLmU5quzzJf8RIrL1S1mh5b5YJQhllgUEQJc2qdttwA5u3rTM575jb2ehvXlFsXaA7uwj9dunBeT2nOPuTycS/FhjOFAVXYEYiXDjEje46albPnwdVw4Lbmv0U+p+J82nRyeeXaZuEtNANl7Fm4Huj4tv1lPuQVo+2CtRR1SxoCKpA8flFtH9pSwNRSaIjmS72wP1Q9GMCwuldN7s9wyQJ70iwBm9OmJInEUsoUfHjPWt/u/EQIbkvAaerhZ77m86t4yndJGkIVBs2SpXmaD3rNi4C4jXa4WZftimhPPJ18mLlOvJla2ttWErfA5mj3qkwRI4ilFbnG1spJbpZqY4IooSGbF9DFpt94tIJpLIli0wSSJDcxq3i4irBke2JQxYeAFEkMrBDDC3fsoOcgphJ7z22cGqJ51aqqPjFF4IdNg35oy8f3d7l6n+O5XWC8T MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: cd55b6fd-5529-4fc8-c512-08d37e766080 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 2:NvO6qGm+dy4zh47TFrKZxZqlUQXDNZhGHH62Tp2pArBNWZcPJs/skmzutIb27aFcLUvdgrfhJJ0U0EqXtrro8MmusdaWtuZv3Ld7auckj15kNIn96SihEccZ7xTAM0hOoot/SUHR+ssaF7+MZO1bWfs0otlFF5lh51P50xmQp6lK/EdphrqdfWEa76z8E7Yj; 3:GgM4Rn+BmiGNwCH0HqGEQkhAJQ6esUz/kgN5jgR1z9MPo4OsnK44+jVvQVslA85sKnwjd8oepiYMau0+0whfoszheT2J6X2RpkiAaPeZXQe2PDtSQfyfAzB1bKvOe4GHIaowW1KNto533608rI8Y7JSmwZ8AFv3wKTjsahRT+qH+w/1in0wR6A6d6u9zytoJPvA+OQW/4lS77AEW9SdNewKJCsuMYk7oZU3/AYUVJ/8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB467; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 25:pOJeue0OnLdi6I+C+/Zv6RJeIty+koD1z6leKqxNTcWyCIV8LSQHNNsnrqObngxNQDWPF8UYxjeWaTbcGF1I0aQrSuODHs1aALdAwsKufkSk/uLRCpLUVyqjsdVU1LBjqQ/PvdcAsmGn7pUhL8yO7ld8Dpu7fVkKLLjdGfnB9OUcJh4cex3Oq5vJ5CO9p3ONp7drQwVZVTD0ou4KhXHOi1k+EU2YEFqtZcjnzwOc+ncCNchyS8pqDkbpsmF4tj8fbQ9tS56qjnuqLxHsLXDJjWc4lDrw/BUl+hIuIshy6j/6kcr+rZJe9Y3iqvTeyJcYaMud9K09bmUYwH4QExb9rF+wpigvKRWNEHLPLxUC90Qa9vWk8VReU39W1XbrbI3AVpGboBslSmeHIvE7EnUeCpwSu2Q4i6peFx6YxRrBxZ1UDFVeDqyFup8j3KjDCv2kEcvnlU1Feldq5G+w+S8cfIXFk6QtX7BdLUtDc3EfV85oaakAqNbbZoX7C9SglJrn6icao0zWPVLYSkBwVA5dM/jrCohHuRkLEB4RWw+ygmeHJER9M2s06lcx7sDlQS3/X6dZWKxpnWZXKMoi0CiSLkb5S5YfKYYxLHGaStM31M+w6Moc+3JPkucGpq3UaMrRo0jNigBtEhoriXk4IvhK9fpieemFnR3xZPn8zHbdsFVQuDDf78zjlCiHbpi6XEayuIkOBf4NnDEK8Z4ToboaSw5zfgDLiYgsH/rnCX67HMgAAvpUuI1pAaGQxYdapz31 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13017025)(13023025)(13018025)(13024025)(13015025)(3002001)(10201501046)(6055026); SRVR:BL2PR03MB467; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB467; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 4:OBGn9HOWdmHLrHlAzyXte1YdgbNdb06gSbHhLgrFxnaxiX1yNGt6P9Dl+dmWhs4BXP16d4+2Oj36srcDeSTbqeodFjWDrTHCOGG6kCbd0O4qMc8pUSpps3miObc/XTIWIf7cf3MBZbtI3xLbWPBdUnmiuOPBXruBWtX2P5asbARklchtNTRR2Nhq02I7pH8Mn25vziB/tS/Oo2CPQW+ZnL5frOzUpND8ialMJGQqq2m76QJn1g/J9uf/LnQPxJYrJwA83uBJafTnRyhpJkSzR79jiX4qaL0H6YD4UgmQkHHMg5niDPhaB7hQML2MgbxdoxYZFhVMbsXzGV48AHuxL7FMHWnJO0nPvLV1fcMXUuCn/c2h4SlgrTOLNzjcq0v+sKowY5zuYP5aJeTnPvpk9xL5kl57FGGHWzIm7ZPWp7emAT3VKQ1MulB7e8iOJMGid5QPQZ0osMlJw59FY6y7OWjqnbbwPHuWv97Lco4vPto= X-Forefront-PRVS: 0945B0CC72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB467; 23:pAonQT3Y6JTvVV9BAxfsnBLkTIUBrboyKzZSPuiLVc?= =?us-ascii?Q?goqqrfKXn7zRvnERSuHr8pCTsA616qVi7ss0V6wnXDYji4p369kGZFX4e7tA?= =?us-ascii?Q?e87Rlzcp10tTK/TGflCJlBNshinhaqG4GAh7AyFAZCxw7diy+m75VdTQ5qrv?= =?us-ascii?Q?orq4eAi4M6RpfzKSf7UrDfinpEBVi7Xro5Oeng18Rjw64Tl+x5q+w736Bj3Q?= =?us-ascii?Q?yCyXPXWmLV2E6WoLfGg3NlYF25fiyW+XMUDS+mh5IIvt7o3MPEvnFI5//OWi?= =?us-ascii?Q?f8VkZ4zIr/kU6AZKnGdD3dWQk2j9t26TrdTqNNeocrZRA8z3/Qn50BpIjEl7?= =?us-ascii?Q?z04Gq4JHV0zZ226ON0WkG/5Pla7ZfgVfHkE18488ybhiVt4cCp1IGV6XQLFY?= =?us-ascii?Q?o/1FFciDiyX8qGHuJgOgWMxjngPFIgmXQ7HNKh7B0ssSFPIDwVEyG61FKMKY?= =?us-ascii?Q?wUvJk744JaTHpwEe7/6NkAyG7GJZNz7h+NDmLhLeBF9PYVZp6uFCokB1I5DS?= =?us-ascii?Q?z+k1/dsmsn/CCbv8yksFsROBBnUAnmRa1DiCT+Vz3K78cZXVyTki/I2uOK5V?= =?us-ascii?Q?rPL4DJjy9SNJxwoOmMfO9OvzASYuOL6mKrNgLW0vmDCrhBGul91eKdhySCjd?= =?us-ascii?Q?bCUlR/FhQjXukJGRKtglIcYtZ5ogS6W85HqTqtzDSACDZgDWegZFVsor7dTt?= =?us-ascii?Q?H3zzH1MztIQJgVre3RRNbamMV21oA1SRrnPoHjkFUGaGHZgcXB6+1OI52rPG?= =?us-ascii?Q?KsxGBoF+bQnOaBd9DlsjtiTmWH2tNDgLuCPCe4QG8xnwrlDkzdcogaNkRfPX?= =?us-ascii?Q?B2L74+XIxsjATWYq4uEu6F30nZsnrCciWfW3wGB/fx4vly6BpafeivZdj9/i?= =?us-ascii?Q?cokTGk/iN2R0hlOoiaeLsM2ZXLie5kYZZj9VKjOrNneGG4FfjrZOnpOhumZ+?= =?us-ascii?Q?KAby//HZmvyRF6XuUSylJD7aS79WglcSXFqmisdcCT48SLjsmvdL364mcmzY?= =?us-ascii?Q?HisHHmGT7lhwXyLrM2PG+fX14u1UCOMv6Jk2fC2n0+RdObcZO/qQQVJGtwR5?= =?us-ascii?Q?HMQ50=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB467; 5:oum/F/HJIkdcRGi1x5aoOZvEFCLrH+wlEEVPwsR7CAUZcQaGbdm5RUSPAufaFFfQcNA5vkjRnGnizrpEl2FlgfRTi2Sm0OheyZZhntz2OBl9nyZQzAwkm0OrNQSHyasJ5CDc3X66eJKihiLqZKPwIj/AmT/FuhoDJCbCxfq8oOY=; 24:sOoAyRTDjUEffO3XqC1uNmdU43Lq/EpXm98X5OY5jakoX+LWncguM2u89OoFqJSSsjIfZHikaduSlV46iDZuremq13ODWX0gqO/Fc9BAY7k=; 7:xm9A/S7ECryw6TIVz4R1oc1ytnQ0OGhViU0yS7J9utQjWIVZc6BodJS7ROVL5bkS+lJNbJYZxqrChgri7IUnEkrCqA3Paq7VRXTGp989TnQ+/TUg6EbOqWNg0SEAgB/HUmpXeh2wvbuKMlnmsPWyP54pAgBgIjJ0jRB5dOTCA1yxWA8bWtCNvacOCn8A2FSW SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2016 17:12:07.6076 (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: BL2PR03MB467 X-Mailman-Approved-At: Tue, 17 May 2016 18:20:18 +0000 Cc: dri-devel@lists.freedesktop.org, marcel.ziswiler@toradex.com, stable@vger.kernel.org, Fabio Estevam , chris.ruehl@gtsys.com.hk, lw@karo-electronics.de 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-Spam-Status: No, score=-5.6 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, 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 Commit 407c9eba789767 ("drm/imx: Remove of_node assignment from ipuv3-crtc driver probe") causes the IPU to be non-functional, so better to revert it to avoid such regression. This reverts commit 407c9eba789767feb68b42eb2d65db68584e06c0. Cc: # 4.4.x Signed-off-by: Fabio Estevam --- drivers/gpu/drm/imx/ipuv3-crtc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index dee8e8b..006753d 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -520,6 +520,28 @@ err_put_resources: return ret; } +static struct device_node *ipu_drm_get_port_by_id(struct device_node *parent, + int port_id) +{ + struct device_node *port; + int id, ret; + + port = of_get_child_by_name(parent, "port"); + while (port) { + ret = of_property_read_u32(port, "reg", &id); + if (!ret && id == port_id) + return port; + + do { + port = of_get_next_child(parent, port); + if (!port) + return NULL; + } while (of_node_cmp(port->name, "port")); + } + + return NULL; +} + static int ipu_drm_bind(struct device *dev, struct device *master, void *data) { struct ipu_client_platformdata *pdata = dev->platform_data; @@ -562,11 +584,23 @@ static const struct component_ops ipu_crtc_ops = { static int ipu_drm_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct ipu_client_platformdata *pdata = dev->platform_data; int ret; if (!dev->platform_data) return -EINVAL; + if (!dev->of_node) { + /* Associate crtc device with the corresponding DI port node */ + dev->of_node = ipu_drm_get_port_by_id(dev->parent->of_node, + pdata->di + 2); + if (!dev->of_node) { + dev_err(dev, "missing port@%d node in %s\n", + pdata->di + 2, dev->parent->of_node->full_name); + return -ENODEV; + } + } + ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); if (ret) return ret;