From patchwork Wed Dec 4 11:48:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihail Atanassov X-Patchwork-Id: 11272851 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 70B71930 for ; Wed, 4 Dec 2019 11:53:09 +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 514EE20803 for ; Wed, 4 Dec 2019 11:53:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 514EE20803 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 A33C66E893; Wed, 4 Dec 2019 11:53:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50071.outbound.protection.outlook.com [40.107.5.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD6A46E893; Wed, 4 Dec 2019 11:53:04 +0000 (UTC) Received: from AM4PR08CA0045.eurprd08.prod.outlook.com (2603:10a6:205:2::16) by DB6PR08MB2887.eurprd08.prod.outlook.com (2603:10a6:6:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Wed, 4 Dec 2019 11:53:01 +0000 Received: from VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by AM4PR08CA0045.outlook.office365.com (2603:10a6:205:2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12 via Frontend Transport; Wed, 4 Dec 2019 11:53:00 +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 VE1EUR03FT048.mail.protection.outlook.com (10.152.19.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Wed, 4 Dec 2019 11:53:00 +0000 Received: ("Tessian outbound 691822eda51f:v37"); Wed, 04 Dec 2019 11:52:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 437f6d2067540f2c X-CR-MTA-TID: 64aa7808 Received: from d8d84aa0dd90.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7C71EB7A-47B8-43D1-A029-58C9769C29F3.1; Wed, 04 Dec 2019 11:48:06 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d8d84aa0dd90.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 04 Dec 2019 11:48:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kEaF+W7ExQvEdH6neKqhvdNbZlry30mKX1U42J0LxQfrIIlU1BieVnZ7EX4OOn29rChkdPXUPd7aCMZ30w7UtlaxKOi3MNYSVqiLwveUNuCFnKoFUhR03P4oUe1OnP3eFEzHT6epggm8L3u4hBOSpwUoiG7BMcnHbH1JgGIOHJmQqIcUhOZR9innHK/MxZ7d/kYCxY7FNHv7zbOY3kgQTKETxXmGSGazabWKvyHVnySWuH5oBcbaUkXoycsDVVnqRqEh5bUeJEMuBYwZhidG5kyHsV/KiGa3coe8ObXfgx9HhapaWFAOSFCR7CEPy264Q9q2esUSBeY+WWGLTz6JNQ== 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=SjVNpfXVBOGU1x7uKuqKkBOktWSSMN1jfSBokyJduDg=; b=VLdKubxE9qe0uBM+73tL53n7VKVckBUMIkJMyhfeXisZNgQ6TYgohcgoo99ug2ef0E2LeNbwbQ+WO21l3xBPU99VYJ2NxXWA+Gqk1VbfxeEMzQ8+t95hgjEge79RGFYsHEceOLCbEvnQQn9gVSq9wIOwx4NPwnTTZizZ6JeWd68MabmUt6O/DIepW/FvOVOsOWyIZFOhWhDsEsheTYjvHljc+2Siah/xl0mhpniZaWLDsEBduy4OVxy18FUZI79xRwfvwIMR1asMZr49O6I3adDzSy/SNMS6c+X/3ym2/1r5MRbHeVVDWDL66hHZjYcmpmD3I5tbz2rlUnlV9AMheg== 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 VI1PR08MB2909.eurprd08.prod.outlook.com (10.170.239.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.19; Wed, 4 Dec 2019 11:48:02 +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.2495.014; Wed, 4 Dec 2019 11:48:02 +0000 From: Mihail Atanassov To: "dri-devel@lists.freedesktop.org" Subject: [PATCH v2 00/28] drm/bridge: Consolidate initialization Thread-Topic: [PATCH v2 00/28] drm/bridge: Consolidate initialization Thread-Index: AQHVqpiuNcYsgGgOskGx3fwlqVtM9Q== Date: Wed, 4 Dec 2019 11:48:01 +0000 Message-ID: <20191204114732.28514-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: LNXP265CA0055.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::19) 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: af0f7330-034f-4996-7f25-08d778b08333 X-MS-TrafficTypeDiagnostic: VI1PR08MB2909:|VI1PR08MB2909:|DB6PR08MB2887: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:227;OLM:227; x-forefront-prvs: 0241D5F98C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(376002)(39860400002)(136003)(346002)(189003)(199004)(53754006)(71200400001)(71190400001)(2906002)(305945005)(6306002)(8936002)(8676002)(5640700003)(81156014)(3846002)(7736002)(6436002)(6506007)(44832011)(52116002)(6486002)(2351001)(7416002)(7406005)(6512007)(6116002)(2501003)(4326008)(81166006)(50226002)(316002)(102836004)(86362001)(66946007)(54906003)(66446008)(66556008)(66476007)(6916009)(64756008)(14444005)(1076003)(478600001)(36756003)(2616005)(5660300002)(25786009)(14454004)(26005)(99286004)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2909; 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: zzb1BWvgKuhzkH6/NMG+E2TOkfVtj9LkyS32beGyklJ41W4Pkd3SkxpqMPZtRQUQakecODkBLrpQ4mp/O2YiQdoTdC4soVuZlJY+Bes2WwXHoO5VbDBU+kl6a457h5qDtccPxQmvF5gueJkMnV8QUfFLfi/qNZwnHcQlaZqqN5Nnd9zXPj83f1JV8Z+raa+vyzVRn99LlDY1kyR+rwISI7Dwumcgcbc0JJnQbN9ZAUtgf0+1++zrFAjGfZbPA3fjReDoJFB4KWiDJGfQExdYn8wLtRO3rUUY/AsQB0Nu+ZuK5phuqbHw0NvsrLJEiupXGZutc6JlKUca97+0YeEZGHBNvmesTxOq7zDAPimTpN1BCm3Kd2uGeM0W7c9CmcQbUDfFcIpX6H/4vkt2H0V0/cLHmjvUhw8Pp4kiVFYroinDcb1loYv8Mw3urgJBH2Rla547JJseQAHELNNUGgZF+49sbHWzi2flu33M3F8mvBuNT5O/82deIxc6SlOpoEF91pYesTskQzYd/kRjXNAEWQ== MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2909 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Mihail.Atanassov@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT048.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)(4636009)(136003)(396003)(39860400002)(376002)(346002)(53754006)(199004)(189003)(6506007)(26005)(50226002)(102836004)(86362001)(8746002)(81166006)(6512007)(81156014)(336012)(6306002)(2351001)(25786009)(450100002)(26826003)(186003)(107886003)(4326008)(14454004)(5640700003)(8676002)(2501003)(50466002)(6486002)(478600001)(8936002)(23756003)(36756003)(2616005)(22756006)(5660300002)(54906003)(1076003)(99286004)(6916009)(6116002)(356004)(316002)(2906002)(7736002)(70586007)(76130400001)(3846002)(14444005)(36906005)(70206006)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR08MB2887; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 12cee252-cdee-411e-92fa-08d778afd0ca NoDisclaimer: True X-Forefront-PRVS: 0241D5F98C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hk4ADEyLD1gvjVStSHOZl/XLdvbwEFDFqimOh/r6hYw0av76A11kT81Br5ORy3KWg9+XLXyq4hOOT+v7B5qqZjQ0EPSsyGFqWY9az1BZkJT3Kq3oDOX86VuTqOPY1xjHSVa6sAQGUfJkD/S3M5XRkfPTkRbo7sVvoGAaOqdiS5AH8u7MwRINJbh4RrnsVVHHRYqnSFYRu0qHb6s5NDjMt+cttFQL2wkj94l5ABgmrPBkCOWOSlrT1PYFUz07RUijzv2853P2n0KY4Jaw5QF9RoTt7bpDxEkywURxiKb5cF6i3o22Ze+QyUggLhOCffFqfZMjqYGdOBLpvDuLMp/Bpiq7QbZehQCZPyGh8FFYvM6eFZNYHX6dcqD4tF7uRmi9y02okfIYJ8HlHj2KfM5qq6SGtilh8kT0zUYrAW6UMKdenKEoKJKALcfasW3qVi4M/ZzEVPaZw/FPLK5bKVRrWYYbFfA1PKM2nl3FhVqSOHeqZHdexa8Bekh1ZA1yeYkK5g/d+dFlHkB9fhZINMNNkw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2019 11:53:00.5530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af0f7330-034f-4996-7f25-08d778b08333 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: DB6PR08MB2887 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=SjVNpfXVBOGU1x7uKuqKkBOktWSSMN1jfSBokyJduDg=; b=6denV8It2I8pM7c0IC7aTn9b/e92AwuJ/UflIW9wTkMgCFH3O2MxHtvBtPNum6saalbr0nEoCqK3kmkAxImTbHxtifk+0cOSebyJ8M9TRaAJAAYqncouS/9U1UjWkAttMgMbn50ZfH7+7tmhGn/+BVDfkasKnFzkrFjpkw/asTM= 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=SjVNpfXVBOGU1x7uKuqKkBOktWSSMN1jfSBokyJduDg=; b=6denV8It2I8pM7c0IC7aTn9b/e92AwuJ/UflIW9wTkMgCFH3O2MxHtvBtPNum6saalbr0nEoCqK3kmkAxImTbHxtifk+0cOSebyJ8M9TRaAJAAYqncouS/9U1UjWkAttMgMbn50ZfH7+7tmhGn/+BVDfkasKnFzkrFjpkw/asTM= 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 , Russell King , Laurent Pinchart , Boris Brezillon , Mihail Atanassov , Sam Ravnborg , Jerome Brunet , "linux-renesas-soc@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , Vincent Abriou , Martin Donnelly , Krzysztof Kozlowski , Vasily Khoruzhick , Kukjin Kim , Icenowy Zheng , Jonas Karlman , "linux-arm-msm@vger.kernel.org" , Brian Masney , "linux-mediatek@lists.infradead.org" , Matthias Brugger , nd , Sean Paul , "linux-arm-kernel@lists.infradead.org" , Jernej Skrabec , Wolfram Sang , Seung-Woo Kim , Douglas Anderson , "linux-kernel@vger.kernel.org" , =?iso-8859-1?q?Yannick_Fertr=E9?= , Kyungmin Park , Kieran Bingham , Torsten Duwe , Dariusz Marcinkiewicz , "freedreno@lists.freedesktop.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi all, I've dropped the fun parts of this series since they need more work, but figured drm_bridge_init() as a concept is still valuable on its own (and I think I'll need it to roll out device links for registered bridges), so here goes. v2: - expanded commit messages and added some extra bridge-related documentation (Daniel) - dropped v1 patches 29 and 30: 29 needs more work, and 30 depends on it - added all remaining drm_bridge implementers, found by searching for drm_bridge_funcs which is mandatory for any bridge; new uses in patches 3, 27, and 28 (Sam) - due to the above, I've decided to squash all analogix changes into one patch Reviewed-by: Laurent Pinchart --- v1 [https://patchwork.freedesktop.org/series/70039/] cover text below: 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 (28): drm: Introduce drm_bridge_init() drm/bridge: adv7511: Use drm_bridge_init() drm/bridge/analogix: 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: Use drm_bridge_init() drm/msm: Use drm_bridge_init() drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 5 ++- .../drm/bridge/analogix/analogix-anx6345.c | 5 ++- .../drm/bridge/analogix/analogix-anx78xx.c | 8 ++--- .../drm/bridge/analogix/analogix_dp_core.c | 5 ++- 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 | 34 ++++++++++++++++++- 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/msm/dsi/dsi_manager.c | 4 +-- drivers/gpu/drm/msm/edp/edp_bridge.c | 3 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 4 +-- drivers/gpu/drm/rcar-du/rcar_lvds.c | 5 ++- drivers/gpu/drm/sti/sti_dvo.c | 4 +-- drivers/gpu/drm/sti/sti_hda.c | 3 +- drivers/gpu/drm/sti/sti_hdmi.c | 3 +- include/drm/drm_bridge.h | 15 +++++++- 34 files changed, 100 insertions(+), 103 deletions(-)