From patchwork Thu Apr 26 22:31:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10366897 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 2C61A6032C for ; Thu, 26 Apr 2018 22:33:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19C3F28894 for ; Thu, 26 Apr 2018 22:33:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D21A2920B; Thu, 26 Apr 2018 22:33:47 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 634A928894 for ; Thu, 26 Apr 2018 22:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EvS0Nv0eVNRM5YZz4WfujXwieiMOnxQZpcD65ydEpzw=; b=MSKDTLG0478Tq7 APUu3UgiyzzABQQwbqmipdPDD6PhgYWjspLxd6qoNNZBgHPnRAtLuoruQGs0bMJ2LR5Seimbreoej kmSfU3vkdSuTZiXcgnaWSUm4xeKHS/l/OedrsbnvsAi2SWN9BxS7eqodwEAvo1zB8onp5VXMooDAD MdtmY3Zchrb21lAM/CaDdm8O7z6OVqe4YoCkvA4yeU+M/LkQ0dcZQY6n7WHft4DUFvPmXOAEiMAs2 LO/uG6JA5uy9C6phJT9PryZzT/GU0x2hFWUga+xxWbP7s3xqxYq8x87ohXUqRV5w7pPZTf7jNr8tw iB0P08jCSpFFBR/XEWKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBpSH-0004Cn-2M; Thu, 26 Apr 2018 22:33:33 +0000 Received: from mail-he1eur01on0098.outbound.protection.outlook.com ([104.47.0.98] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBpRE-0003Go-Fx; Thu, 26 Apr 2018 22:32:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=p6k7S43cu+4mipu5TfUv4E5uq8WyychpHSig2ozu9Ig=; b=G+P4BPTsB9I72n7WK25tFdudsGfWuj5XsGrPpJjyQ0CNKMFYaNKnUrAb2G6yQzIhz+98IOdPaykAp4pBV7b0oUM07f92sd9DzUKHstTtYtgB34UFeSWzdLi39wsIQT0lDXCB/UHWHxjI9+EQtmUFUQ6kqzLfeAkW0ZukyeR6Ex8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by VI1PR0202MB2782.eurprd02.prod.outlook.com (2603:10a6:800:db::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Thu, 26 Apr 2018 22:32:08 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 01/24] drm/bridge: allow optionally specifying an .owner device Date: Fri, 27 Apr 2018 00:31:16 +0200 Message-Id: <20180426223139.16740-2-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180426223139.16740-1-peda@axentia.se> References: <20180426223139.16740-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR05CA0366.eurprd05.prod.outlook.com (2603:10a6:7:94::25) To VI1PR0202MB2782.eurprd02.prod.outlook.com (2603:10a6:800:db::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:VI1PR0202MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 3:7Rin7S4ZTniMVNH/9lQ8Wb728S7mRwP2UAjTSl8eVVHXKj9vi6MxdervBp64L6VGdMSFNH8EzEU6BJnbW8sEDFhty2lisfrOBTyvXb+RoALn/mZUlcMkdaKMPF9+Z/KhXYnbyl2mP9Vu1Zp25Ac88Spx8SOcKbmOwrkq/y90ZwLPT8VYC3gGfnREZckc3cGoNRgd7OOr1+Yh2KDHE/b/Rt7yvXaU76lYwV/UbhZsqzT8iKrW8yna9eJMxJD/qGQi; 25:d0R6hIfLgKKpJaqWWjxVS57pfh6PfQ/rWl0n/hn33o37FEkoLi4B6WJ8q0zFrmyrCwLsvMGedq5/zDhfU/U0dWpNVetRUNRFI9JwzN4uSnL/9YyOM7yrKqiPVRNLUIGUEFrsfEKp+KZTvNd8VauiNHQgxrwHMkQrlx7GInPrkGhz1Jpccx3UYl6yYdEiHdMAYxnE72Kph6EaZV+qcxbKYlcR3Bw5KhZTr8dAf6aIeU78DuhwAu8G71z25lkj6Z4P+Frli1W4z0riXIcTMeudQpUz5FODJQh8L+u4U56GiueAeGrwDb4iDvnWyzvWg6mLUzJjWWXwlwzZtWEYFGM5rg==; 31:zXWVCKuVU/x/1QOvMAYUSD8kVA0pDVEkCosGQGGzt3D+vilDCBVG8OwQBVvz3Y+RkEXg9miCK2z1DmKDIB6Ptj3meMXv6S3OWamT4uesjWyLepUvH4TC60EdFhlYoBI3nqiyxUb87/USzn+IaNzwWekchkmyH1m6dbaibvLXWBNNtTPCHP7LNENwaE26KAmk7zTtcguHifhbrXEZmIRkF9DQ1adGXXiH0+qCj+ZY828= X-MS-TrafficTypeDiagnostic: VI1PR0202MB2782: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231232)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6041310)(20161123562045)(20161123564045)(20161123560045)(2016111802025)(20161123558120)(6043046)(6072148)(201708071742011); SRVR:VI1PR0202MB2782; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0202MB2782; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 4:xBd5t1Sp7/yD60iG3aXjOVYBpgafyxUihPAN/CmG8XrPQusHp9iOfz03gSIk/LC45Wtc1+CT/tCI6jPBPUShq619Xh0ECaNLtHSLkPaVC2cyZz5S3n5DKhKU6nXiKRSm3TNGYZwL8p0RdQT2WQndbW5LdRE1Bw5Y2xlHSdK+wHHLk+n+Rn3mvsp8/BczbkJ7TMuRv7PPviiQOjQ6hg411OEtYPP7UafVdnRLiVjZimaTMg4F8AmUzV5sXrOi2AwLyw8j+R2/1qpdBaKEqAAPiQ== X-Forefront-PRVS: 0654257CF5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(396003)(346002)(366004)(39380400002)(39830400003)(199004)(189003)(50466002)(186003)(446003)(39060400002)(86362001)(956004)(8676002)(4326008)(476003)(59450400001)(2616005)(54906003)(11346002)(51416003)(53936002)(478600001)(68736007)(97736004)(305945005)(5660300001)(316002)(386003)(52116002)(6512007)(575784001)(7406005)(76176011)(26005)(7416002)(6506007)(486006)(3846002)(6916009)(6116002)(7736002)(6666003)(66066001)(106356001)(2361001)(16586007)(105586002)(81156014)(8936002)(50226002)(47776003)(81166006)(2906002)(16526019)(1076002)(74482002)(6486002)(36756003)(25786009)(2351001)(48376002)(142923001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0202MB2782; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0202MB2782; 23:EDDuCM/MBNx7DOeMmTXOASqxL/NLZJw0X72p6SK?= =?us-ascii?Q?Bj5axjjX7UPzIVjo6atdkUrrQbnv3cD0R+XfnB7talOvfmV2xg+R1MZwkTPV?= =?us-ascii?Q?K4bfbj/5KVVZcjW8WGa0/IitMn6OteDAK0V/tYPWS2AAExFT1ZpqbWtKg0hR?= =?us-ascii?Q?mORmZZART4D0pbOG1ZZoVzhxzpNbY47cEM2eKsGCZAUw6OfK86BiIj/0i71S?= =?us-ascii?Q?XpgZjBO+0fakfZ27Qz24xMZyZOxZ7lkQ95s30aKmTNRwpxPdr+XbPm1BDCmC?= =?us-ascii?Q?v77aHzKKK/zC6dzbY99n2F3UbD3oouz7hK3I4jqcnFadurcMBmQhP+0dJsVU?= =?us-ascii?Q?q2Tjr63Kzxi/oY33wLemM9agL0czJonRPtrJTbDsm+5FNh6+ZWVVXXjGtdAw?= =?us-ascii?Q?Y5kopmgPoEKmxklVrhVTVaOMqCDJHS7f2ELxYnZPFW9b0dHJNp8OlCNIkptm?= =?us-ascii?Q?P9CBm2E6TxiqluP9GRkIGTP9evlEXRePa2Y8qVgyeiLS7TdEElc1kuK79Iwx?= =?us-asc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KpfwDp4d3vqqBGrHFzxjdgA4ljLOjfXn90x10g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0202MB2782; 7:CyUQm7aKVk109xoZAsaWjRpiszD0FXiYjVtTwtzr5H98odHbPaMoKirK6d+bo0KBYf/kxcly7O+cZu3XrrP0K8s9/lqo/LfhahrfjdOXKqJIb8VLmxU8uYOk5Lo20vur8MAukUnFvGdfjMSELHAdYna+iA08sJ/1SVfUdvTDlOElzyZu+NoUT65l+w7aKyWcMUHfv0Q+CsdmLU/pbxhh9XEFsxzIm4Lgiz2W3IBVtzWaKF09O0a4HxpLq6NTUqFk X-MS-Office365-Filtering-Correlation-Id: d98f6099-9c2c-40e7-046f-08d5abc58d53 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 22:32:08.7134 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d98f6099-9c2c-40e7-046f-08d5abc58d53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0202MB2782 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180426_153228_556104_92D66A4C X-CRM114-Status: GOOD ( 11.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martyn Welch , David Airlie , Gustavo Padovan , dri-devel@lists.freedesktop.org, Andrzej Hajda , Laurent Pinchart , Benjamin Gaignard , Archit Taneja , linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Kyungmin Park , Krzysztof Kozlowski , Kukjin Kim , Peter Senna Tschudin , CK Hu , Martin Donnelly , linux-arm-msm@vger.kernel.org, Maarten Lankhorst , Jyri Sarha , Inki Dae , Sean Paul , Matthias Brugger , Vincent Abriou , linux-arm-kernel@lists.infradead.org, Seung-Woo Kim , linux-renesas-soc@vger.kernel.org, Rob Clark , Philipp Zabel , linux-mediatek@lists.infradead.org, freedreno@lists.freedesktop.org, Peter Rosin Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Bridge drivers can now (temporarily, in a transition phase) select if they want to provide a full owner or keep just providing an of_node. By providing a full owner device, the bridge drivers no longer need to provide an of_node since that node is available via the owner device. When all bridge drivers provide an owner device, that will become mandatory and the .of_node member will be removed. Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_bridge.c | 3 ++- include/drm/drm_bridge.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 1638bfe9627c..67147673fdeb 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -365,7 +365,8 @@ struct drm_bridge *of_drm_find_bridge(struct device_node *np) mutex_lock(&bridge_lock); list_for_each_entry(bridge, &bridge_list, list) { - if (bridge->of_node == np) { + if ((bridge->owner && bridge->owner->of_node == np) || + bridge->of_node == np) { mutex_unlock(&bridge_lock); return bridge; } diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 3270fec46979..c28a75ad0ae2 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -254,6 +254,7 @@ struct drm_bridge_timings { /** * struct drm_bridge - central DRM bridge control structure + * @owner: device that owns the bridge * @dev: DRM device this bridge belongs to * @encoder: encoder to which this bridge is connected * @next: the next bridge in the encoder chain @@ -265,6 +266,7 @@ struct drm_bridge_timings { * @driver_private: pointer to the bridge driver's internal context */ struct drm_bridge { + struct device *owner; struct drm_device *dev; struct drm_encoder *encoder; struct drm_bridge *next;