From patchwork Tue Nov 26 13:15:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihail Atanassov X-Patchwork-Id: 11262351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E87D13A4 for ; Tue, 26 Nov 2019 13:18:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 267552073F for ; Tue, 26 Nov 2019 13:18:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 267552073F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A3056E3B8; Tue, 26 Nov 2019 13:18:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150077.outbound.protection.outlook.com [40.107.15.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DF4B6E3B8 for ; Tue, 26 Nov 2019 13:18:21 +0000 (UTC) Received: from VI1PR0802CA0048.eurprd08.prod.outlook.com (2603:10a6:800:a9::34) by DBBPR08MB4918.eurprd08.prod.outlook.com (2603:10a6:10:dc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17; Tue, 26 Nov 2019 13:18:16 +0000 Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by VI1PR0802CA0048.outlook.office365.com (2603:10a6:800:a9::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16 via Frontend Transport; Tue, 26 Nov 2019 13:18:15 +0000 Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17 via Frontend Transport; Tue, 26 Nov 2019 13:18:15 +0000 Received: ("Tessian outbound af6b7800e6cb:v33"); Tue, 26 Nov 2019 13:18:15 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 88abe4fe9b598599 X-CR-MTA-TID: 64aa7808 Received: from 687810ec6074.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.14.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9431D19B-8F27-4295-8303-9987175DBD7C.1; Tue, 26 Nov 2019 13:16:01 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2052.outbound.protection.outlook.com [104.47.14.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 687810ec6074.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 26 Nov 2019 13:16:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=loCJsxgdhnaI3BvvBmF5rP9JRxXUkv8zV8eIVQckGUE0+yRjCGLb9vg8ltcJAKLegeM6VlgcnEKDq89y50MZd5xB8i8sO498oGGSQN1UOh/uFqMehav+e2LNQD/RRK5XySY0wupx5QIIEQ/7EkYG6FAydMYOZJyPsSN1xXfuEzZM9ivlPlyw/4Oh6bTWpqk0WaPApI45oypzfdyueJpbGQI8jITAWN54EzYUL/m0xUEfxAhyasEP3LXNvjiWS0lTIm6KQhngtlJNVPegGSuLkEXlPiaIWjWq3BtCu6Jly1UeAZ2H5fKTPpO9Ep4/QKSPoXPMZeXTEsucF+Dij17nig== 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-SenderADCheck; bh=4kUDpYiSoqePOiJ2bE44NmSpf5EX65bMonmNaQR1LIQ=; b=Dq9ed+9GO0dRnZKyAwB7BKNGhK42nlh+HJg65PpFoUjSOFsEvrlhoGKkoGtKJcbWodgRSnMtV98//lx0Dzib0ZHk/RSsWZed9Lx2NReA2QScr3+KwGa/9zLEwM3rsrDpW8fWKoywKLxBSI8sXFcWRtqmtPe49xcyhYz75KCsRpkX1ahJ+LXxab1OpjP379ffAqLPkn7Ik3RDezv6GvXDyE+6aGeMxB4Whr5mcT5SHzHtMJtTfbVgbB9roc4QaKMOJrqCCCq2e/s50DfVTvouXnx9OJN5Ghxl/MGdD+i+3Y8f32qOqv/qyENd7m4/nJ+OZLGEuowPYVccSkKPjD8riA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from VI1PR08MB4078.eurprd08.prod.outlook.com (20.178.127.92) by VI1PR08MB4317.eurprd08.prod.outlook.com (20.179.28.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16; Tue, 26 Nov 2019 13:15:58 +0000 Received: from VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::8191:f0ac:574a:d24d]) by VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::8191:f0ac:574a:d24d%3]) with mapi id 15.20.2474.023; Tue, 26 Nov 2019 13:15:58 +0000 From: Mihail Atanassov To: "dri-devel@lists.freedesktop.org" Subject: [PATCH 00/30] drm/bridge: Add device links for lifetime control Thread-Topic: [PATCH 00/30] drm/bridge: Add device links for lifetime control Thread-Index: AQHVpFukT2OcrFpfwECdPD+snGfepQ== Date: Tue, 26 Nov 2019 13:15:58 +0000 Message-ID: <20191126131541.47393-1-mihail.atanassov@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [217.140.106.55] x-clientproxiedby: LO2P265CA0453.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::33) To VI1PR08MB4078.eurprd08.prod.outlook.com (2603:10a6:803:e5::28) x-mailer: git-send-email 2.23.0 Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Mihail.Atanassov@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 904bdbe0-b493-46b1-3772-08d7727318ce X-MS-TrafficTypeDiagnostic: VI1PR08MB4317:|VI1PR08MB4317:|DBBPR08MB4918: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:1850;OLM:1850; x-forefront-prvs: 0233768B38 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(366004)(346002)(376002)(136003)(396003)(189003)(199004)(53754006)(5640700003)(86362001)(6512007)(71200400001)(2616005)(6486002)(71190400001)(2906002)(4326008)(6916009)(44832011)(54906003)(66946007)(316002)(66446008)(64756008)(66556008)(66476007)(6436002)(7416002)(8936002)(186003)(26005)(5660300002)(102836004)(305945005)(14454004)(25786009)(99286004)(81166006)(50226002)(478600001)(2501003)(7406005)(7736002)(6116002)(2351001)(1076003)(52116002)(66066001)(256004)(14444005)(8676002)(81156014)(6506007)(3846002)(386003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4317; H:VI1PR08MB4078.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: roUWUUtA84B28BzAX+GPfSUJxME4YomFXtXePmcbD9wqy749/gM2zjPrU+q8cZHpU5mJlGjmO3qlo3p5Ch4MYIbN9cOigoF4oARRUjO1fQQw8VB9IgfbqhOYb/9t797EpN0Ma5R3FAk4TLvSt7F33+zrRlQp0jjL2EjAQBcYiq68LoT8A4UZKRQ5od7uMBwhilfW9PVRQF7hKJP/VdZ+hWCcdbl9MyLEoqfT9EZsZ7nyQJhmd0cq02Z6UjitW5HU3CQmDZ3XmGlnJYXCvf6Ca0xJK2dM6wlcYm+35v7bqmUyc7WmoQFbl8r5MTjKWjKihczXXrAi9TyHFMSHvWFjGQ6S/ONK/RHzNLb2L/Q+dlzblv25PKmaYvOYbG1n00aHa0bN92juZovCEURADcWz5clU05yUd7mpXJ193OKplB9pqJs+XgDjFAxr8evtcKNf MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4317 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Mihail.Atanassov@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(1496009)(4636009)(376002)(136003)(346002)(39860400002)(396003)(189003)(199004)(53754006)(107886003)(76130400001)(70586007)(8936002)(8746002)(50226002)(50466002)(8676002)(81156014)(5660300002)(70206006)(86362001)(23756003)(6116002)(3846002)(305945005)(14454004)(7736002)(25786009)(81166006)(1076003)(26826003)(478600001)(66066001)(47776003)(22756006)(2501003)(2906002)(2351001)(356004)(6512007)(5640700003)(6486002)(36756003)(14444005)(336012)(316002)(106002)(54906003)(186003)(36906005)(99286004)(2616005)(26005)(102836004)(4326008)(386003)(6506007)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:DBBPR08MB4918; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: b4c22472-5fc7-464f-0916-08d77272c692 NoDisclaimer: True X-Forefront-PRVS: 0233768B38 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qzkUkIIpNCTXROrl9knOSZGW+tMV6mW0LDVMCijdEdUe8GcX6CuE0uSB75QRbv3WjcFvbgGoPBIOTFYcjXZAKY5AK8m/FmQ5zAqhcfljbtMQaLyPN7sEMdtmQ7wby2hKYQBSyzw7li6ni5vZ0np/lR3zOSCD46YNYr9UBTBa+FDK5drpDyclus4cbq1unORAcSos1ah/tXnxw7h9xVs3ydwxpPoC7VMR90+fA1s8B5RGYyTlHcx/C2saSpM5Tqd3vcaPRGHX3X6bA+YC4P8IXhuBz2kvkjvn9ZrhizOU0r9XluaSHLJeD10hSPLUOnJkcrOUKDztG72xEV7mg3sZCO4htxQREOsQoJVafRnWng1sat/GuPNbEvA1GqlUR9gyJOhzBT8njMD6sACVnlthqhW/VEtGitkgxI/rgZbsb+GdhyerXzXjVn4x3fFQ43K1 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2019 13:18:15.8557 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 904bdbe0-b493-46b1-3772-08d7727318ce X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4918 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4kUDpYiSoqePOiJ2bE44NmSpf5EX65bMonmNaQR1LIQ=; b=1mlsCuWQf1ybGN5lEd73ShumXV5+7DlrUdzp38+AT7aCTuLW+l6SXhO2fiDipRtvLnpNa5zOD9Ht0f7WhJ0m6J6UgF/cOGKkjLMrdl6F0k56O4MKZRZwe6NNxbFpD9zEfdNMdY/p46NgbJF3pnesqSeqMZ8N8hQvDGyE2v3VP3Y= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4kUDpYiSoqePOiJ2bE44NmSpf5EX65bMonmNaQR1LIQ=; b=1mlsCuWQf1ybGN5lEd73ShumXV5+7DlrUdzp38+AT7aCTuLW+l6SXhO2fiDipRtvLnpNa5zOD9Ht0f7WhJ0m6J6UgF/cOGKkjLMrdl6F0k56O4MKZRZwe6NNxbFpD9zEfdNMdY/p46NgbJF3pnesqSeqMZ8N8hQvDGyE2v3VP3Y= X-Mailman-Original-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.freedesktop.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.freedesktop.org; dmarc=bestguesspass action=none header.from=arm.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martyn Welch , Neil Armstrong , David Airlie , Peter Senna Tschudin , Liviu Dudau , Philippe Cornu , Laurent Pinchart , Boris Brezillon , Mihail Atanassov , Sam Ravnborg , Jerome Brunet , Rob Clark , "linux-renesas-soc@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , Russell King , Krzysztof Kozlowski , Vasily Khoruzhick , Kukjin Kim , "james qian wang \(Arm Technology China\)" , Thierry Reding , Martin Donnelly , Jonas Karlman , "linux-kernel@vger.kernel.org" , Brian Masney , "linux-mediatek@lists.infradead.org" , Matthias Brugger , nd , Vincent Abriou , "linux-arm-kernel@lists.infradead.org" , Jernej Skrabec , Dariusz Marcinkiewicz , Wolfram Sang , Seung-Woo Kim , Douglas Anderson , Matt Redfearn , =?iso-8859-1?q?Yannick_Fertr=E9?= , Kyungmin Park , Kieran Bingham , Torsten Duwe , Icenowy Zheng Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, This series adds device links support to drm_bridge. The motivation behind it is that a drm_bridge in a module could get removed under the feet of the bridge user without warning, so we need a way to remove and reprobe the client as needed to avoid peering into the void. 1: Add a drm_bridge_init() function which wraps all initialisation of the structure prior to calling drm_bridge_add(). 2-26,28: Apply the drm_bridge_init() refactor to every bridge that uses drm_bridge_add(). 27: Minor cleanup in rcar-du. 29: Add of_drm_find_bridge_devlink() which functions the same as of_drm_find_bridge() plus adds a device device link from the owning drm_device to the bridge device. 30: As a motivating example, convert komeda to exclusively use drm_bridge for its pipe outputs; this isn't a regression in usability any more since device links bring the same automatic remove/reprobe feature as components. Mihail Atanassov (29): drm: Introduce drm_bridge_init() drm/bridge: adv7511: Use drm_bridge_init() drm/bridge: anx6345: Use drm_bridge_init() drm/bridge: anx78xx: Use drm_bridge_init() drm/bridge: cdns: Use drm_bridge_init() drm/bridge: dumb-vga-dac: Use drm_bridge_init() drm/bridge: lvds-encoder: Use drm_bridge_init() drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Use drm_bridge_init() drm/bridge: nxp-ptn3460: Use drm_bridge_init() drm/bridge: panel: Use drm_bridge_init() drm/bridge: ps8622: Use drm_bridge_init() drm/bridge: sii902x: Use drm_bridge_init() gpu: drm: bridge: sii9234: Use drm_bridge_init() drm/bridge: sil_sii8620: Use drm_bridge_init() drm/bridge: dw-hdmi: Use drm_bridge_init() drm/bridge/synopsys: dsi: Use drm_bridge_init() drm/bridge: tc358764: Use drm_bridge_init() drm/bridge: tc358767: Use drm_bridge_init() drm/bridge: thc63: Use drm_bridge_init() drm/bridge: ti-sn65dsi86: Use drm_bridge_init() drm/bridge: ti-tfp410: Use drm_bridge_init() drm/exynos: mic: Use drm_bridge_init() drm/i2c: tda998x: Use drm_bridge_init() drm/mcde: dsi: Use drm_bridge_init() drm/mediatek: hdmi: Use drm_bridge_init() drm: rcar-du: lvds: Use drm_bridge_init() drm: rcar-du: lvds: Don't set drm_bridge private pointer drm/sti: sti_vdo: Use drm_bridge_init() drm/komeda: Use drm_bridge interface for pipe outputs Russell King (1): drm/bridge: add support for device links to bridge .../gpu/drm/arm/display/komeda/komeda_drv.c | 54 ++++++------- .../gpu/drm/arm/display/komeda/komeda_kms.c | 77 ++++++++++++++++-- .../gpu/drm/arm/display/komeda/komeda_kms.h | 2 + drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 5 +- .../drm/bridge/analogix/analogix-anx6345.c | 5 +- .../drm/bridge/analogix/analogix-anx78xx.c | 8 +- drivers/gpu/drm/bridge/cdns-dsi.c | 4 +- drivers/gpu/drm/bridge/dumb-vga-dac.c | 6 +- drivers/gpu/drm/bridge/lvds-encoder.c | 7 +- .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 4 +- drivers/gpu/drm/bridge/nxp-ptn3460.c | 4 +- drivers/gpu/drm/bridge/panel.c | 7 +- drivers/gpu/drm/bridge/parade-ps8622.c | 3 +- drivers/gpu/drm/bridge/sii902x.c | 5 +- drivers/gpu/drm/bridge/sii9234.c | 3 +- drivers/gpu/drm/bridge/sil-sii8620.c | 3 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +- drivers/gpu/drm/bridge/tc358764.c | 4 +- drivers/gpu/drm/bridge/tc358767.c | 3 +- drivers/gpu/drm/bridge/thc63lvd1024.c | 7 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 +- drivers/gpu/drm/bridge/ti-tfp410.c | 5 +- drivers/gpu/drm/drm_bridge.c | 78 +++++++++++++++---- drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +- drivers/gpu/drm/i2c/tda998x_drv.c | 6 +- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 +- drivers/gpu/drm/rcar-du/rcar_lvds.c | 5 +- drivers/gpu/drm/sti/sti_dvo.c | 4 +- include/drm/drm_bridge.h | 8 ++ 31 files changed, 217 insertions(+), 134 deletions(-)