Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1884557lqo; Mon, 13 May 2024 00:55:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwf9afqL4LQCmuBqpUK+psHHOQ6K9zi1Ix3qHTwTwnR1sRFJZoiRyvqE0kPtWeJvB+/bS+Gy1MZT6XNS/IgE/8qyzXqOlD4J55ICMS/A== X-Google-Smtp-Source: AGHT+IEAoXgdhb5hRflktXQXt6KKbVmp4R4q+FR1YLYzU+ngY/kmw1Uqb+zXPfis509Hmjlr/cxq X-Received: by 2002:a05:620a:2205:b0:792:c14e:d1cd with SMTP id af79cd13be357-792c75775cemr955904785a.15.1715586938718; Mon, 13 May 2024 00:55:38 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792dca04144si223647485a.731.2024.05.13.00.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 00:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=KeCVmwyE; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-177310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4EE6F1C212A4 for ; Mon, 13 May 2024 07:55:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 864AC146A8E; Mon, 13 May 2024 07:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="KeCVmwyE" Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2052.outbound.protection.outlook.com [40.107.104.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54B58146D63 for ; Mon, 13 May 2024 07:55:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.52 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715586915; cv=fail; b=QZgO+aY8Lf4YjDKTHntZ8y0rtMq0Mxhwt13Sf46BsCmmUewoguHIh1rMWCBgP5VpRrhyC5xTVKZDXgTvD+oxiDE7YwL5HdgQMh7dSa6tCTRZHv8+ClSj7+k8GdNkmD/6+6RDBGMYBGqz2vquHtKTEmemIpFmZ8+L/EH6EYUk37g= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715586915; c=relaxed/simple; bh=YHY+q4XxVhp1LT1CCdCskRTVNG/aR4qnP27/uUzhXnE=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Pn/Db2TnU4AXieWwMKgOtoUXD2+b3k2Js6EBMrQV5zLgQVTiGpEmwkfbjoTC31KmacSrIEYyZ3Q9pisS6yMTX+I9cp73Afhwbap1WuQ8thUzeBuVEefdkrIsAGO3cqiMpkM4JLCHdjKy+IMNK2WfdmddgDo8YFDHhCUz7n+upVw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=KeCVmwyE; arc=fail smtp.client-ip=40.107.104.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXstsC6ccLamlhO989NZ3YwIy427VU2Bs9162colSgLCpaeC2Gx8Bqz2czHiK/39+BFlSuhnEEThwm4I/jLXvMNS1d6sA+JscNJSNHos2JLv050yCs6e/GJvKGUTSscYgwOx+ym2/bMRfUnU84PFDYSsGZ/QJ8jI3Momeo8VhzSUWdATjkpSqPy4OiSJ7c5e/B276nmOfFJdiJ8EccWk5qyw3KzPrzxiJ01eYhaq+cfX2qsfFeaVyACvEDMaiv8x2uNmUIHPKIjtDJ9dadkuLF02Mo1LU3yDDGOqPe6UqBtRvNTKGmexCR7fgy7K9Y5PtzQOwSmffPh2dJHyNkXeQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0CehvpRZ6SLcC8HjwubxbY4iMS7lPFJU1Mnh2vcavGA=; b=GgB5rZEpH4bSCR0OsEKQ/8zvxUZg2XeYcMFwTiy1LPxKRVlFwNg5aZ/uojig7TMrCy6yp1w8lEjHg8LUM5zyme21+2xqp/O/kUA0ur8ioETeskYxR7/N+MqKiVGEwUDFXRbJNAGFp+BRa5zrDbaXZC7XLBuVY/nWCBUGXHxLtZC8f13rJUnDQ8sLzA8t+U7G+cqQfMn+/WQglmSTyYthVdbTHuiCb57w2KuD3f/jnpq+D7XHcheP9x+7qmURewPdGBNmJXTWb0HpxarJceuuxSVZ6yIm+cixSHFynZNfQnq1oXGVMI+GxwUNNzb4y5eDABshmw/jv0bv3vyNs9bK+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0CehvpRZ6SLcC8HjwubxbY4iMS7lPFJU1Mnh2vcavGA=; b=KeCVmwyECXqRTZZxr1xcdfGgBLZL6oVYFUM/o6RlG89CVnDGERKDrwRCyhXrt4oVdvgv+yceJObP54l6asWkNcFkVTiYJg2lT3glDCXDnylPq3vQks5E+jv9sPMUPaE5mwdt4pBmdBX1Fqqr5dKxQiLRJUptWZVeZpwSAI5MsUw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by VI1PR04MB7149.eurprd04.prod.outlook.com (2603:10a6:800:12e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Mon, 13 May 2024 07:55:10 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.7544.052; Mon, 13 May 2024 07:55:09 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dmitry.baryshkov@linaro.org, biju.das.jz@bp.renesas.com, aford173@gmail.com, bli@bang-olufsen.dk, robh@kernel.org, jani.nikula@intel.com Subject: [PATCH] drm/bridge: adv7511: Attach next bridge without creating connector Date: Mon, 13 May 2024 16:02:43 +0800 Message-Id: <20240513080243.3952292-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0042.apcprd02.prod.outlook.com (2603:1096:4:1f6::17) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI1PR04MB7149:EE_ X-MS-Office365-Filtering-Correlation-Id: 714afeda-1190-4b58-4581-08dc7322030c X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|52116005|366007|7416005|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ivFclt3C4PIZ2+E/T3/Nf3sIVh+6oEu6qmHneJRilN2rl8AQwLajxuWftfxg?= =?us-ascii?Q?YYT/aSSqSSZIXzocMYQhix+tsqGVwCd9WxA2EjV8HAJe2RKXhcGJqYuort5o?= =?us-ascii?Q?vRT7WU+5OyFzwFRGmE/KRiaP3/IqZJLEqLp6AvP0Xy9l68XGdQ86VOXB92VT?= =?us-ascii?Q?UEegub/VkTi/VFbj8xekYvvocrMVot/eBHQ1rbTkEEMfK5Rb46tkfPjJIy9k?= =?us-ascii?Q?V2Y3w5nbMEdwhcGek+G7G4HbGoAtAsYppZsV/dWr5WnHFIiZxV8i5HmfXXud?= =?us-ascii?Q?lRx0QjeZZ8HUMGQ4B2E1x4Ahp1cvpSwm90tyYXpZls1139VGHRfVd+xvGxUs?= =?us-ascii?Q?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KQyK1j2OSIi3dpb?= =?us-ascii?Q?Ry4HD6cSWl/FTlm/CUzUROvrduigFWaNTXth7+l3BwqGva5fBKsk7H5vD+2u?= =?us-ascii?Q?ikLzafxtWrIOofcEfTK77KLL/tssh/ClvZ8iwD1j829a7g=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(52116005)(366007)(7416005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9vbjX+KB1y8vdH9wCtz0PQZVF5mTGEoLMx8SQs8QTtCVNTy8ynyFXqeAVVMF?= =?us-ascii?Q?tW8uhNV2jHc/pGKXQBAiH7jZ065/5jlr5DQmM02j+oHKOafhoAj7s8CUfvVG?= =?us-ascii?Q?qlyLPupcbFk4HqSh3hdXPNH3LpzMBkfm1bkHwqdzDmMHlEmUJ5UDQAAa9BvT?= =?us-ascii?Q?AG0Mh0E0g/63G1hr4mfz/ppPO8wTHTn8EfI64DNczCXb0McK0OOa4CwG9sLy?= =?us-ascii?Q?MFmF5FyAOq6ccQWDnHdvNd/G3q54W3+AOXWIKrwsTjv1aNWWKDXE2PnC+j5K?= =?us-ascii?Q?yvKaRfNU2Wp4ilil0ymp8nqcm0tDJAZGhgeRdXLdCBAiye8WaEvj6OCUyAiP?= =?us-ascii?Q?iT/KYH9gc37mmyIcd4RulO0qklWNgJhMnX6UYBx9QFmsadAhI2gxfl3A8iMK?= =?us-ascii?Q?Gd05kijgdwmNZvsvv7n3Y4ymnG54UpCRgRBgJn4qqQABMLZvIVuz7MQgUuDe?= =?us-ascii?Q?9xplJDMyMGkD+73BVErM6QCp6PKsZB9Mdhje9aqBCF94UDZ7VpsAHTw38J99?= =?us-ascii?Q?m8S6EqqkZz5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=?us-ascii?Q?hrfFPkv/OoUqcT7NzYKFgoKpNKTJoyZRnGJ+4F5tarhXrdn8gjJr1IGk+Oxa?= =?us-ascii?Q?crgk4IxVQU4iUdLcwQfwWr//oKKyYfNyaCEYMNsLGFCJHVWDeShOg3Xb26fA?= =?us-ascii?Q?yE1fmfDDNlfftZuP1sDuOVRXH/WICzD6V0YN5ZWL?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 714afeda-1190-4b58-4581-08dc7322030c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2024 07:55:09.9051 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nKW4QlNd1iG1D/V5NyD0ACcZjvqokHsNGhD67HB8bkBDRmM1NaizEUu0hQ04v1KZaX1n8TgnGKk7tYzhHipphg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7149 The connector is created by either this ADV7511 bridge driver or any DRM device driver/previous bridge driver, so this ADV7511 bridge driver should not let the next bridge driver create connector. If the next bridge is a HDMI connector, the next bridge driver would fail to attach bridge from display_connector_attach() without the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag. Add that flag to drm_bridge_attach() function call in adv7511_bridge_attach() to fix the issue. This fixes the issue where the HDMI connector bridge fails to attach to the previous ADV7535 bridge on i.MX8MP EVK platform: [ 2.216442] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /hdmi-connector to encoder None-37: -22 [ 2.220675] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA [ 2.226262] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/i2c@30a30000/hdmi@3d to encoder None-37: -22 [ 2.245204] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/dsi@32e60000 to encoder None-37: -22 [ 2.256445] imx-lcdif 32e80000.display-controller: error -EINVAL: Failed to attach bridge for endpoint0 [ 2.265850] imx-lcdif 32e80000.display-controller: error -EINVAL: Cannot connect bridge [ 2.274009] imx-lcdif 32e80000.display-controller: probe with driver imx-lcdif failed with error -22 Fixes: 14b3cdbd0e5b ("drm/bridge: adv7511: make it honour next bridge in DT") Signed-off-by: Liu Ying --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index dd21b81bd28f..66ccb61e2a66 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -953,7 +953,8 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge, int ret = 0; if (adv->next_bridge) { - ret = drm_bridge_attach(bridge->encoder, adv->next_bridge, bridge, flags); + ret = drm_bridge_attach(bridge->encoder, adv->next_bridge, bridge, + flags | DRM_BRIDGE_ATTACH_NO_CONNECTOR); if (ret) return ret; } -- 2.34.1