From patchwork Wed Dec 4 11:48:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihail Atanassov X-Patchwork-Id: 11272855 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 382A9930 for ; Wed, 4 Dec 2019 11:54:03 +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 1E43A20833 for ; Wed, 4 Dec 2019 11:54:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E43A20833 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 661376F54B; Wed, 4 Dec 2019 11:54:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130079.outbound.protection.outlook.com [40.107.13.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id AECA96E89A for ; Wed, 4 Dec 2019 11:54:00 +0000 (UTC) Received: from AM4PR08CA0074.eurprd08.prod.outlook.com (2603:10a6:205:2::45) by VI1PR08MB3438.eurprd08.prod.outlook.com (2603:10a6:803:82::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.22; Wed, 4 Dec 2019 11:53:57 +0000 Received: from DB5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::207) by AM4PR08CA0074.outlook.office365.com (2603:10a6:205:2::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.13 via Frontend Transport; Wed, 4 Dec 2019 11:53:57 +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 DB5EUR03FT042.mail.protection.outlook.com (10.152.21.123) 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:57 +0000 Received: ("Tessian outbound 92d30e517f5d:v37"); Wed, 04 Dec 2019 11:53:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cd0d369be7420467 X-CR-MTA-TID: 64aa7808 Received: from b2b246179d1c.5 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D81B05AE-65D4-4C35-8532-B355C79A0413.1; Wed, 04 Dec 2019 11:48:07 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b2b246179d1c.5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 04 Dec 2019 11:48:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L+KBbfAU84+ImEnbIBHCgwEr0hBWa85nLqrvcYqfohg1m0QfZlyW3P9ftZp1v/eVUOWid/Pkn6Oq5i7gTCtd8RrOlwkMAQ2D4w1Oqua7PcFfEGVJMjynkDvG98IFd5D0Uty9bwZ2w9cG8A2i08LyVHKizAvV5Y74+COLB2PIQGhLTALVTgPmpPt5bebKcnXPw+/dK2zGOYABWrgtFGmDxJzYZuuM5cI0FzvDIlion2fSveaBN7XoSL68mm6YDqRHe4vDMshC7iovDnT4VEJqZa7sgjj1w096ejXy/66N2h7wrCFfzb198ulyHS0A3I70qeVodkKhgHOFWlEp6anvnw== 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=HrR+yXjDIEHbJRHX1+pVUBG01j4aIovj/Zqj2yFBPiY=; b=Ah203kL8nZSP/pT1ZPVzeNMQLDUIPI3mpDPAfc2e5do1a0JdW7EFs51oOZdrO0CSYLKbvOyZgk5MCIXfti4kDgUwplNFwCj6Tr6t+Xb95o2VwoeQbN8wXoWb4g2pETYBzhTrf/R9mk85w+qKuPwcSYvjQ+aDXTWQVDjx820/Iwtqi4MSAmAEsvqulaL0kH8OfQvLD75kaEJeEXopoa31jpBXEI5HlUyxIewFxZEHx0fCL+1sYhpx3G9feftlZNvk2oI36Dag4k2t55ILbkmfRrIKBg2fxbyZbPxPJTvrIGz+dQ46JbfDUHCjJDJJg44YAMzWfQCRolNGtbKbBTVrFA== 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 VI1PR08MB3085.eurprd08.prod.outlook.com (52.133.15.153) 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:05 +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:05 +0000 From: Mihail Atanassov To: "dri-devel@lists.freedesktop.org" Subject: [PATCH v2 03/28] drm/bridge/analogix: Use drm_bridge_init() Thread-Topic: [PATCH v2 03/28] drm/bridge/analogix: Use drm_bridge_init() Thread-Index: AQHVqpiwLcwZikJoJ0a+RtRcqGJSlg== Date: Wed, 4 Dec 2019 11:48:04 +0000 Message-ID: <20191204114732.28514-4-mihail.atanassov@arm.com> References: <20191204114732.28514-1-mihail.atanassov@arm.com> In-Reply-To: <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: 0a78a5b2-4582-40dd-7202-08d778b0a4cf X-MS-TrafficTypeDiagnostic: VI1PR08MB3085:|VI1PR08MB3085:|VI1PR08MB3438: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:3383;OLM:3383; x-forefront-prvs: 0241D5F98C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(39860400002)(366004)(396003)(199004)(189003)(2501003)(1076003)(478600001)(6436002)(6512007)(8936002)(6486002)(54906003)(44832011)(4326008)(316002)(50226002)(8676002)(5660300002)(2906002)(81156014)(81166006)(7416002)(6116002)(3846002)(66946007)(66476007)(66556008)(66446008)(64756008)(11346002)(186003)(2616005)(14454004)(52116002)(76176011)(99286004)(2351001)(25786009)(86362001)(26005)(5640700003)(6916009)(102836004)(71200400001)(305945005)(7736002)(71190400001)(14444005)(6506007)(36756003)(5024004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3085; H:VI1PR08MB4078.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: 1ffe5rZOEHbjfYqzzbcXz+/I7Hm2qXR1cP4gyHPmGIp6Gl90viHvajFm7GhBDOGYDFvqSsF/rfRxPVjYXl9h5g+lCrto+a9FXmiv4NLYRlFHuJS85HWnRtzXgwdU6u4xbt4i28B4rHOhJFyu4MUzGtq7skv1rhaKF53Do+DdNlzHEBRYP1E4KJSRheJIQsdOHAaWp/NbvKRB1iHOn1OSwtw4lwUoV0G4RHaeLoWJAgzokfjRQr0e+sFILdxsvT6ZSuqxhgSXBTCGPSSV1PhhMF2Vfs9Pi4bAVdK8YTSppG5X+lJPCbNjm9nzBGtYwaf5Zg4hfRpsXYMcGW0d7Z/HcXFYn6WmUgV1j8EFepnG8QoWSGsHHOQ+hUhGQpORpbDK/qeBNZ5kQVbmlAPT0dVldJZ8UF5KYgFPMacQ+a+SVBTLXaxCKAt6xcSQPcA/Sp+q MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3085 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Mihail.Atanassov@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT042.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)(376002)(396003)(39860400002)(346002)(189003)(199004)(70586007)(81166006)(186003)(2616005)(81156014)(50226002)(107886003)(11346002)(6486002)(26005)(22756006)(2351001)(7736002)(76130400001)(14444005)(70206006)(23756003)(5024004)(26826003)(356004)(478600001)(54906003)(14454004)(5660300002)(36756003)(8746002)(316002)(3846002)(8936002)(1076003)(305945005)(50466002)(99286004)(102836004)(2501003)(4326008)(76176011)(336012)(25786009)(6506007)(6916009)(6512007)(86362001)(2906002)(8676002)(5640700003)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3438; 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: f9a0e851-401f-4cfa-5e26-08d778afd2c1 NoDisclaimer: True X-Forefront-PRVS: 0241D5F98C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KDkpEtSDDETR+/mLjsy3kcemXmqFooO43IZf/KB4AM4jFz0u6YOCrSAXaWN1ZLqOoayje9REi0SCfc+tUKkNmFr5biYnwCXtdf0mWIaahWZgg/OCtTtZailS8YKnFjZER9pZZAHhpFQiHPjBy3p2JWJvE5KHMEVxyVMWAXE3iu3bOuWUs9SOybrYq8lSl/rjBdYsWbt1hc351uEqEO3WTIEMjBHzrZ4gCWxLNWCfG4OOGsB9t98iIe9t45B9MqH+6kmqPWEMMwDBia3Dz5rTRjyxgFG4455HRH8QrWMHDoYYtd/du379Wf8yAK++Dj0V3EBboAp2IMVPR1YnZqCxxm8WCTB4rdT4F0SQaPCjZh7j/s6ZPS/TXTDqEAjBShilZlDD2jzIKy90pr+w7QxT3zrLpoqu6jQfGsg8KDGaY/UH/KHPCZUCpCm7QGx+xqlt X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2019 11:53:57.0289 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a78a5b2-4582-40dd-7202-08d778b0a4cf 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: VI1PR08MB3438 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=HrR+yXjDIEHbJRHX1+pVUBG01j4aIovj/Zqj2yFBPiY=; b=1vdTznAkTHpyjnfO2SPepj4iGEXNjJD2qANwkjs2j+iegVIJL+Z0BNqBmzLCnbRyUowbmH70v6Fgk9vXj7LAwAzs5yvh+UMPg4mssHd3mvt60EDlV2E/QXkErXwtc0JJHFy1jWWeRh3o1y/dmHenK4gvXpYT6PkZMuz8iwclsZs= 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=HrR+yXjDIEHbJRHX1+pVUBG01j4aIovj/Zqj2yFBPiY=; b=1vdTznAkTHpyjnfO2SPepj4iGEXNjJD2qANwkjs2j+iegVIJL+Z0BNqBmzLCnbRyUowbmH70v6Fgk9vXj7LAwAzs5yvh+UMPg4mssHd3mvt60EDlV2E/QXkErXwtc0JJHFy1jWWeRh3o1y/dmHenK4gvXpYT6PkZMuz8iwclsZs= 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: Jernej Skrabec , Mihail Atanassov , Jonas Karlman , David Airlie , Neil Armstrong , Icenowy Zheng , Brian Masney , "linux-kernel@vger.kernel.org" , Vasily Khoruzhick , Boris Brezillon , Torsten Duwe , Laurent Pinchart , Sean Paul , nd , Sam Ravnborg , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" No functional change. The setting of bridge->of_node by drm_bridge_init() in analogix_dp_core.c is safe, since ->of_node isn't used directly and the bridge isn't published with drm_bridge_add(). Signed-off-by: Mihail Atanassov --- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 5 ++--- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 8 ++------ drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 ++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c index b4f3a923a52a..130d5c3a07ef 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c @@ -696,8 +696,6 @@ static int anx6345_i2c_probe(struct i2c_client *client, mutex_init(&anx6345->lock); - anx6345->bridge.of_node = client->dev.of_node; - anx6345->client = client; i2c_set_clientdata(client, anx6345); @@ -760,7 +758,8 @@ static int anx6345_i2c_probe(struct i2c_client *client, /* Look for supported chip ID */ anx6345_poweron(anx6345); if (anx6345_get_chip_id(anx6345)) { - anx6345->bridge.funcs = &anx6345_bridge_funcs; + drm_bridge_init(&anx6345->bridge, &client->dev, + &anx6345_bridge_funcs, NULL, NULL); drm_bridge_add(&anx6345->bridge); return 0; diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c index 41867be03751..e37892cdc9cf 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c @@ -1214,10 +1214,6 @@ static int anx78xx_i2c_probe(struct i2c_client *client, mutex_init(&anx78xx->lock); -#if IS_ENABLED(CONFIG_OF) - anx78xx->bridge.of_node = client->dev.of_node; -#endif - anx78xx->client = client; i2c_set_clientdata(client, anx78xx); @@ -1321,8 +1317,8 @@ static int anx78xx_i2c_probe(struct i2c_client *client, goto err_poweroff; } - anx78xx->bridge.funcs = &anx78xx_bridge_funcs; - + drm_bridge_init(&anx78xx->bridge, &client->dev, &anx78xx_bridge_funcs, + NULL, NULL); drm_bridge_add(&anx78xx->bridge); /* If cable is pulled out, just poweroff and wait for HPD event */ diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index bb411fe52ae8..4042ba9a98d8 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1585,9 +1585,8 @@ static int analogix_dp_create_bridge(struct drm_device *drm_dev, dp->bridge = bridge; - bridge->driver_private = dp; - bridge->funcs = &analogix_dp_bridge_funcs; - + drm_bridge_init(bridge, drm_dev->dev, &analogix_dp_bridge_funcs, + NULL, dp); ret = drm_bridge_attach(dp->encoder, bridge, NULL); if (ret) { DRM_ERROR("failed to attach drm bridge\n");