From patchwork Mon Apr 22 23:56:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 10911733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 150AF1708 for ; Mon, 22 Apr 2019 23:56:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0987127FA8 for ; Mon, 22 Apr 2019 23:56:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1B34287C3; Mon, 22 Apr 2019 23:56:54 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA81927FA8 for ; Mon, 22 Apr 2019 23:56:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D12589256; Mon, 22 Apr 2019 23:56:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-eopbgr800078.outbound.protection.outlook.com [40.107.80.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19F6989256; Mon, 22 Apr 2019 23:56:52 +0000 (UTC) Received: from DM3PR12CA0044.namprd12.prod.outlook.com (2603:10b6:0:56::12) by BN8PR12MB2963.namprd12.prod.outlook.com (2603:10b6:408:61::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Mon, 22 Apr 2019 23:56:50 +0000 Received: from CO1NAM03FT009.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by DM3PR12CA0044.outlook.office365.com (2603:10b6:0:56::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1813.12 via Frontend Transport; Mon, 22 Apr 2019 23:56:50 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT009.mail.protection.outlook.com (10.152.80.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16 via Frontend Transport; Mon, 22 Apr 2019 23:56:49 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.389.1; Mon, 22 Apr 2019 18:56:48 -0500 Received: from leodev.amd.com (10.180.168.240) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server id 14.3.389.1; Mon, 22 Apr 2019 19:56:47 -0400 From: To: , Subject: [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path() Date: Mon, 22 Apr 2019 19:56:27 -0400 Message-ID: <1555977388-14203-2-git-send-email-sunpeng.li@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555977388-14203-1-git-send-email-sunpeng.li@amd.com> References: <1555977388-14203-1-git-send-email-sunpeng.li@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(376002)(346002)(2980300002)(428003)(189003)(199004)(76176011)(8676002)(70586007)(8936002)(51416003)(50226002)(70206006)(305945005)(47776003)(81166006)(81156014)(2616005)(126002)(336012)(476003)(72206003)(446003)(86362001)(486006)(4326008)(11346002)(7696005)(97736004)(478600001)(426003)(53416004)(53936002)(16586007)(86152003)(5660300002)(14444005)(316002)(36756003)(186003)(54906003)(110136005)(2906002)(2876002)(26005)(356004)(48376002)(50466002)(6666004)(77096007)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:BN8PR12MB2963; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5e98c27-8792-45d8-5e44-08d6c77e2fae X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328); SRVR:BN8PR12MB2963; X-MS-TrafficTypeDiagnostic: BN8PR12MB2963: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 00159D1518 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: B++ostm1QY9MpoYXNVo2eYKWnH724bitivcaa4J7y77Qh289HttJag1sjARzDcsuDLsnIxwr8yQKkpNYc9K0NkTOcfk8Vxk+lT0icK7eeDHE3WzTB686mCkGJ5OLNBScb94nnrIcfw2eMB2bCKBgZYbGW8/6RT1DnXxKYLL7Zq8sWfLir78U1Kp7inWAAUW1XhZe6vTwmMgKwMSaC2ZLpDpVrKz1ufNHkpWxiihPm4ppIz9CsAal/TqZXtWaFAvv2O4r0QT9jUjcBPiQCzL6U4qcBsU6/trukreQK3Vbd2UnXJTj3WMta2qfKp7Mr1/1RoN8vduJKEB2zPqcoHETmoVn+JAObGX5NJaPgeG3REGupQOv4n0XSkWfsOpWUSNfhToEOzJ93jfGefvhXUtIfTpEN9FJ7PrKSBrJOXEfJ2Y= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2019 23:56:49.6805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5e98c27-8792-45d8-5e44-08d6c77e2fae X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB2963 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h4IPZtP+Tv0o3+WuCqxtXeEHQIEbsjo6E10La2IkAjo=; b=DPeVJ7QIneJYVBqxujUAX8VTN6UzsKVqpqtte1l5c4Jj/1ySGXfpWQVwLl5frRrK4Yrt8j3m/nbe/NQ1d7NPHf+wK8ivM+HTtGLAzlAzgHuaJ6BT8xzLYoBIfihxPVjXyNQyOG7as/rDeJKDO6GiutclWiihgH4+CrG2hs5rxUY= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.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: Leo Li , jerry.zuo@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Li To give identifiable attributes to MST DP aux devices, we can use the MST relative address. Expose this function for later use. Signed-off-by: Leo Li Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- include/drm/drm_dp_mst_helper.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 2ab16c9..86ff8e2 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1120,7 +1120,7 @@ static void drm_dp_check_mstb_guid(struct drm_dp_mst_branch *mstb, u8 *guid) } } -static void build_mst_prop_path(const struct drm_dp_mst_branch *mstb, +void drm_dp_build_mst_prop_path(const struct drm_dp_mst_branch *mstb, int pnum, char *proppath, size_t proppath_size) @@ -1202,7 +1202,7 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb, if (created && !port->input) { char proppath[255]; - build_mst_prop_path(mstb, port->port_num, proppath, sizeof(proppath)); + drm_dp_build_mst_prop_path(mstb, port->port_num, proppath, sizeof(proppath)); port->connector = (*mstb->mgr->cbs->add_connector)(mstb->mgr, port, proppath); if (!port->connector) { /* remove it from the port list */ diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 371cc28..81c8d79 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -602,6 +602,10 @@ void drm_dp_mst_deallocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, int drm_dp_find_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, int pbn); +void drm_dp_build_mst_prop_path(const struct drm_dp_mst_branch *mstb, + int pnum, + char *proppath, + size_t proppath_size); int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr);