From patchwork Tue Jul 23 23:28:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 11055449 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 A87B9138D for ; Tue, 23 Jul 2019 23:29:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98DEF28741 for ; Tue, 23 Jul 2019 23:29:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D41C28749; Tue, 23 Jul 2019 23:29:32 +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 3AC2B28741 for ; Tue, 23 Jul 2019 23:29:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08F7E6E3F3; Tue, 23 Jul 2019 23:29:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780048.outbound.protection.outlook.com [40.107.78.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFE1C6E3EE; Tue, 23 Jul 2019 23:29:16 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ar9rBP/zRchJSeeL4/HA17BfuVCbMeVLiar5qad0QRy/Cmihe/oODmUWA/K9CX3yPWsdhijZ5zjXyhHTAbgjp259PcZyOxfNBgA0PpEwj+wZfFSyC8ozZ1NO1Va3hMwkHSjUGkFIn2UX99GfVBY3jptlIqi/6bEJyuBF4XMT3yRCQRLNnr001sSSpjlKjSEvuHlHg+SdDoaiY3TfNLgt/Nz/Eb/mVJEdLEL6RTMvs4aMN+kb0cgBN1ODTozKi0/1pTs1M4hKFMP8sVRBHjaJYICF6vfstOwzWi22xQPc1FwmL9jF3Ir48shwlHA0cpMyokJlX28AeytuR6Ef2hdXWw== 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=rMX4HAXE+QcWiKCXNX0dXCSqR4+GVXr4+usrboA0ERU=; b=QI68YjSc+BydECHgUxvc8XYuSpBz1xKKqilwfJTep6J+zy2+qTl3nYl58tq67DXXZpFMF7fyCf/sPT3uG1agbNK/bqABReiRXA5fXe+53/JFX8FC0Cz8uD7ZKVXX0I/7dVYmala5Vei/TeAEyPVFsfNQ5bIYwmGeh43aCla10+lsRxQ1yanseSlLztR21+pzUC/KH0booYb3hEnLBdMMJe5gHd/Lelq5NTDazchMDlJOrt476ANTUaHrJp8ZEvKf9wG6RD/wLBpMjS2GUKuyEPzIoMiLjhW1rt4PWcYcxMuESmE0Zq27l7+Z/d+5HKHvfPF3QRVIsvLGCD8X0kTG1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com;dmarc=permerror action=none header.from=amd.com;dkim=none (message not signed);arc=none Received: from CY4PR1201CA0019.namprd12.prod.outlook.com (2603:10b6:910:16::29) by MWHPR1201MB2494.namprd12.prod.outlook.com (2603:10b6:300:de::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Tue, 23 Jul 2019 23:29:14 +0000 Received: from DM3NAM03FT038.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::201) by CY4PR1201CA0019.outlook.office365.com (2603:10b6:910:16::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.14 via Frontend Transport; Tue, 23 Jul 2019 23:29:14 +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 DM3NAM03FT038.mail.protection.outlook.com (10.152.83.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 23 Jul 2019 23:29:13 +0000 Received: from localhost.localdomain (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Tue, 23 Jul 2019 18:29:07 -0500 From: To: , Subject: [PATCH 9/9] drm/amd/display: Implement MST Aux device registration Date: Tue, 23 Jul 2019 19:28:08 -0400 Message-ID: <20190723232808.28128-10-sunpeng.li@amd.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190723232808.28128-1-sunpeng.li@amd.com> References: <20190723232808.28128-1-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)(4636009)(346002)(136003)(396003)(376002)(39860400002)(2980300002)(428003)(189003)(199004)(486006)(51416003)(70206006)(76176011)(70586007)(336012)(36756003)(356004)(478600001)(47776003)(86362001)(26005)(68736007)(305945005)(50226002)(2870700001)(53936002)(2906002)(50466002)(2876002)(81156014)(110136005)(4326008)(14444005)(81166006)(316002)(54906003)(126002)(446003)(1076003)(2616005)(49486002)(11346002)(426003)(48376002)(5660300002)(186003)(8676002)(8936002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB2494; 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: 6b2c677e-b4bc-4e13-89ac-08d70fc592b3 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:MWHPR1201MB2494; X-MS-TrafficTypeDiagnostic: MWHPR1201MB2494: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-Forefront-PRVS: 0107098B6C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: rIEsI88elqxG2KqfNOq8B9CKDLycMoxOgN8UbYnB/991j5RrdBNg6pAWqQMTdw1G0so+RkzWHPeWM/wrEttFCNA47VqgS9q9rKD8PO0AxDRe2ng15k+r93OEBGj4SZmSV2IUyUpjIG7kPEOlKwd2XYoR76SsiR2GJVcQlYuxMJPwz4BQuP7KU4ZNLG60kgvjOSyR7pr7SyL9Kgq4xj8+8pK3+RnEcQ2RHpKdNsfGii9j+VDJn3pVVmpHkkE4Mv9Rz8oymt1wrcCSWU7VIch9vrAx9R3LYNJTw2SiSYK6AnoOwzdN3C5C03GpwwqrTMOmJj0SiBqFbBrxooIGZ8ITg4KfkKaFrirAgTQWlept2yF8oBXY8YMVpMtsYyYlMP5IVkgm4YTDwm/3uOIIX9YfOttnGj4PXU5X+Ld/Jr8h+6s= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2019 23:29:13.7535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b2c677e-b4bc-4e13-89ac-08d70fc592b3 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: MWHPR1201MB2494 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rMX4HAXE+QcWiKCXNX0dXCSqR4+GVXr4+usrboA0ERU=; b=uCIgJCZ92AkjdVTkiDnmjBUGuLuhVltfbFMlVC/5LOzhMKC8yWR54qNdl1ormvnYIOCpw9DfWLg3bFVPDwY8zkN5AM/feJ8mjD0CNeIwdidVfo7t+lQkWrC0F29BghhK4b+dhlAEGxUZS0qzscqNnlHYD6r4C84l2KDcycGCu0E= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 , nicholas.kazlauskas@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Li Implement late_register and early_unregister hooks for MST connectors. Call drm helpers for MST connector registration, which registers the AUX devices. Cc: Jerry Zuo Cc: Nicholas Kazlauskas Cc: Harry Wentland Signed-off-by: Leo Li Reviewed-by: Nicholas Kazlauskas --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 53d2cfe62e13..16218a202b59 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -156,6 +156,26 @@ dm_dp_mst_connector_destroy(struct drm_connector *connector) kfree(amdgpu_dm_connector); } +static int +amdgpu_dm_mst_connector_late_register(struct drm_connector *connector) +{ + struct amdgpu_dm_connector *amdgpu_dm_connector = + to_amdgpu_dm_connector(connector); + struct drm_dp_mst_port *port = amdgpu_dm_connector->port; + + return drm_dp_mst_connector_late_register(connector, port); +} + +static void +amdgpu_dm_mst_connector_early_unregister(struct drm_connector *connector) +{ + struct amdgpu_dm_connector *amdgpu_dm_connector = + to_amdgpu_dm_connector(connector); + struct drm_dp_mst_port *port = amdgpu_dm_connector->port; + + drm_dp_mst_connector_early_unregister(connector, port); +} + static const struct drm_connector_funcs dm_dp_mst_connector_funcs = { .detect = dm_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, @@ -164,7 +184,9 @@ static const struct drm_connector_funcs dm_dp_mst_connector_funcs = { .atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_set_property = amdgpu_dm_connector_atomic_set_property, - .atomic_get_property = amdgpu_dm_connector_atomic_get_property + .atomic_get_property = amdgpu_dm_connector_atomic_get_property, + .late_register = amdgpu_dm_mst_connector_late_register, + .early_unregister = amdgpu_dm_mst_connector_early_unregister, }; static int dm_dp_mst_get_modes(struct drm_connector *connector)